News:

--

Main Menu

Widescreen videos are compressed in width

Started by PilgrimOV, February 28, 2023, 11:34:25 AM

Previous topic - Next topic

PilgrimOV

Hello! I want to change the container of a widescreen video (more than 16:9) from MKV to MP4 without encoding. But please tell me why does Avidemux compress widescreen videos in width? How to fix it?

eumagga0x2a

If a video is anamorphic, you must force an appropriate display aspect ratio in the configuration of the MP4 muxer.

PilgrimOV

Quote from: eumagga0x2a on February 28, 2023, 11:40:20 AMIf a video is anamorphic, you must force an appropriate display aspect ratio in the configuration of the MP4 muxer.
And what aspect ratio should be set, for example, for such a video: You cannot view this attachment.

I can't figure it out...

PilgrimOV

eumagga0x2a, please tell me why You cannot view this attachment. is imported correctly and You cannot view this attachment. is incorrect? What is their difference and how to learn to identify this difference? Thank you very much!

eumagga0x2a

Quote from: PilgrimOV on February 28, 2023, 12:09:21 PMAnd what aspect ratio should be set, for example, for such a video: You cannot view this attachment.

I can't figure it out...

Width                                    : 716
Width                                    : 716 pixels
Height                                  : 472
Height                                  : 472 pixels
Stored_Width                            : 720
Stored_Height                            : 480
Sampled_Width                            : 716
Sampled_Height                          : 472
Pixel aspect ratio                      : 1.422
Display aspect ratio                    : 2.157
Display aspect ratio                    : 2.2:1

I assume that "Stored_Width" and "Stored_Height" entries correspond to what is called by FFmpeg coded_width and coded_height (for compression efficiency, the input image is padded by the encoder to a size which is a multiple of 16 and the decoder is told to crop the output to the width and height of the actual picture).

With "Display aspect ratio" being equal 2.157 (which is definitely an approximate value), you should check the checkbox "Force aspect ratio" and choose "Aspect Ratio (DAR)" as "Derived from display width" and "Display Width" as 472 * 2.157 = 1018.

If the result doesn't look right, you will have to try out a few values to find the one which looks best in a video player.


eumagga0x2a

Quote from: PilgrimOV on February 28, 2023, 12:17:18 PMeumagga0x2a, please tell me why You cannot view this attachment. is imported correctly and You cannot view this attachment. is incorrect? What is their difference and how to learn to identify this difference?

The first video uses square pixels (pixel aspect ratio is equal 1), the second one is anamorphic (any other positive non-zero value). Avidemux doesn't honor pixel aspect ratio in its video preview by design as for the essential functionality of appending videos only dimensions in square pixels matter.

PilgrimOV

Thank you very much! Everything is clear!