Problem with aspect ratio (Linux Mint 22, Avidemux 2.8.1)

Started by Seojeom, April 22, 2025, 03:31:48 PM

Previous topic - Next topic

Seojeom

I am a first-time user — maybe that is why I'm having this problem. I recorded a short TS video file from digital TV that I want to share with some others with mobile phones. So I thought to use Avidemux to isolate the interesting part and to convert it to MP4 format (because that seems to be popular on phones.)

This succeeded, but the aspect ratio is a problem. The original video's aspect ratio is 16:9, as it is from a 16:9 TV. However, when Avidemux loads the file, it immediately changes (squeezes) it to 4:3, and this is kept in the output MP4 file. So the output is squeezed, in other words, useless.

As a new user, I'm at a loss. Looking at Output Format|Configure|Properties, it says "Image Size: 720x576" which seems to be wrong for a 16:9 image. On the other hand, "Aspect Ratio: PAL 16:9 (64:45)" which is wrong, too, as 16:9 is not equal to 64:45, and the output image's aspect ratio is, as noted above, 4:3 which is not equal either to 16:9 or 64:45.

I'm confused. Can anyone help? Thank you in advance!

eumagga0x2a

#1
First of all, I would recommend using the latest 2.8.2 appImage from https://avidemux.org/nightly/appImage4Buster/ rather than the extremely outdated 2.8.1 release build which is meanwhile over two years old.

Quote from: Seojeom on April 22, 2025, 03:31:48 PMI recorded a short TS video file from digital TV that I want to share with some others with mobile phones. So I thought to use Avidemux to isolate the interesting part and to convert it to MP4 format (because that seems to be popular on phones.)

Not just the container format (MP4 vs MPEG-TS) matters but especially the video and audio codec as the video codec should be compatible with the hardware decoder capabilites of the target device. In doubt: H.264 as video and AAC as audio.

Quote from: Seojeom on April 22, 2025, 03:31:48 PM<...> the aspect ratio is a problem. The original video's aspect ratio is 16:9, as it is from a 16:9 TV. However, when Avidemux loads the file, it immediately changes (squeezes) it to 4:3, and this is kept in the output MP4 file. So the output is squeezed, in other words, useless.

<...> Looking at Output Format|Configure|Properties, it says "Image Size: 720x576" which seems to be wrong for a 16:9 image. On the other hand, "Aspect Ratio: PAL 16:9 (64:45)" which is wrong, too, as 16:9 is not equal to 64:45, and the output image's aspect ratio is, as noted above, 4:3 which is not equal either to 16:9 or 64:45.

It all makes perfectly sense. We've got an anamorphic video coded with pixel dimensions of 720x576 intended for display at pixel aspect ratio of 64:45 = 1024x576 which gives us 16:9 display aspect ratio as the result. Avidemux displays all videos by design as coded and with square pixels.

The main question is whether the (most likely MPEG-2) source is interlaced or progressive. If the former, you should insert a deinterlacing video filter (e.g. yadif) when re-encoding the video stream. When re-encoding, e.g. using the x264 video encoder plugin for H.264 output, you should a) in the configuration of the x264 plugin, in the "Output 1" tab, choose "64:45 (PAL 16:9)" as "Predefined Aspect Ratio" for "Pixel Aspect Ratio" and b) in the configuration of the MP4 muxer, check "Force aspect ratio" checkbox and select "16:9" as "Aspect Ratio (DAR)". Please note that the latter is more important as display aspect ratio info from the container is more widely respected by video players than the same from the codec.

Alternatively, you can use "swsResize" video filter to rescale 720:576 anamorphic source to 1024x576 non-anamorphic (with square pixels) one which eliminates the need for specifying a display aspect ratio at the container level.

You might also need to re-encode the audio track as publicly broadcast MPEG-2 video streams are usually combined with either MP2 or AC3 audio tracks, not universally supported by video players on smartphones.

Jan Gruuthuse

as explained above by eumagga0x2a
When using mp4 muxer in avidemux:
Output Format:
MP4 Muxer:
[Configure}
mark [v] Force aspect ratio
keep:
DAR at [16:9]
Display Width [1280]

Seojeom

OK; I downloaded the newer version and really tried to find a good combination of format parameters and DAR and display width, etc. Unfortunately, I didn't find one. The problem seems to be that the pixel count stayed at 720x576 and the Android phone regarded that as the deciding factor.

But the swsResize filter did the trick! Thank you!