I've been experimenting with this now for over a week.
I'm using Hybrid for everything that's not just the FFmpeg command line.
Here's a frame from a 50 fps progressive interlaced PAL DVD (720:576, 25 fps full frame). It's anamorphic 16:9, but I have not "desqueezed" this, it's 1:1.
DVD is 1:1 ripped and put into mkv container. Audio stream discarded for test.
FFmpeg on command line at default (nothing specified for deinterlacing):
ffmpeg.exe -fflags +genpts -i "input.mkv" -profile:v high -level 4.2 -preset veryslow -crf 8 "output.mp4"
Hybrid using ffmpeg deinterlacer option:
Hybrid using Yadifmod:
Hybrid using QTGMC with no smoothing (worst result):
Hybrid using QTGMC with smoothing set to 1:
Looking at the old dude's hair, aliasing/ringing artifacts around the dark suit shoulders and fine detail, FFmpeg seems to be giving the superior results here.
Hybrid x264 encoding is set to the same as FFMpeg:
I know Hybrid has a reputation for having bugs that produce wrong scripts, in this case I checked all the Vaporsynth scripts and cross referenced to the various wikis and all options and flags seemed to be set correctly.
What is FFMpeg actually doing to deinterlace when no options are specified?
This frame was extracted with ffmpeg -i frame.mp4 -r 1/1 frame%06d.png. It's the same frame number and the output videos all have the exact same length and number of frames as the original (full frames), so I'm not sure why some of the results have slightly offset frames.
If you save these images and prefix them with 01, 02, etc., and open them in irfanview, and use the space bar to backspace key to advance each image, you can compare the results much easier. Resize the images 3 or 4 times using lanczos to see finer detail better.
Thoughts? Anything I'm missing or doing wrong? I'm at the point now where I just feel it's best to use FFmpeg without any interlacing options set to go to x264 and let it deinterlace with its default settings (whatever they are).
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 13 of 13
Thread
-
Last edited by Corvius; 16th Mar 2020 at 13:14.
-
What exactly do you mean with '50fps progressive interlaced PAL DVD'? Do you mean progressive video content, encoded (or flagged) as interlaced?
If the video is progressive (I assume it is, but I might be wrong) it should NOT be deinterlaced. In your first example the ffmpeg commandline does not deinterlace, which makes sense.
As has been suggested by manono, please upload a sample of a few seconds duration of the original. -
Clip from ripped VOB files, no reencoding.
Code:General Count : 331 Count of stream of this kind : 1 Kind of stream : General Kind of stream : General Stream identifier : 0 Count of video streams : 1 Video_Format_List : MPEG Video Video_Format_WithHint_List : MPEG Video Codecs Video : MPEG Video Complete name : E:\USER\fin\IFD\DVD Source\orig_dvd_clip.m2v Folder name : E:\USER\fin\IFD\DVD Source File name extension : orig_dvd_clip.m2v File name : orig_dvd_clip File extension : m2v Format : MPEG Video Format : MPEG Video Format/Extensions usually used : mpgv mpv mp1v m1v mp2v m2v Commercial name : MPEG Video Format version : Version 2 Internet media type : video/MPV File size : 4649286 File size : 4.43 MiB File size : 4 MiB File size : 4.4 MiB File size : 4.43 MiB File size : 4.434 MiB Duration : 9880 Duration : 9 s 880 ms Duration : 9 s 880 ms Duration : 9 s 880 ms Duration : 00:00:09.880 Duration : 00:00:09:22 Duration : 00:00:09.880 (00:00:09:22) Overall bit rate mode : VBR Overall bit rate mode : Variable Overall bit rate : 3764604 Overall bit rate : 3 765 kb/s Frame rate : 25.000 Frame rate : 25.000 FPS Frame count : 247 Stream size : 0 Stream size : 0.00 Byte (0%) Stream size : Byte0 Stream size : 0.0 Byte Stream size : 0.00 Byte Stream size : 0.000 Byte Stream size : 0.00 Byte (0%) Proportion of this stream : 0.00000 File creation date : UTC 2020-03-16 22:33:55.917 File creation date (local) : 2020-03-16 18:33:55.917 File last modification date : UTC 2020-03-16 22:34:13.547 File last modification date (local) : 2020-03-16 18:34:13.547 Video Count : 378 Count of stream of this kind : 1 Kind of stream : Video Kind of stream : Video Stream identifier : 0 Format : MPEG Video Format : MPEG Video Commercial name : MPEG-2 Video Format version : Version 2 Format profile : Main@Main Format settings : BVOP Format settings, BVOP : Yes Format settings, BVOP : Yes Format settings, Matrix : Default Format settings, Matrix : Default Format settings, GOP : M=3, N=13 Format settings, picture structure : Frame Internet media type : video/MPV Duration : 9880 Duration : 9 s 880 ms Duration : 9 s 880 ms Duration : 9 s 880 ms Duration : 00:00:09.880 Duration : 00:00:09:22 Duration : 00:00:09.880 (00:00:09:22) Bit rate mode : VBR Bit rate mode : Variable Bit rate : 3764604 Bit rate : 3 765 kb/s Maximum bit rate : 8500000 Maximum bit rate : 8 500 kb/s Width : 720 Width : 720 pixels Height : 576 Height : 576 pixels Sampled_Width : 720 Sampled_Height : 576 Pixel aspect ratio : 1.896 Display aspect ratio : 2.370 Display aspect ratio : 2.40:1 Frame rate : 25.000 Frame rate : 25.000 FPS Frame count : 247 Standard : PAL Color space : YUV Chroma subsampling : 4:2:0 Chroma subsampling : 4:2:0 Bit depth : 8 Bit depth : 8 bits Scan type : Interlaced Scan type : Interlaced Scan order : TFF Scan order : Top Field First Compression mode : Lossy Compression mode : Lossy Bits/(Pixel*Frame) : 0.363 Delay : 6010240 Delay : 1 h 40 min Delay : 1 h 40 min 10 s 240 ms Delay : 1 h 40 min Delay : 01:40:10.240 Delay_Settings : drop_frame_flag=0 / closed_gop=0 / broken_link=0 Delay_DropFrame : No Delay, origin : Stream Delay, origin : Raw stream Time code of first frame : 01:40:10:06 GOP, Open/Closed : Open GOP, Open/Closed : Open Stream size : 4649286 Stream size : 4.43 MiB (100%) Stream size : 4 MiB Stream size : 4.4 MiB Stream size : 4.43 MiB Stream size : 4.434 MiB Stream size : 4.43 MiB (100%) Proportion of this stream : 1.00000 Buffer size : 229376 colour_description_present : Yes colour_description_present_Source : Stream Color primaries : BT.601 PAL colour_primaries_Source : Stream Transfer characteristics : BT.470 System B/G transfer_characteristics_Source : Stream Matrix coefficients : BT.470 System B/G matrix_coefficients_Source : Stream intra_dc_precision : 10
-
As I suspected your video is progressive and should therefore not be deinterlaced. Any forced deinterlacing does just worsen the quality. It was encoded and flagged as interlaced for DVD standards compliance only.
-
[QUOTE=Sharc;2576633] The sample video below isn't mine, but it came from a forum where someone posted a capture of a "true" captured analog interleaved signal.
If I run the ffmpeg command on it:
ffmpeg.exe -fflags +genpts -i "Example_Interlaced.avi" -profile:v high -level 4.2 -preset veryslow -crf 8 -vf format=yuv420p "Example_Interlaced.mp4"
...it does deinterlace it.
Edit - OK, while it does convert it to "progressive" it obviously didn't really deinterlace it because there are combing artifacts all over the result. :PLast edited by Corvius; 16th Mar 2020 at 18:03.
-
-
[QUOTE=Corvius;2576637][QUOTE=Sharc;2576633]
The sample video below isn't mine, but it came from a forum where someone posted a capture of a "true" captured analog interleaved signal.
If I run the ffmpeg command on it:
ffmpeg.exe -fflags +genpts -i "Example_Interlaced.avi" -profile:v high -level 4.2 -preset veryslow -crf 8 -vf format=yuv420p "Example_Interlaced.mp4"
...it does deinterlace it. -
You understood wrong. While virtually all PAL DVDs are encoded as interlaced, the content itself is often progressive. You don't look at the interlaced flag but the frames to determine whether or not your DVD is interlaced.
The story is somewhat different for NTSC DVDs.
Can you please share how you are able to tell that a DVD's video is "progressive and should not be deinterlaced" for someone like me who is confused on this point. -
Separate the fields (or bob deinterlace) and step through the pictures. Select a scene with motion.
If there is motion between the pictures (like a b c d e ….)your video is interlaced.
If every picture has a duplicate (like aa bb cc dd …..) the video is progressive.
avisynth script:
Code:….your source filter here …. assumeTFF() #or assume BFF separatefields() # or use a bobber
or use manono's method. It's simpler -
But yours is more thorough as it'll catch phase-shifted videos as well. I decided not to go into that but just answer the fellow's question so he could do it himself as easily as possible.
It doesn't look as if he uses AviSynth so using VDub2 for the job should be pretty easy for him. Or a non-deinterlacing player. -
Well, this is embarrassing. FFMpeg looks best because it didn't deinterlace, because my content was not interlaced.
I found this, in addition to the above posts, I found it to be extremely helpful.
https://tommycatkins.com/2020/Neuron2_Video_Frame_Structure.htm -
Btw. for encoding your interlaced 'Example_interlaced.avi' correctly as interlaced your ffmpeg commandline should be like
Code:ffmpeg.exe -i "Example_Interlaced.avi" -flags +ilme+ildct -top 1 -profile:v high -level 4.0 -preset veryslow -crf 18 -vf format=yuv420p "Example_Interlaced.mp4"
Edit:
And once we are at it:
For single rate (29.97fps) deinterlacing you could try
Code:ffmpeg.exe -i "Example_interlaced.avi" -preset slow -crf 18 -filter:v "bwdif=mode=0, format=yuv420p" "Example_deinterlaced.mp4"
Code:ffmpeg.exe -i "Example_interlaced.avi" -preset slow -crf 18 -filter:v "bwdif=mode=1, format=yuv420p" "Example_bobbed.mp4"
Last edited by Sharc; 17th Mar 2020 at 05:34.
Similar Threads
-
Deinterlacing & saving HD footage from pro cameras (QTGMC ffmpeg question)
By HighDeaf in forum Video ConversionReplies: 8Last Post: 23rd Mar 2020, 21:22 -
Issues with UEFI defaults being loaded
By bevills1 in forum ComputerReplies: 5Last Post: 5th Sep 2019, 13:59 -
(Willing to pay)ffmpeg Need help downloading live stream ffmpeg and rtmp
By grabyea in forum Video Streaming DownloadingReplies: 0Last Post: 10th Apr 2016, 17:54 -
MPC always defaults to English subtitles
By Starbuck1991 in forum SubtitleReplies: 1Last Post: 10th Apr 2016, 14:08 -
Question about FFMPEG deinterlacing methods
By Videogamer555 in forum RestorationReplies: 1Last Post: 25th Feb 2016, 12:01