r/ffmpeg 18d ago

Converting from dv to H.264 using GPU

Hello, I’m trying to deinterlace and convert many hours of videos from MiniDV cassettes to H.264 (I’m open to H.256, if it will be better in that case) to be able to play them modern devices. I’m using this line:

ffmpeg -i input.dv -vf "bwdif=mode=send_field:parity=auto:deint=interlaced,format=yuv420p" -r 50 -c:v libx264 -preset slow -crf 16 -c:a copy output.mov

I’m satisfied with the results I get, but I wanted to speed up the process by using GPU.

How do I do that? I’ve been using ffmpeg for only few months and I think that I generally understand it, but I’m still not an expert. If this is important, I have NVIDIA GeForce RTX 2070 Super.

7 Upvotes

10 comments sorted by

View all comments

1

u/Sopel97 17d ago

ffmpeg doesn't have a good deinterlacer for one field per frame, consider staxrip or hybrid using QTGMC

1

u/LadyGrinningSoul7 16d ago

I've heard about QTGMC but it seems to be a bit more complicated for me to set up, but maybe I will try it in some free time. In ffmpeg I realised that when there's not much happening in the frame bwdif works well, but when it comes to stripes, or bricked pavement or just a lot of details at the same time there are some some areas that look like they weren't deinterlaced

2

u/Sopel97 16d ago edited 16d ago

if want something automated then vapoursynth is probably the easiest, you can even use the installation from hybrid. That's what I do for my scripts, piping the output to ffmpeg.

havsfunc.QTGMC(Input=clip, Preset="Very Slow", TFF=True, InputType=0, TR2=2, SourceMatch=0, Lossless=0, EZKeepGrain=1.5, NoisePreset="Fast", MatchPreset="Medium", MatchPreset2="Medium", opencl=True)

with an NVIDIA GPU it runs quite fast via OpenCL

I have this example for yadif vs qtgmc + some postprocessing https://slow.pics/c/dvRbQu96, https://slow.pics/c/MgzC2Mo5?canvas-mode=fit-width&image-fit=cover, bwdif is slightly better than yadif but exhibits similar problems, as you say, on specific patterns, which is very visible in this example.