720x576 to Fit Screen

Anything and everything to do with DCP-o-matic.
Carsten
Posts: 2648
Joined: Tue Apr 15, 2014 9:11 pm
Location: Germany

Re: 720x576 to Fit Screen

Post by Carsten »

Dealing with this problem, I noticed there is a small bug/interpretation issue in DCP-o-matic with some (few) non-square pixel sources. The only real world source for this kind of media should be DVDs and DV/MiniDV or D1 video. These may come in two different display aspect ratios: 4:3 and 16:9.
However, BOTH are non-square pixel rasters as stored on the DVD or tape (there is a term 'SAR' for 'storage aspect ratio').

The native DVD/PAL pixel raster is 720/576 and as such has an aspect ratio of 1.25:1 per pixel count (720 divided by 576), however, the pixel aspect ratio for DVD is 1.07:1 (1.09:1 for DV/D1 video). So, the stored 1.07:1 720/576 pixel raster is expanded for display to 768/576, which is 1.33:1 (4:3). Check: 1.25*1.07=1.33.

For DVDs in 16:9, the pixel raster is the same, 720/576 and 1.25:1, but the pixel aspect ratio is 1.42:1. Check: 1.25*1.42=1.77 (16:9).

Unfortunately, currently DCP-o-matic is using the native pixel raster aspect ratio, or 'SAR' for scaling with the 'no stretch' option (and cropping), not the (expanded) display aspect ratio. As a result, there is a slight skew when scaling non-square pixel sources to free aspect ratios. 1.07 is not such a huge error, but still, Carl has acknowledged the issue and it seems a fix is easy. I think both scaling and cropping should be based on the expanded display aspect ratio (which is also compliant with the preview window, which, naturally, uses the display aspect ratio).

This doesn't happen when using the fixed aspect ratios from the Scale To: list, like 1.33, 1.66, 1.77, flat, scope, etc.
Unfortunately, there are quite a few releases with non-standard aspect ratios (letter and/or pillar boxed), not fitting the standard ratios. These should be converted with the 'no stretch' option, and suitable cropping. However, because of that interpretation bug, it currently results NOT in a 'non-stretched' scaling, but a 'slightly stretched' scaling, thereby missing the intended aspect ratio. This is the case for the example that lead to this thread (1.6:1, which is not part of the discrete scale-to: list).

Note this doesn't happen for Bluray sources, as (aside from some exotic anamorphic home video releases), Bluray does not use non-square pixels, so, for most HD sources, you should be safe.

Note there is one HD format which also uses non-square pixels: HDV with 1440/1080 native pixel raster and a pixel aspect ratio of 1.33:1, which will suffer from the same issue. HDV, however, is not used on commercial media, but on some HDV camcorders and digital cameras. As such, one would only very rarely find HDV footage pillar- or letterboxed in non-standard aspect ratio - the 'usual' HDV source will be full screen and can be scaled correctly using the 16:9/1.77 scaling option, so 'no-stretch' will hardly ever be needed for typical HDV footage. HDV expands to a display aspect ratio of 1920/1080, so, a standard 16:9 HD format.
Still, if HDV scaling is causing problems, and until Carl has solved the issue, it would probably be wise to first convert the source video to a square pixel format (e.g. using handbrake), and then convert to DCP with DCP-o-matic.

I know this is a very specific issue that many users will have a hard time to understand properly, especially since it typically only causes a small visual error that many will likely overlook (at least with 4:3/1.07/1.09 PAR). However, if you are doing conversions that are meant to last (e.g. archival work), you should probably think twice.
This problem will be made worse if the actual aspect ratio of the content in question is more or less 'somewhere between' two existing fixed aspect ratios. One prominent example could be a 70mm feature (2.2:1) letterboxed on a 16:9 DVD. In that case, the mismatch will be very bad, as the closest supplied fixed aspect ratios would be 1.90:1 or 2.35:1, both are too far away from 2.2:1 to be acceptable.

Again, I guess Carl will have this fixed soon.

- Carsten
Last edited by Carsten on Mon Nov 11, 2019 3:05 pm, edited 13 times in total.
hein
Posts: 15
Joined: Tue Sep 10, 2019 9:34 am
Location: Portugal

Re: 720x576 to Fit Screen

Post by hein »

Couldn't manage it on time.
I choose to adjust the image width although i couldn 't use all the creen height.
Need to recheck your suggestions and try again.
I'll keep in touch.
hein?!
Carsten
Posts: 2648
Joined: Tue Apr 15, 2014 9:11 pm
Location: Germany

Re: 720x576 to Fit Screen

Post by Carsten »

You should have been able to do it replicating my settings?

I have a similar video in my test files folder, a 1.71:1 image in a 4:3 DVD 'container'.

With the current mentioned limitation in no-stretch, you can only get a 'decent' result that doesn't offend anyone visually. Either by introducing a small amount of stretch (in your case), or by having some letterboxing and pillarboxing.

Simply because there is no stretch factor available that allows to fill the screen vertically without some distortion.
The 'no-stretch' was initially introduced to cover non-standard aspect ratios as we find them on many DVDs and Blurays. As said, it works right for square pixels, but currently not with what we find typically on DVDs.

- Carsten
vlcsnap-2019-10-23-13h53m39s558.png
vlcsnap-2019-10-23-13h53m39s558.png (533.48 KiB) Viewed 4417 times
Bildschirmfoto 2019-10-23 um 14.00.28.png
Bildschirmfoto 2019-10-23 um 14.00.28.png (484.97 KiB) Viewed 4416 times
Bildschirmfoto 2019-10-23 um 14.15.29.png
Bildschirmfoto 2019-10-23 um 14.15.29.png (641.57 KiB) Viewed 4414 times
Last edited by Carsten on Fri Oct 25, 2019 12:26 pm, edited 2 times in total.
Carsten
Posts: 2648
Joined: Tue Apr 15, 2014 9:11 pm
Location: Germany

Re: 720x576 to Fit Screen

Post by Carsten »

This is the only way currently to get this file right as far as proportions go - we have some remaining letterboxing. In this case, it is not too bad.
I scale to 1.66:1 - by leaving some black bars in the scaled content, the actual picture maintains its original 1.71 aspect ratio.
Admittedly, I had to think quite a bit about that one, too...

- Carsten
Bildschirmfoto 2019-10-23 um 14.22.57.png
Bildschirmfoto 2019-10-23 um 14.22.57.png (808.21 KiB) Viewed 4410 times
Carsten
Posts: 2648
Joined: Tue Apr 15, 2014 9:11 pm
Location: Germany

Re: 720x576 to Fit Screen

Post by Carsten »

Issue solved in 2.15.30. Perfect cropping, very easy, even with asymmetric cropping on all sides, perfect aspect ratio is maintained.
Bildschirmfoto 2019-11-09 um 22.56.44.png
Bildschirmfoto 2019-11-09 um 22.56.44.png (820.27 KiB) Viewed 4282 times
And when I started playing with the 'No stretch' option now working properly with square and non-square pixel content, I noticed how easy it is now to scale ANY content properly - just use 'No stretch'.

- Carsten
Post Reply