SD video aspect ratios, please finally make them right!

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
SF01
New Cone
New Cone
Posts: 5
Joined: 26 Aug 2020 18:41

SD video aspect ratios, please finally make them right!

Postby SF01 » 26 Aug 2020 19:02

4:3 and 16:9 aspect ratios, we all know them.
But 720x576/480 SD videos do not directly use them.
In neither PAL, not NTSC the active image is conaines in the full 720 samples.

ITU-R document REC.470 specifies the length of video signal in PAL and NTSC, which is 52 and 52,(148) microseconds respectively. Now when we sample those lines with 13,5MHz sample rate specified by REC.601 what do we get? 702 and 704 samples respectively.
The active video in PAL and NTSC SD video is 702x576 and 704x480 respectively. And it is those reaolutions, not the full-width 720 samples that must be subjected to 4:3 or 16:9 aspect ratio to produce properly stretched images.
OK, but what are the remaining 18, or 16 pixels? It's called digital blanking, a digital equivalent of nomial analog blanking and the Sequence Display Extension part of MPEG2 specification takes care of it by specifiing the active part of the image, the blanking is then cropped.

OK, but what about DV video from camcorders? Those have video in full 720 line. Yes, but still REC.601 compliant, instead of recording video in 702 samples and padding it black, the DV records the full 53,333 microseconds line, which sampled at 13,5MHz frequency gives 720 samples, so that the video is 720x576/480 and does not have to be resized to be burned on DVD, the backwards compatibility with REC.470 allows hooking up the camcorder to a TV with analog jacks and the image is properly displayed. There was a BBC article about it with test patterns.

And what does VLC do?
It displays 720x576 video as 768x576 and 1024x576 frames, technically simple calculation from 4:3 and 16:9 aspect ratio, but this does not take into account that only the 702x576 portion of the image is to be expanded with those aspect ratios resulting in 787x576 and 1049x576 images with added blanking.

It's even worse with NTSC, instead of displaying 640x480 from 704x480 active area VLC somehow makes an image that is 720x540 and the NTSC lines of resolution are gone. The 720x480 should therefore be displayed as 654x480 with blanking at sides, I will skip the calculatiosn for widescreen NTSC.

So VLC should be updated to first check if the 4:3, or 16:9 video isn't by any chance 720x576/480 and if so it should use more precise aspect ratios to take into account that the active image is not the 720 samples, but 702, or 704 and expand accordingly. And definitely not as 720x540... The MPEG closest 704x576 to PAL's 702x576 is yet another example that requires separate calculations.

Not to mention when I correct the aspect ratio with the values I have input as additional aspect ratios and take a screenshot, the aspect ratio is not respected and I get 720x540, or 768x576, etc resolutions which are not square pixel, but slightly distorted image.

Two referances:
https://bjohas.de/wiki/Tutorials/Video/ ... pect_Ratio
https://web.archive.org/web/20130328121 ... sion_table

So after all those years of existance of REC.470, REC.601 and SD video, could somepne please correct VLC's behaviour to be finally compliant with those two standards of SD video?
At least for aspect ratios, the cropping of blanking is not nessesary, because sometimes the source is DV video that has the full width of 720 samples filled with video.
Somehow Vegas Pro can decode and encode proper pixel aspect ratios for DV and MPEG2 program stream renders...

ionlywatch
New Cone
New Cone
Posts: 3
Joined: 20 Dec 2022 09:05

Re: SD video aspect ratios, please finally make them right!

Postby ionlywatch » 20 Dec 2022 09:06

Same issue here. So VLC still can't properly handle DVD formats in 2022? lol.

SF01
New Cone
New Cone
Posts: 5
Joined: 26 Aug 2020 18:41

Re: SD video aspect ratios, please finally make them right!

Postby SF01 » 20 Dec 2022 13:10

