MKV output file aspect ratio is different than input file

Started by jjmartin, October 17, 2017, 07:59:30 PM

Previous topic - Next topic

jjmartin

I have a lot of old digital TV recordings made in 2007. For some reason, these mpg files have an aspect ratio of 3:2 instead of 4:3; guess it was a bug in whatever software it was. They also have commercials at start and end. I am using Avidemux to cut off the commercials. I first found that after I trimmed the mpg file, I could not output it as a video copy; the only way was to compress to h264 which takes about as long as the runtime (1 hour for a 1-hour-long video). I discovered if I first use MKVToolNix to convert the mpg file to an mkv file, Avidemux can save the trimmed output of the mkv using Copy and only taking a minute. Trouble is if I use MKVToolNix to also set the aspect ratio to 4:3, the trimmed output file reverts to 3:2 aspect, and I have to process it again by MKVToolNix to set the aspet to 4:3. Why does Avidemux not keep the aspect ratio from the input mkv file?

zakk

Use mkv muxer configuration button bottom, left of Avidemux window

AQUAR

What Zakk points out will do the trick on media players that will read the required display aspect ratio.

Not a BUG.
The old TV recordings are from the analogue TV's days.
These TV's did not have "square pixels" and had a longer pixel length to height.
Meaning the video display was stretched in comparison with digital monitors that have square pixels.
You can recode the old video with resampling for the correct display aspect.

jjmartin

I also have old mpg files, created by a different A-D converter, which are 720x480 but the aspect is correct at 4:3. When I trim it by Avidemux the output is still 4:3 aspect. This tells me that mpg files have an aspect field, and Avidemux uses it. I don't know if the 3:2 aspect files actually have 3:2 in the aspect field, or perhaps they have a blank field and MediaInfo and Avidemux assume square pixels and thus calculate the aspect as 3:2. Either way, it appears that when MKVToolNix is used to change the aspect, it does not change the field in the mpg file, but just creates an override. It looks like Avidemux does not use this override, but instead uses the values in the mpg file. I feel that when Avidemux inputs and outputs an mkv file, it should retain the aspect ratio from the input mkv, and not revert to the one in the mpg file.

AQUAR

Avidemux used to simply display the stored aspect ratio of the video.

If it does take note of container meta data for the display aspect ratio, it is a recent change.
ADM would still assume you are using the program on a computer, attached to a digital monitor that has square pixels.

If you trim in copy mode, the display aspect meta data might be copied along with it, depending on how that meta data was embedded.
Not the case with MKV containers, as you need to enter that data yourself.
Avidemux should be taken as a simple video editor!   

jjmartin

It IS a nice simple video editor. For the occasional times I need one, it does the job. Now that I have all the quirks under control, I'm satisfied, not going to go looking for another.