I’m working on a project where I have an mkv sourced from disc with video encoded at 50i, in which the content is a mix of film-sourced material and studio-sourced material that originally would have been “field-interlaced” with 50Hz motion, but unfortunately on the disc the authors have presented the studio-sourced content as “frame interlaced” with effective 25Hz motion, so it looks progressive in the way that the film-sourced context does, but with nasty motion artefacts from the progressive conversion. I want to replace the studio-sourced segments with motion-interpolated 50Hz conversions generated by ffmeg. Here is what I’ve done:
- Generated a thumbnail index of the I frames using ffmpeg, with filenames given as millisecond timestamps, to determine the in- and out-points of the studio sections
- Using mkvtoolnix I split the mkv into sections, retaining just the video
- I converted the studio sections to 50fps using the ffmpeg minterpolate filter
- I used ffmpeg to put the SPS and PPS data “in band” for all the segments to support playback after concatenation
- I reassembled all the segments in mkvtoolnix, adding in the audio and chapter points etc from the master mkv.
The end result is perfect in terms of the video, but lip sync goes adrift after a while. I am wondering if there is anything I can be doing with mkvtoolnix that would make the workflow more robust, or otherwise if anyone is an expert with ffmpeg I welcome advice.