News:

--

Main Menu

Problems with aspect ratio.

Started by maxmanus, September 10, 2021, 09:14:59 AM

Previous topic - Next topic

maxmanus

Hi, im having problems with 4:3 and 16:9 sd videofiles.
I'm trying both to copy and to encode, same error.
Tried several muxers, same error.
I've forced aspect ratio, and same error, only then it actually plays correctly in vlc and other players, but because of the tag Avidemux generates, which I really want you to remove, some video editing software, like PowerDirectior misreads the files.
Width                                    : 720 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 4:3
Original display aspect ratio            : 5:4
It is of course the Original display aspect ratio, which avidemux is generating.
The original file, had just the Display aspect ratio set to 4:3.
Same happens with 16:9.
Is there any reason to append this tag to the file after encoding?
Seems a bit strange, since avidemux isnt reading the original aspect ratio from the file, but just generates it from the resolution.


eumagga0x2a

You don't mention the codec, but there is no "original display aspect ratio" tag / flag / whatsoever. This is how MediaInfo indicates that info from the container and VUI (video usability information, a part of codec extradata for H.264 and HEVC) disagree. Most applications and video players follow the info from the container and ignore the codec, a few respect the one from the codec.

If you re-encode, set the target aspect ratio both in the configuration of the muxer as well as in the configuration of the encoder.

maxmanus

Ok, I see that now.
No chance of adding the field "as input" in the x264 config, that is greyed out?
I use Avidemux mainly for cutting, but think ill go over to Handbrake to encode and virtualdub2 to find the frame numbers I need. This feels easier, than changing these settings constantly when moving from 4:3 to 16:9 and back again. In handbrake everything works automatically.

And copy instead of reencoding gives correct results when forcing the aspect ratio, was incorrect before, sorry about that.
But to me, it just seems like this is something that could be applied, automatic detection from mediainfo? And a way to manually override if you need to?
No chance of changing this?
Been using Avidemux at least once a week last 5-6 years, and I like it.
But adding this would be perfect.

eumagga0x2a

Quote from: maxmanus on September 10, 2021, 10:07:18 AMNo chance of adding the field "as input" in the x264 config, that is greyed out?

Not short-term as there is no infrastructure for that in the backend at the moment, maybe not at all.

Quote from: maxmanus on September 10, 2021, 10:07:18 AMto find the frame numbers I need.

With frame reordering and field-encoded streams or MBAFF – good luck with that.

Quote from: maxmanus on September 10, 2021, 10:07:18 AMThis feels easier, than changing these settings constantly when moving from 4:3 to 16:9 and back again

Ever considered saving settings as a x264 profile?

Quote from: maxmanus on September 10, 2021, 10:07:18 AMBut to me, it just seems like this is something that could be applied, automatic detection from mediainfo? And a way to manually override if you need to?

Creating backend support for that is probably desirable middle-term, but don't forget that Avidemux works with multiple reference videos which may have contradicting info, not to ignore the plentitude of broken files simply with wrong info around and all the crop / resize filter capabilities in Avidemux, which alter / invalidate display aspect ratio info from the demuxer. This is a deep rabbit hole to crawl into.

maxmanus

Ok, thanks for quick reply.
Im just cutting mp4s that ive made with vapoursynth and ffmpeg trough scripts, so the frame numbers are always correct from what handbrake reads and what virtualdub2 reads.
Avidemux has probably too many functions for the use i need it for, those i need i find in vapoursynth.
But have been recommending this program to some of my customers, ofc saying its free and that they should donate if the like it, but i get a lot of feedback because of this stuff with aspect ratio, so many cant do this and understand it, too many menus and things like that.
A new feedback i got lately is that audio does not appear in iMovie when copy video and audio streams.
So they needed to do audio reencode, then it worked, dont think that problem was there before, but not sure, maybe an iMovie update that causes it.
But anyways, great program, it is. Always has been. Good job making this!
Really like the implementation of fdk, that is something handbrake lacks.