I have been recording TV shows on a PC with tuner cards and a software PVR (NextPVR) for some years now.
Recently, after an initial edit with Avidemux, but before converting with FFmpeg, I've been adding chapters (via a mkv chaptermark file or a FFmpeg FMETADATA file) where the commercials were, at the corresponding Keyframes/I-Frames.
The problem is, the timings of these frames are different before and after FFmpeg, and I have to manually go over and correct them one-by-one. If I don't, I run into a different problems during chapter jumps when playing back (depending on the software).
Any ideas on how to accurately chapter-mark a video before converting? Or how to calculate the timing-drifts of the Keyframes/I-Frames?
Thanks again.
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 3 of 3
Thread
-
-
If you are using x264, you use a qp file to specify where IDR frames ("true" keyframes) are placed when encoding, corresponding to your chapters points.
https://en.wikibooks.org/wiki/MeGUI/x264_Settings#qpfile
There is a utility called chaptergen that can help with this
One issue with ffmpeg libx264, is it does not support qpfile through -x264opts or -x264params (or at least it did not in the past) . You have to use x264cli
The default settings for libx264 is -g 250 (the max keyframe interval is 250 frames) , but if you have scenecut enabled, it will automatically insert IDR frames as it it appropriate (scenechanges). If you reduce the distance, there is greater likelihood of it getting closer to where you want it (the "penalty" is generally reduced compression efficiency in typical bitrate ranges), but it's "better" to set them exactly and precisely with a qpfile -
Last edited by Simon_Haddad; 21st May 2020 at 18:32.
Similar Threads
-
AviSynth - Color Space Frame Timing
By lomaidala in forum EditingReplies: 31Last Post: 7th Mar 2018, 04:53 -
Drift GhostS .mp4 framerate conversion 59.9 to 25 - how?
By info in forum Video ConversionReplies: 6Last Post: 1st Apr 2017, 20:22 -
Frame drift on broadcast tape?
By 90sTV in forum Newbie / General discussionsReplies: 4Last Post: 16th Mar 2016, 16:04 -
Is there any app that has a good frame- AND keyframe-accurate navigation?
By MidnightUser in forum EditingReplies: 39Last Post: 26th Nov 2015, 11:33 -
Frame Blend Frame Rate Conversion with Scene Change Detection
By ndjamena in forum RestorationReplies: 7Last Post: 3rd Nov 2015, 09:26