Preserve the best picture with anamorphic 576p source

Started by Mick, March 16, 2022, 04:15:46 PM

Previous topic - Next topic

Mick

How do you handle source material that's anamorphic, if you want to preserve the best picture quality with Avidemux?

Video is a DVD with anamorphic picture in 720x576 pixels.
Cropping results in 704x438 px, to get rid of black bars.


Now I would need help with resizing, because resize filter swsResize in Avidemux has no setting for anamorphic widescreen images.

In order to desqueeze the image, I simply have to change width to 2.35 times the size of height, isn't it?


Is this the way to go to keep the best picture quality possible?

eumagga0x2a

Quote from: Mick on March 16, 2022, 04:15:46 PMHow do you handle source material that's anamorphic, if you want to preserve the best picture quality with Avidemux?

I keep it anamorphic and specify the appropriate pixel and/or display aspect ratio via container metadata and video codec VUI. If the video is interlaced, I prefer to deinterlace it when I need to re-encode it anyway, however.

edit: I scale it to square pixels only if I am sure that the target device or platform doesn't support pixel aspect ratio or display aspect ratio metadata.

Quote from: Mick on March 16, 2022, 04:15:46 PMCropping results in 704x438 px, to get rid of black bars.

Using dimensions which are not a multiple of 16 is detrimental to compressibility (if you wonder why we widely use FullHD resolution which is 1920x1080, the height of the video is actually 1088, but the output is cropped to 1080).

Mick

Thank you for your answer.

Sure, you can always keep it anamorphic, but when Resizing it's better to fix DAR/PAR i guess.

Quote from: eumagga0x2aedit: I scale it to square pixels only if I am sure that the target device or platform doesn't support pixel aspect ratio or display aspect ratio metadata.

That is what I want to make sure with Avidemux. Is it possible to add widescreen formats like 2.35:1 to swsResize and Crop filters?


Quote from: eumagga0x2aUsing dimensions which are not a multiple of 16 is detrimental to compressibility (if you wonder why we widely use FullHD resolution which is 1920x1080, the height of the video is actually 1088, but the output is cropped to 1080).

That's a good point I adjusted that to my tests.

eumagga0x2a

Quote from: Mick on March 20, 2022, 07:36:38 AMSure, you can always keep it anamorphic, but when Resizing it's better to fix DAR/PAR i guess.

If you need square pixel, then you should select the appropriate PAR option in the swsResize filter (should be probably "PAL 720:576 DAR 16:9 PAR 64:45" for the source and 1:1 for the target). The crop filter should be next in the chain. Don't forget to put a deinterlacer at the very first position if the source is interlaced!

Quote from: Mick on March 20, 2022, 07:36:38 AMIs it possible to add widescreen formats like 2.35:1 to swsResize and Crop filters?

The Crop filter has 21:9 in the list of standard DAR values. I don't understand why you ask about the swsResize filter. That filter facilitates translation between popular PAR values, independently of the resulting DAR.

alexstorm

#4
You could crop and then use a filter to resize the pixels to work for 2.35.  If you put 438 height and 2.35 AR into the calculator at: https://www.producerelease.com/blu-ray/parcalc.htm#v

You get 1030 x 438 or if you want to keep to the 16 pixel rule, which is a good idea, then the alternate option is shown as 1072 x 456 or 1024 x 436.  Of course, enlarging or reducing the original, there will be some sharpness loss.  This is why the ideal would be to take from a larger master and then reduce to size.

If you don't change AR to a new original pixel and you set the Target ratio instead, this will inform a 3rd party player like VLC, which reads the metadata inside the file, as to what ratio to use for playback, but that doesn't work for HTML playback on a webpage.  This target ratio will just be ignored and playback will go back to the squished version.

You can use a filter to actually resize the Aspect Ratio.  It's further down the filter list and then set the Resize Dimensions to the 2.35 AR, needed, that you get from the calculator.  This video copy will now playback on a web page in it's correct AR.

The page above is my page for working with AR in AVIDemux.

Hope that helps.

Mick

Quote from: alexstorm on March 28, 2022, 07:50:28 PMYou could crop and then use a filter to resize the pixels to work for 2.35.  If you put 438 height and 2.35 AR into the calculator at: https://www.producerelease.com/blu-ray/parcalc.htm#v
[...]
The page above is my page for working with AR in AVIDemux.

Great description! Thank you.