News:

--

Main Menu

Display Aspect Ratio - If and how to set

Started by guju, January 12, 2019, 03:08:12 PM

Previous topic - Next topic

fish

#15
Your cropped example demonstrates why a custom setting is needed when the video is not a standard size. If the video is encoded as PAL or NTSC the pixels are non square, unlike HD video which uses square pixels. So if you crop PAL or NTSC encoded video, so that the frame height to width ratio is changed, then the standard multiples such as in Avidemux no longer give the expected results. If I remember NTSC encoded pixels are taller than they are wide, PAL wider than they are tall, HD video uses square pixels as do computer monitors. So it is not that "This DAR thing seems to be a little ... "delicate".", it is just that there are complications due to older legacy formats used in DVD's and PAL/NTSC television formats. Sorry it is not all simple, I notice even the television professionals occasionally get it wrong when mixing old footage with new.

guju

Thank you.
Being a simple user I still hadn't the right notion of DAR.
There seem to be a lot of pitfalls one is not aware of
- even if being fallen in.
Of course Avidemux can't be blamed for that. It gives you
full freedom (= responsibility).
Still - as said - this situation will lead to worsening quality
(by the simple user, and occational even by profs).

I well understand that the devs of Avidemux have enough other
things to do, still I think a way would be to have something
like a "check option", that tests "unusual" settings.
(DAR, interlace, ...). Just an idea.
But maybe this is like asking for a navigation assistant ...
in a racing car?

... in case of cropping with DAR - a "preserve AR" option
in the filter GUI would be helpful.

Still there remains the question about interlacing (Your Post #11).
Are standard DVDs progressive although declared as interlaced?

guju

Short addendum:

If I deinterlace the movie (before AR-cropping and compressing)
the result is worse than without deinterlacing.
Although der source stream (orig from DVD) is marked as interlaced.
("What's your name?" "It is Strange" " ..."  :P)

eumagga0x2a

Quote from: gujuCroping my orig video from above to 698x448.

Don't do that. At least don't use values which are not a multiple of 16 (at worst: 8 ).

Quote from: gujuMKV output DAR 4:3.
=> Too small in width.

The logic in the MKV muxer takes the height of the picture and calculates width for the specified DAR. To keep desired pixel aspect ratio instead, you have to multiply your cropped width (698) with 16/15 with makes approx. 745 which you should enter into the field "Force display width".

Quote from: fishYour cropped example demonstrates why a custom setting is needed when the video is not a standard size.

This custom setting for the MKV muxer is present and precedes the DAR selector by years. It is absent in the MP4 muxer.

Quote from: gujuIf I deinterlace the movie (before AR-cropping and compressing) the result is worse than without deinterlacing.

Sure, but if you have already visually confirmed that video is not interlaced, what is the point to try it nevertheless?

Quote from: gujuBut maybe this is like asking for a navigation assistant ...
in a racing car?

Rather electric windows in a bicycle. Look, Avidemux is what you make out of it. The source code is open, quality contributions are welcome. Make your hands dirty, reshape things.

guju

Quote from: eumagga0x2a on January 14, 2019, 05:21:44 PM

Quote from: gujuIf I deinterlace the movie (before AR-cropping and compressing) the result is worse than without deinterlacing.

Sure, but if you have already visually confirmed that video is not interlaced, what is the point to try it nevertheless?

The point is ...
as I stated before in this thread, that the movie is marked as interlaced.
And so "someone" will pay attention to that (Player, decoder, ...)
and deinterlace it (Actually it looks like MPC-HC produces a worse image
playing the original (!) stream than the non-deinterlaced movie produced by Avidemux).
And we're talking about a standard commercial DVD (???).

"It looks like" - I'm not sure.
And I find it quite time observing to manually find out for every movie
one handles if interlace is set correctly.
That's the reason why I asked about motion vectors etc.

Quote from: eumagga0x2a on January 14, 2019, 05:21:44 PM

Quote from: gujuBut maybe this is like asking for a navigation assistant ...
in a racing car?

Rather electric windows in a bicycle. Look, Avidemux is what you make out of it. The source code is open, quality contributions are welcome. Make your hands dirty, reshape things.

... Thankyou for your invitation.  ;)
I hope you don't take it as a pretext, if I tell you,
that I take Avidemux as a tool to "make my hands dirty" on my things.
It's not my thing to work on the tool itself.
My contribution is to give a feedback/ hopefully unobtrusive hints
of a newbie.

So I disagree with your metaphor.
A bicycle without electric windows does no harm.
In contrast to a racing car without knowing how to deal with it.
It might well be possible that the majority of the Avidemux
produces films are bad in quality because most of the users
don't know about the pitfalls, two of them we are discussing
(DAR, interlacing).

eumagga0x2a

Don't rely on interlace flag or absence thereof. Trust your eyes. It takes a few seconds with Avidemux to tell whether a video is interlaced or not, not more.

Quote from: gujuI hope you don't take it as a pretext, if I tell you,
that I take Avidemux as a tool to "make my hands dirty" on my things.
It's not my thing to work on the tool itself.
My contribution is to give a feedback/ hopefully unobtrusive hints
of a newbie.

