AVI to MP4 frame size, rectangle vs. square pixels?
Hi All,
I have captured some VHS tapes at a resolution of 720x576 using the Hauppauge, which enables me to capture and compress to mp4 in real time, which is fine, as I do not wish to perform any restoration, just very simple capture, compress, and share with the family. I have also captured some 8mm tapes using DV, which are captured at 720x576 but these are saved as an AVI, which is also fine. However, these files are large and I am wanting to compress them to mp4 for upload etc. The problem/misunderstanding I have is the AVI when compressed to mp4 are now 768x576, even though I am "maintaining" the same output size. I have done some research online and believe this is due to the AVI using rectangular pixels while the mp4 uses square pixels, but I don't understand the implications of this. What I am wanting to know is if a 720x576 AVI is the equivalent to a 768x576 mp4, or should I be capturing my AVI at a different resolution? I am PAL by the way. Apologies if I have any of the terminology incorrect or have used poor choice of words in describing my situation. |
Quote:
The video is displayed (DAR) as 4x3. The video is stored (SAR) as 5x4. Files can have two AR (aspect ratios). Analog is ideally captured max SD PAL of 720x576, and DVD/BD requires it. But it displays 5x4 if rectangle viewed square, usually due to no AR flags, of which lossless AVI does not have. MPEG/H.264 has AR flags, so you can make it any size, display any different size. But online streaming sites like Youtube are strictly 1x1 AR. Lots of my local videos are MKV flagged to different AR in the container, and watchable just fine on local LAN using BD player or WDTV or computer. But for Youtube, I'd have to reencode compliant to their 1x1 requirements. 768x576 is just 4x3 square pixels. 720x576 is rectangle. I know, lots of jargon and terms, but that's video. Understand all that? :) |
Quote:
Here are some SAR values for the 4:3 frame: NTSC: 720x480 (DV/DVD, Full frame) -> SAR=8/9 704x480 (Analog Capture, SD Crop) -> SAR=10/11 640x480 (Square pixel, SD Resize) -> SAR=1 PAL/SECAM: 720x576 (DV/DVD, Full frame) -> SAR=16/15 704x576 (Analog Capture, SD Crop) -> SAR=12/11 768x576 (Square pixel, SD Resize) -> SAR=1 The general formula is: SAR = 4:3 x (V resolution : H resolution) Example: Code:
ffmpeg -i In.avi -vf "scale=w=-1:h=-1:interl=1,format=yuv420p,setsar=SAR=10/11" -flags +ildct+ilme -c:v libx264 -crf 18 -x264opts bff=1:colorprim=smpte170m:transfer=smpte170m:colormatrix=smpte170m:force-cfr -c:a aac -b:a 192k Out.mp4 |
Thanks for this. I've been battling with this off and on for a while, and have now printed off your handy reference chart to keep at the computer. Cheers.
|
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.