VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. 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.
    Quote Quote  
  2. 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
    Quote Quote  
  3. I'll check it out, thanks.


    Originally Posted by poisondeathray View Post
    …One issue with ffmpeg libx264, is it does not support qpfile through -x264opts or -x264params (or at least it did not in the past)…
    That might be a problem for me; I use
    Code:
    ffmpeg libx264
    because it preserves closed caption data when setting
    Code:
    -a53cc true
    We'll see…
    Last edited by Simon_Haddad; 21st May 2020 at 18:32.
    Quote Quote  



Similar Threads