This was exactly my attitude back then, two and a half years ago.

QuoteIt might well be possible that the majority of the Avidemux
produces films are bad in quality because most of the users
don't know about the pitfalls, two of them we are discussing
(DAR, interlacing).

But now you are able to handle the tool better, aren't you? If you have a vision of helping others to get the best out of Avidemux, make it happen.

guju

Again: Thank you  :)

Well, knowbody knows what will be in the future  ;)
If I ever would contribute in Avidemux dev, I would pave it with checks/ warnings/ hints
(in the "standard user mode") if there are some suspicious settings,
or something could be made better etc.

You are right, I (!) can handle the tool better now/ know something more
(thanks to the contributers of this thread).
But this is only "by chance".
I assume that there is so much more I still do bad, because I don't know about*.
And I think most of the Avidemux' users don't take as much time as I do,
because they just want to have results, quickly.

* Small example I just stumbled about (by chance!).
It makes a great difference in quality which kind of renderer one chooses in MPC-HC.
And depending on that choice, the renderer uses Intel's graphic driver's settings or not
(which - BY DEFAULT - do smoothing, blocking, color changing. They call it "enhancement").
I just discovered that by chance, with the thorough inspection concerning this thread.
I changed the HW about a year ago, not consciously noticing since then.
This-is-mad.

fish

#22
If you tell us what you hope to achieve it might be easier to trying to help. One thing you should give up on is trying to make the quality of the video 'better' than the original. You can alter the look to suit different playback methods but the original will always be the best quality.
What age is the DVD? Do you have a specific reason for cropping the video from the standard height/width ratio? 

franz.b

Hi everybody,
I found and read this very interesting discussion, I'm also fighting with the correct proportions of the video files.
My procedure is as follows: I start from a movie (typically from DVDs, but not only) with the black bands above and below and I delete them with a crop (to save some space occupied in storing the file, to respond to the previous question to another user), recode without resizing and apply the correct DAR in the mp4 container.
The problem is that the available DARs are not enough (the black bands have the most varied thicknesses ...) and there is no possibility to insert an arbitrary one neither with the mp4 container nor with mkv.
I partially remedied with Yamb but it sets the PAR and to use it I must also install all GPAC because otherwise the mp4box alone does not see many audio streams ... so I would prefer to find another small and simple tool to change the DAR ...
Do you have any advice for me?
Thank you

eumagga0x2a

Quote from: franz.b on April 23, 2020, 08:45:08 PM
there is no possibility to insert an arbitrary one neither with the mp4 container nor with mkv.

You can use an arbitrary DAR with MKV if you do a bit of maths to calculate the required display width from height of the video in pixels for the desired aspect ratio.

If you insist on cutting away the black bars, I would deinterlace first, outputting frame for field (frame rate doubling) if the content is interlaced, then scale to get square pixels and only then crop the black bars while keeping width and height a multiple of 16 (this is very important for compressibility).

franz.b

I thank you for the answer!
But I don't understand a passage, or how to resize to get square pixels.
For example, a movie typically has a resolution of 720x576 with a 16: 9 DAR and the black bands are 32 pixels thick.
I proceed as follows: after the crop a 720x512 remains without applying any AR Avidemux gives me back a movie with this resolution and square pixels and with a ratio 720/512 = 1.4 that has deformed images. By applying an appropriate DAR I get the correct image.
Otherwise I do a resize to 720x464 and I get square pixels and an undeformed image (if not minimally to have divisibility by 16). But in this case I no longer need to apply a DAR ...

The Avidemux interface shows me the images without applying DAR or PAR, I crop it on square pixels. Where am I wrong in my reasoning?

eumagga0x2a

In your example the original movie has a 2:1 aspect ratio padded with black bars to fill the standard 16:9 widescreen picture. In this case you should be able to do without scaling, i.e. crop the black bars to get 720x512 and save the re-encoded video using the MP4 muxer with forced display aspect ratio of 18:9 (don't forget about putting the deinterlacer first in case the source is interlaced!).

Else you can scale the source to 1024x576 to get square pixels, then crop the black bars and save without forcing aspect ratio.

franz.b

Thank you very much!
this example was deliberately simple, but if the final DAR was not exactly 2 or default values then can I just use the mkv muxer? or the resize.
for resize which method gives the best quality? enlarge the horizontal side or reduce the vertical one?
Thanks in advance

eumagga0x2a

Quote from: franz.b on April 26, 2020, 10:24:47 AM
this example was deliberately simple, but if the final DAR was not exactly 2 or default values then can I just use the mkv muxer?

Yes, you can.

Quoteor the resize.

This would be failsafe and avoid all compatibility issues from poor Matroska support in standalone devices.

Quotefor resize which method gives the best quality? enlarge the horizontal side or reduce the vertical one?

Always stretch, never compress.

franz.b

Quote from: eumagga0x2a on April 26, 2020, 11:05:06 AM
Quote from: franz.b on April 26, 2020, 10:24:47 AM

or the resize.

This would be failsafe and avoid all compatibility issues from poor Matroska support in standalone devices.
Thanks!
Is there a significant difference in the final quality?