Wow, it's been 2 years and nobody did anything.
Then again, DVDs are either obsolete, mass produced in Region 0 NTShitC, even for Europe, to cut on production costs, so as not to create 2 masters and order two batches of pressings and are no longer compliant with REC.601 and 470...

ionlywatch
New Cone
New Cone
Posts: 3
Joined: 20 Dec 2022 09:05

Re: SD video aspect ratios, please finally make them right!

Postby ionlywatch » 20 Feb 2023 10:12

Mentioned in issue 11534, 19130 and perhaps 25961 not sure if those are the exact same problems, although closed.
Man, differences between SAR/DAR/PAR are confusing.

SF01
New Cone
New Cone
Posts: 5
Joined: 26 Aug 2020 18:41

Re: SD video aspect ratios, please finally make them right!

Postby SF01 » 20 Feb 2023 11:01

Nope, those are unrelated.
They can be confusing indeed.

ionlywatch
New Cone
New Cone
Posts: 3
Joined: 20 Dec 2022 09:05

Re: SD video aspect ratios, please finally make them right!

Postby ionlywatch » 13 Sep 2023 18:01

How to tell if a 720x480/720x576 video is actually BT.601/NTSC/PAL compliant? Let's say, could be reading from a DVD.iso with metadata?
  • 29.976 vs 25 hz
  • YIQ vs YUV, YCC
  • details of NTSC-J, other sub-variations
what else? does all the things above logically makes it a "true" SD video?

SF01
New Cone
New Cone
Posts: 5
Joined: 26 Aug 2020 18:41

Re: SD video aspect ratios, please finally make them right!

Postby SF01 » 13 Sep 2023 20:51

"Untrue" SD videos are non-compliant with ITU-R REC.601 and thus should not be supported in the first place. Lack of support would diminish the prevalence.
The default should be playback compliant with the standard in the first place, rather than exotic, non-standard SARs.

Lotesdelere
Cone Master
Cone Master
Posts: 10002
Joined: 08 Sep 2006 04:39
Location: Europe

Re: SD video aspect ratios, please finally make them right!

Postby Lotesdelere » 14 Sep 2023 14:37

How to tell if a 720x480/720x576 video is actually BT.601/NTSC/PAL compliant?

For a video file, usually 720x480 is NTSC and 720x576 is PAL.
23.97 FPS, 29.97 FPS and 59.94 FPS are NTSC while 25 FPS and 50 FPS are PAL.


Let's say, could be reading from a DVD.iso with metadata?

By definition a video DVD must be compliant otherwise it wouldn't play on some hardware DVD players.
Check the specifications:
https://en.wikipedia.org/wiki/DVD-Video

SF01
New Cone
New Cone
Posts: 5
Joined: 26 Aug 2020 18:41

Re: SD video aspect ratios, please finally make them right!

Postby SF01 » 14 Sep 2023 19:17

How to tell if a 720x480/720x576 video is actually BT.601/NTSC/PAL compliant?

For a video file, usually 720x480 is NTSC and 720x576 is PAL.
23.97 FPS, 29.97 FPS and 59.94 FPS are NTSC while 25 FPS and 50 FPS are PAL.


Let's say, could be reading from a DVD.iso with metadata?

By definition a video DVD must be compliant otherwise it wouldn't play on some hardware DVD players.
Check the specifications:
https://en.wikipedia.org/wiki/DVD-Video
Compliant to DVD-Video/Audio standard, not nessesarily to ITU-R specification. You can put any encoded video there as long as it's 480/576 and specified width, because apart from 720, other values are allowed, such as 704, or 352.
There os no mechanism to prevent a DVD from authoring, or playing if the SAR is different than as per ITU-R REC.601, as players will only output the samples without converting them to square pixels. It's up to the display device to correctly interpret the signal, key word: correctly. The signal output over analog connector will obviously be compliant to ITU-R REC.470, because it needs to be converted from DVD to analog first, so it will be properly displayed on CRT displays (whether 4:3, or 16:9).


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 49 guests