News:

--

Main Menu

Aspect Ratios In Avidemux

Started by AQUAR, December 04, 2013, 02:48:43 AM

Previous topic - Next topic

AQUAR

Some codecs have a configuration option that tells avidemux that the pixel aspect ratio of the source video was  meant for a specific display type.

If say you select 16:9 (PAL), then the avidemux recode adds meta data to the container to ensure a media player renders a display that is 1.42 times wider (sometimes additional scaling  is performed to again adjust for pixel geometry of the display type). When you check the meta data (mediainfo) of the recoded video, the display aspect ratio  will be 1.42 times wider than that of the raw aspect ratio (vertical pixels : horizontal pixels). That is what you would expect the result to be.

But, with 2.6.x only,  this is not the case when muxing the recoded video into an MKV container. Instead it maintains the raw aspect ratio and adds meta data pointing out that the original display aspect was 1.42 wider. That seems wrong.
Playback of this MKV is squashed in comparison with onces remuxed into another container or when using 2.5.6 for MKV.

There was a recent topic "Aspect ratio won't budge from 4:3" where one member mentioned difficulty in retaining the display aspect ratio on some videos, even when just copying.
I was tempted to say that at least for recodes the fix could be to set this input pixel aspect ratio. I didn't because this configuration option is not available for all codecs and there is this inconsistency.

Another related configuration item is that: sometimes the souce video is incorrectly scaled and so a user ability to define a non custom pixel aspect ratio is really very useful (xvid please!).

@ mean - is it maybe worth tweaking avidemux a bit with regard to these items.

pchristy

I'll drink to that!  ;D

At the moment, I can achieve correct aspect ratio in copy mode, but it means a two stage process. First edit in Avidemux, then pass the resulting file through ffmpeg in "copy" mode, but adding -aspect 16:9 (or whatever). Ffmpeg will issue a warning about trying to set the aspect ratio whilst copying, but it does work. Its also fast and simple.

I can also do it using MP4Box, but this requires some calculation to set the right parameters. I've also had instances where MP4Box has produced "unplayable" mp4s!, so I tend to stick to ffmpeg.

Having the ability to correct aspect ratio information in Avidemux would be a real boon.

--
Pete

AQUAR

#2
Just curious, could you not use ffmpeg to do the copying and set the desired display aspect ratio as a one step process?
Not if you have to edit as well of course!

I don't know where/how this information is included in the container (probably also varies with container type).
Judging by the fact that it takes a bit of time for Mpeg4Modifier to do this deed, I guess may be in the headers of every data packet.
Can't say if refining the setting of aspect ratios would be hard or even desirable to implement in avidemux (way outside my expertise level).



pchristy

I use Avidemux for editing in this particular instance. Its just a matter of "top & tailing" programmes recorded on a PVR, and sometimes cutting out the commercial breaks. Some of the programmes are transmitted as 544x576 instead of the more usual 720x576. But in either case, Avidemux seems to remove the aspect ratio information, and whilst the original ts stream is 16:9, after editing in Avidemux, it always ends up as 4:3!

A manual over-ride of the DAR (Display Aspect Ratio), as provided my ffmpeg, would be very useful!

If I am transcoding, its not so much of an issue, as I can usually achieve the desired aspect ratio. However, the beauty of digital TV is the ability to copy-without-loss - if only I could preserve the aspect information!



--
Pete

AQUAR

I'll drink to that as well - only a french 5 star cognac will do for me .
Nice, and another nip in consideration for the avidemux developers.