Incorrect SAR Reporting in FFprobe for NTSC DVD Format
When working with video files, it's essential to understand the various aspects that make up their properties. One such aspect is the Pixel Aspect Ratio (PAR), which relates to the proportional relationship between the width and height of each pixel in a video frame. However, FFprobe, a powerful tool for probing media files, can sometimes report an incorrect SAR (Sample Aspect Ratio) value for NTSC DVD format videos when compared to QuickTime Player.
SAR vs PAR: Understanding the Difference
SAR refers to the ratio of pixel width to pixel height as they are stored in the file, whereas PAR is the actual width-to-height ratio of the pixels when displayed on a screen. For square pixels (where the width and height of each pixel are equal), SAR and PAR are the same.
In the context of NTSC DVDs, the SAR is typically 10:11, while the PAR is 0.91:1. However, FFprobe may report a SAR value of 40:33, causing confusion for users. This discrepancy arises due to the way that FFprobe calculates SAR values, which considers the entire display area, rather than just the active pixels.
NTSC DVD Format and Its Implications
The NTSC (National Television System Committee) standard was used in the United States and Canada for analog television broadcasting. When it came to DVDs, the format had to adhere to the standard's constraints while also addressing issues such as overscan (where a portion of the displayed frame is cut off) and cross-conversion between different display formats.
The NTSC DVD format uses anamorphic video encoding, which vertically stretches the image so that it can fit within the display area of a typical NTSC TV. The actual content is encoded with an aspect ratio of 720:480 (for a 4:3 picture) but is displayed with the correct PAR only when the TV or player stretches the image vertically to its correct proportions.
FFprobe and Incorrect SAR Reporting
The FFmpeg project includes FFprobe, a powerful media analysis tool. When a user probes an NTSC DVD video file with FFprobe, the SAR value reported may differ from the value of 10:11 that is expected in the NTSC DVD specification.
$ ffprobe input.dvd
...
Stream #0:0(eng): Video: mpeg2video (Main), yuv420p(tv, top first), 720x480 [SAR 40:33 DAR 16:9], ...
The discrepancy between the expected SAR value and the one reported by FFprobe can lead to confusion. However, this value is calculated by considering the entire display area of the video, rather than the active pixels.
QuickTime Player and SAR Reporting
QuickTime player, on the other hand, seems to report the correct SAR value for NTSC DVD videos when probed through the command line.
$ /path/to/QuickTime\ Player.app/Contents/MacOS/qtplayer -headless -print_metadata input.dvd
...
st: Han cups hand over head in surprise styp:mvhd stco:0 1450400 stsz:7776 1450400 stts:480 2880 stss:1 480 19992975 stsh:0 19992991 stsc:1 480 1999299 1 1999299 2 999647 1 1999299 3 999648 1 1999299 4 999648 1 1999299 5 999648 1
...
<key>displaymatrix</key><value><array><array>1 10 0
11 1 0
0 0 1</array></array></value>In the QuickTime Player metadata, the SAR is correctly reported as 10:11, without considering the entire display area, leading to the expected value for the NTSC DVD format.
Although FFprobe reports SAR in a different manner than QuickTime Player for NTSC DVD format files, the value reported by FFprobe does not signify incorrect calculations. It differs because FFprobe considers the entire display area, whereas QuickTime Player considers only the active pixels.