I have an issue that I need help with; I'm not all that knowledgeable about video conversion or ffmpeg. I want to rip a DVD movie, do some editing in Resolve, then re-encode it with 5.1 surround sound. When I rip the DVD with MakeMKV, then convert it to MOV to import into Resolve, I can separate the 6 audio tracks into 6 PCM streams, so that's no problem. The problem is with the framerate. MakeMKV rips the DVD with a 30fps frame rate, which persists through the conversion, editing and encoding in Resolve. However, it plays with a lot of stutter with my TV set to 60Hz; it plays the same way on several different devices. Meanwhile, if I convert the MKV with Handbrake and set the framerate to "Same as source," I get an MKV with a 24fps framerate, which plays silky-smooth with my TV set to 24 Hz. However, Handbrake isn't able to rip the MKV file with the audio streams I need. So I'm wondering if I can get the change in framerate with ffmpeg when I convert the MKV to MOV. I tried forcing a 24fps framerate with ffmpeg, but that didn't work; the framerate changed, but playback was disastrous. Obviously there's some other conversion happening with Handbrake, and I'd like to know how to duplicate it with ffmpeg. Here is the syntax I used to convert the MKV to MOV, minus that attempt to force 24fps: ffmpeg -i inputfile.mkv -c:v dnxhd -profile:v dnxhr_hq -c:a pcm_s16le -ar 48000 outputfile.mov. Thanks for any help.
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 12 of 12
Thread
-
-
I was going to write a big technical description but it's way too much work. In short, when film is broadcast every 4 film frames becomes 5 video frames (24 fps to 30 fps). See 3:2 pulldown:
https://en.wikipedia.org/wiki/Three-two_pull_down
The filter sequence I gave you restores the original 4 film frames from the 5 video frames. The first filter, fieldmatch, matches fields to eliminate interlaced frames. But that leaves you with 5 progressive frames instead of 4 -- one of the 5 is a duplicate of one of the film frames. The third filter, decimate, removes that duplicate frame, leaving only the four original film frames. The reason for yadif between them is to deinterlace any interlaced frames when the fieldmatch fails (that can happen when video is cut after being telecined, dropped frames while capturing, etc.). If your video is very cleanly telecined you can leave out the yadif: "-vf fieldmatch,decimate". -
Thanks for the explanation, but I spoke to soon. I had just just quickly checked the video after adding your switches to the ffmpeg command line, and it looked good at 24fps, but when I went to edit it, it turns out that the video no longer matches the sound track. The video finishes 20 minutes (1:45 min film) before the soundtrack does, so I need to try something different.
-
That's an issue with your editor. The running time of the 24 fps video is the same as the 30i source. Make sure the editor recognizes the new source is 24 fps.
-
That's what I thought too, but then I checked the file in VLC, and the issue is present there as well. VLC reports that the framerate is 23.976 fps; the audio and video are in sync at the beginning, but the video starts running more and more out of sync with the audio as the film progresses. The video reaches the closing credits around 20 minutes before the full length of the movie, while the audio continues to play to the end. This is the command line I used: "ffmpeg -i inputfile.mkv -c:v dnxhd -profile:v dnxhr_hq -vf fieldmatch,yadif=deint=interlaced,decimate -c:a pcm_s16le -ar 48000 outputfile.mov." Do the switches need to be in a different order?
-
see this here - https://ffmpeg.org/ffmpeg.html
-
OK, so I played around with all different combinations of the options you gave me. Decimate seemed to be removing important frames, causing the video to be sped up, and yadif was screwing up the audio. So the command line that wound up working perfectly is: ffmpeg -i inputfile.mkv -vf fieldmatch -r 23.976 -c:v dnxhd -profile:v dnxhr_hq -c:a pcm_s16le -ar 48000 outputfile.mov. Thanks for your help.
-
If your video is really telecined film that command line is likely to leave you with both duplicate and missing frames.
-
So that sent me digging a bit more - the final -vf parameter that works is -vf dejudder,fps=30000/1001,fieldmatch,yadif=deint=interlaced,decimate. Thanks for your help
Similar Threads
-
ffmpeg command line help
By njscorpion in forum Newbie / General discussionsReplies: 2Last Post: 12th Jul 2019, 12:42 -
FFmpeg does not convert file through command line
By Vidikon in forum Newbie / General discussionsReplies: 2Last Post: 5th Jun 2019, 02:13 -
Software to convert editing operations to the command line ffmpeg
By ctimict in forum EditingReplies: 2Last Post: 20th Feb 2019, 14:02 -
ffmpeg not work on two command vignete and blur in one line , why ?
By dedekov in forum EditingReplies: 7Last Post: 20th Mar 2018, 09:09 -
ffmpeg command line syntax
By sambat in forum Newbie / General discussionsReplies: 2Last Post: 14th Dec 2016, 20:01