[FFmpeg-user] Retain but don't playback frames outside of edit list for transcode

Anne Wu annewu at adobe.com
Wed May 8 06:25:37 EEST 2024

Looking for some guidance on if handling edit-lists this way is
possible. I recently ran into a situation where I need to transcode
videos that include edit lists. The edit-list specifies to drop the
first few frames of the video, and thus the output ends up with fewer
frames than the original. Is there a way to retain these frames in
the output, but not have them play during playback? I’m looking for
the number of frames in the input and output file to be the same.

The original video has 386 frames. This is the transcode command that
outputs a file with 376 frames: ffmpeg -i ./original.mov -c:v
libx264 -fps_mode passthrough output.mov

If I use the -ignore_editlist 1 option, it will retain the frames
outside the edit-list and end up with 386 frames. But it still plays
back all the frames, which is not the desired behavior:
ffmpeg -ignore_editlist 1 -i ./original.mov -c:v libx264 -fps_mode
passthrough output_ignoreEditList.mov

Using -c:v copy instead of transcode works, but I need to do a
transcode and not a copy.

The original, transcoded, and transcoded with -ignore_editlist 1
files are available here<https://f.io/jxcwZteI>.

More information about the ffmpeg-user mailing list