Deinterlacing PAL from DV cam.
PAR loses flag, result is narrow frame.
Any way to restore PAR?
Now I just Spline64Resize width.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 23 of 23
Thread
-
Last edited by taigi; 18th May 2021 at 14:35.
-
Whether an aspect ratio flag is available or not depends on the exact format of both the video content and the container. Unfortunately you don't tell us any details. But I guess you don't save the deinterlacing result as DV in AVI again? If you would, a player would assume an aspect ratio due to the fact that there is DV in AVI.
A verbose MediaInfo report of both the original video and the deinterlaced result should be useful. -
Much depends on what apps your are working with.
Since you mention AVISynth (re: Spline64Resize), understand that AVISynth does not take into consideration any Aspect Ratios. Nor does it keep track of them, so cannot "restore". It merely operates academically on samples, which have no inherent ratio (as they are just data points).
For most apps, AR (whether PAR or DAR) is flagged when encoded and accommodated when decoded. AVISynth does neither of these, it just gets the piped-in data points from a decoder and pipes them out to an external encoder/app.
My guess is that since you are "deinterlacing" in AVISynth, you are not only decoding DV but are making adjustments on the samples at which point they are also uncompressed.
Since you will need to send the output to an encoder, you must tell the encoder if you want the image to have a non-square (aka not 1:1) AR. If you don't want an non-square AR, you will need to compensate on your own for the change in the footage by adjusting width or height.
Since I don't know what the result of your deinterlace looks like, it would be hard to tell what actual AR numbers to apply.
This also assumes that the codec and/or container you choose in your re-encoding will support AR flags. And some codecs/containers expect you to adjust PAR/SAR (Pixel or Sample AR) while others expect you to adjust DAR/FAR (Display or Frame AR), so it depends on your intended target format.
Example: if you are going to MPEG1, and your output is standard 4:3 SD 601 PAL size, your PAR would be: 59:54 or 1.0925:1. If you were going to MPEG2, you don't set the PAR but instead set the DAR, which would be 4:3 or 1.3333:1.
Scott -
Posting. Before and after QTGMC:
Before:
General
Complete name :
Format : AVI
Format/Info : Audio Video Interleave
Commercial name : DV
Format profile : OpenDML
File size : 4.48 GiB
Duration : 21 min 3 s
Overall bit rate mode : Constant
Overall bit rate : 30.4 Mb/s
Recorded date : 2017-05-20 21:44:14.000
Video
ID : 0
Format : DV
Codec ID : dvsd
Codec ID/Hint : Sony
Duration : 21 min 3 s
Bit rate mode : Constant
Bit rate : 24.4 Mb/s
Encoded bit rate : 28.8 Mb/s
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 FPS
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Bottom Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 2.357
Time code of first frame : 00:08:15:24
Time code source : Subcode time code
Stream size : 4.24 GiB (95%)
After:
General
Complete name :
Format : AVI
Format/Info : Audio Video Interleave
File size : 10.6 MiB
Duration : 1 s 0 ms
Overall bit rate : 89.0 Mb/s
Writing library : VirtualDub2 build 44282/release
Video
ID : 0
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High 4:4:4 Predictive@L6.2
Format settings : CABAC / 16 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 16 frames
Codec ID : H264
Duration : 1 s 0 ms
Bit rate : 87.3 Mb/s
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 5:4
Frame rate : 50.000 FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 4.212
Stream size : 10.4 MiB (98%)
Writing library : x264 core 157 r2935M 545de2f
Encoding settings : cabac=1 / ref=16 / deblock=1:0:0 / analyse=0x1:0x131 / me=esa / subme=9 / psy=0 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=0 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc=cqp / mbtree=0 / qp=0
Color range : Limited
Matrix coefficients : BT.470 System B, BT.470 System G -
For 16:9 720x576 you would use --sar 64:45 for full frame . If you have pillarboxing use --sar 16:11
"SAR" is the sample aspect ratio in MPEG4 terminology. It's analogous to what "PAR" is for MPEG2 -
Additional suggestion: You should not use H.264 video in an AVI container. It does not support all of the features of this video stream. You could instead select the file type "MP4 +faststart" in VirtualDub2. Both the MP4 container and MPEG-4 AVC (H.264) video are parts of the same standard, so the result shall be most compatible to many players. If you have audio too, you may prefer FFmpeg AAC or FFmpeg Lame MP3 from the audio compressors VirtualDub2 offers.
-
@taigi
Load your deinterlaced avi into clever FFmpeg-GUI, main, multiplex, set the target file, set DAR to 16:9, set container to mkv or mp4, click multiplex, done. -
Last edited by taigi; 19th May 2021 at 11:27.
-
Avi doesn't have a well-defined AR flag, it works terribly or not at all with VFR, and it doesn't properly support B-frames, among other legacy issues with filesize, etc. Remember, avi standard was created at end of the 80s/early90s. VFR didn't exist then and Bframes were barely out of the lab at that time.
Re:mp4, the container standard can contain uncompressed LPCM (not WAV, per se, as that is its own container format) and lossless as well. However, neither is common in mp4 so many/most apps are not designed to include support for it.
Scott -
There are two main problems with AVI:
Many programs use Microsoft's ancient Video For Windows (VFW) library to read AVI files. VFW is based on a one-frame-in-one-frame out model. So VFW can't handle out-of-order codecs (all modern high compression codecs) without a kludge.
In theory, the AVI spec is about as flexible and extensible as other modern containers*. It can handle variable frame rates, out-of-order codecs, and it already has an AR flag (that's essentially unsupported by any software). But Microsoft abandoned it 20 years ago (and attempt to replace it with a proprietary container that everyone would have to them pay royalties to use, ASF -- they eventually gave up on that) and without someone to define a standard on how all those features should work there's no software support for them.
* Avi and most modern containers are all loosely based on the IFF format, created in 1985. https://en.wikipedia.org/wiki/Interchange_File_FormatLast edited by jagabo; 19th May 2021 at 12:35.
-
Last edited by taigi; 20th May 2021 at 20:36.
-
mkvtoolnix gui
add file
select video track
in the video properties panel, set aspect ratio , select 16/9
push start multiplexing -
Last edited by taigi; 20th May 2021 at 20:35.
-
No, MKVtoolnix creates MKV.
Did you try to produce MP4 out of VirtualDub2, using its x264 codec (where you can enter SAR aspect ratio pairs)? -
Your deinterlaced output has several errors:
Source: Duration : 21 min 3 s
Output: Duration : 1 s 0 ms (probably faulty)
Source: Bit rate : 24.4 Mb/s
Output: Bit rate : 87.3 Mb/s (for 720x576 source an absolute nonsense, 2-3 MB/s are quite sufficient for x264 encoding).
Source: Bit depth : 8 bits
Output: Bit depth : 10 bits (Why 10 bits from a 8 bit source?)
I recommend you to re-do the deinterlacing with reasonable values. -
I don't know where to enter enter SAR aspect ratio pairs. Is that should be some line to add to h.264 settings?
Last edited by taigi; 20th May 2021 at 20:35.
-
There are the ratios, http://forum.doom9.org/showpost.php?p=716299&postcount=4, you enter them here
-
Thanks for an answer and useful notes.
Output Duration is short, because that was for demo purposes only. I would like to know how to manipulate Bit rate, but don't know. At the moment I try to mimicry the professional quality, so I'm afraid to loose anything by knowing only parts of stuff about video technology. That's why 10 bits instead of 8 - now I understand it - need to check bits before encoding too. Because I know from work on WAVs - if you use 24bits instead of 16bits you just add empty junk to the file improving nothing. The same with video files too probably. -
Thanks. Is DAR=SAR in this case?
Last edited by taigi; 20th May 2021 at 20:33.
-
-
It worked and had ended my confusion of few decades on how to restore PAR of DV camera footage, thanks, you all received +karma points.
-
Think of it this way: SAR (Sample AR) formerly PAR (Pixel AR) = the AR of the parts/elements, while DAR (Display AR) or FAR (Frame AR) = the AR of the whole.
Universal formula:
Code:DAR = Horiz / Vert * PAR
Code:FAR = Horiz / Vert * SAR
Scott
Similar Threads
-
What app can trim v210 codec in mov container and also retain PAR?
By digicube in forum EditingReplies: 3Last Post: 16th Apr 2021, 14:29 -
Another "How do I resize DVDs" thread (square pixels, DAR, PAR)
By sebastiaaan in forum DVD RippingReplies: 7Last Post: 20th Oct 2020, 08:30 -
Can I come to restore this video?
By ciccioschumacher in forum RestorationReplies: 120Last Post: 10th Apr 2018, 23:53 -
Can someone help me restore this
By Starfx in forum RestorationReplies: 10Last Post: 13th Aug 2017, 12:33 -
DVD's PAR and output display size explanation in Handbrake
By Superfrank in forum Video ConversionReplies: 3Last Post: 11th Feb 2017, 17:27