Skip to content

Bug in MediaConvert Output setup blocks resolutions that are actually supported by AVC, and still encodes anyway if you trick it

1

Hello,

In MediaConvert, when we create an Output that is "Fit without Upscaling" on the "Scaling"->"Scaling Behavior" settings, but then set a resolution boundary of 4096w and 4096h, we receive an error stating: "/videoDescription/width: Should be less than or equal to 2304". The Output configuration page is trying to force the output to be 2304x4096 max, which is incorrectly blocking the encoder (see below). The intent here (that works in other transcoders) is: If a video is larger than either height or width boundary, then scale that side that is too large down but maintain the aspect ratio when determining the size of the other side. This would mean that you could send in something larger than either max 4096w or max 4096h, it would scale down one side effectively but maintain the aspect ratio - and not force the output resolution to 4096x4096 or change the aspect ratio.

  • Our input source video is 3840x4320 Stereoscopic / OU (2160p and 16:9 per eye), and it's encoded as H.264/AVC High Profile 5.1. Source file can be obtained here. http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_2160p_60fps_stereo_abl.mp4 - We also have 360 or 180 degree / VR video in 3D that OU or SBS, and a single set of outputs should handle all these scenarios gracefully (funny enough they do, if you only set one side of the width or height and not the other, see below).
  • AVC High Profile Level 5.1 can obviously accommodate 3840x4320 in the above source input, and this source video plays fine in VLC for example (just showing both eyes over under).
  • In the MediaConvert Output configuration page, if we only set the width to 4096w, but don't set the height, we are able to save the Output in MediaConvert with no errors. The "Fit without Upscaling" setting will not trigger since the 3840 width is smaller than 4096 (correct), but that also means that 4320 height makes it through from the Input video to the Output, and H.264 on MediaConvert will still encode this video as AVC High Profile 5.2 at 3840x4320.
  • Resolutions higher than 4096x2304 or 2304x4096 are accepted by the actual MediaConvert encoder and processed correctly, but resolutions higher than 4096x2304 or 2304x4096 are not accepted by the Output creation form for creating Outputs specified at 4096 max height AND 4096 max width limits.

There is a bug or unintended behavior here.

Other testing:

  • Handbrake handles these calculations/limitations gracefully, and will show that putting 4096x4096 as the "Maximum Size" output Dimensions for this input video will then result in the checked->"Optimal size" as being set as 3640x4096 (correct), and x264 will encode it properly, downscaling it in the process.
  • Switching the codec to H.265 in the MediaConvert Output makes the error go away obviously because the spec technically supports larger resolutions, and we can save that H.265 Output with no problem. Unfortunately, we can't switch these outputs to H.265 currently.

Thank you for your guidance!

asked a year ago145 views
2 Answers
0

Here is a view of Handbrake handling this exact encode using x264. Is there a way for MediaConvert to gracefully handle Maximum and Scaled sizes when determining fit / scaling on the MediaConvert Output creation?

Enter image description here

Reiterating here that we just ran another test of an input video at 3840x4320, set the Output in MediaConvert to H.264 with Auto profile level selection, and limited ONLY the width to be 4096 without Upscaling. **The Output was transcoded successfully with a resolution of 3840x4320, AVC High Profile Level 6! **Level 6 isn't even an option in MediaConvert on H.264 Codec options. Input video is here http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_2160p_60fps_stereo_abl.mp4

There is a bug in the interface on the web not reflecting what the encoders are actually doing. The web form blocks you from creating something that the encoders can actually handle, and also the web form should be able to take 4096x4096 and limit either side gracefully without affecting the aspect ratio, and the web form should not throw an error, since H.264 Auto will clearly encode it via MediaConvert! Please advise. Thank you!

answered a year ago
-1

Thanks for your post. It seems you are attempting to transcode VR resolutions. Outputs larger than 4096x2160 or 2160x4096 for H.264 outputs and 8192x4320 or 4320x8192 for HEVC outputs will trigger beyond limit errors, as you have seen.

AWS MediaConvert has some limitations on output resolutions, based on the codec being used. Please see this link for those limits. https://docs.aws.amazon.com/mediaconvert/latest/ug/supported-output-resolution-maximums-by-codec.html

AWS
answered a year ago
EXPERT
reviewed a year ago
  • Edit: We just ran another test that had H.264 with Auto profile selected 4096 as max width set. The Output was created by MediaConvert encoders with the resulting video being 3840x4320, High Profile Level 6!

    It is a 3D fixed frame traditional movie not VR (although it shouldn't matter).

    Separately, MediaConvert should handle this scenario more gracefully, as noted in the original post. Handbrake, for this exact example, allows you to put 4096x4096 max width and height, then it will auto calculate the downscaling appropriately under Scaled Size -> Optimal size, while maintaining the aspect ratio. Media convert does this correctly for one side specified at 4096 (either width or height in this scenario), but fails on the web form (incorrectly) when you add that limitation to both.

    Is MediaConvert not up to the latest x264?

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.