Skip to content

When converting to h264 / .mp4 file , the generated file has a "video/x-m4v" mimetype instead of the standard "video/mp4" mimetype

0

When I use AWS Media Convert to create a basic h264 / mp4 file using the default settings, the mimetype of the generated file is "video/x-m4v"

ffprobe fileGenerated.mp4 says: Metadata: major_brand : M4V minor_version : 1 compatible_brands: isomavc1mp42

I need the generated files to be in a standard "video/mp4" mimetype (the service I'm working with will ONLY accept an MP4 file with a mimetype of "video/mp4") .

I've experimented with all kinds of different input files and different AWS MediaConvert h264 output settings, but they all have no effect.

asked 9 months ago217 views
4 Answers
3

Use FFmpeg for Post-Processing If AWS MediaConvert continues to produce files with the "video/x-m4v" MIME type, you can use FFmpeg to re-mux the file and ensure it has the correct MIME type:

ffmpeg -i input.m4v -c copy output.mp4
EXPERT
answered 9 months ago
  • Yes, this does work, but defeats the whole point of using AWS to convert media. If I'm going to have to run it through ffmpeg, I might as well do everything I need to do with ffmpeg locally and bypass AWS entirely.

1

These settings on MediaConvert:

Enter image description here

It will give the following result:

Enter image description here

AWS
answered 9 months ago
  • Thanks for your help, although it didn't solve my problem directly (Linux still sees this file as "video/x-m4v"), it did make me wonder about changing the "major brand" field to something else and eventually figuring out the solution which I posted.

0
Accepted Answer

I figured out the solution.

With just the default settings, with the AWS Generated MP4 video, the "Major Brand" in the metadata comes back as:

Major Brand                     : MP4 v2 [ISO 14496-14]

Which Linux's "file" command sees as a mimeType of "video/x-m4v"

In Media Convert's Output Settings -> MPEG-4 container settings, if you change the Major Brand field to "isom", the resulting AWS generated video has "Major Brand" of:

Major Brand                     : MP4  Base Media v1 [IS0 14496-12:2003]

Which Linux's "file" command sees as a mimeType of "video/mp4", which will be accepted by the program I'm trying to use them on.

answered 9 months ago
EXPERT
reviewed 9 months ago
0

The default settings for AWS MediaConvert jobs may streamline transcode configuration, though may not provide specific file types and formats. You can change output file types and extensions by forcing in the job. See the previous configuration screen capture for guidance.

There should be no need to reprocess an output from MediaConvert with FFMPEG to achieve what the desired results. Documentation for MediaConvert details the output file formats. https://docs.aws.amazon.com/mediaconvert/latest/ug/reference-codecs-containers.html

AWS
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.