How to simulate the viewer skipping through the video by tapping right arrow key in ffmpeg?

0

I'd like it to be obvious. Thinking either skip N frames after every M frames or modulate the frame rate like the jitter effect in some video editors.

I've tried something like this, but there still would be a pause in place of skipped frames:

 ffmpeg -i input.avi -filter:v select='lt(mod(n\,30)\,10)' -y edit/output.avi

Worse_Username

Posted 2018-10-19T21:31:58.413

Reputation: 109

Answers

0

Use

ffmpeg -i input.avi -filter:v select='lt(mod(n\,30)\,10)',setpts=N/FRAME_RATE_TB -y edit/output.avi

The select filter does not alter the timestamps of the retained frames, so during a 'gap', the last frame of the previous retained segment is shown frozen by most players. The setpts filter expression makes the retained segments adjacent, removing gaps.

Audio isn't handled, so if present, you'll need filters for those.

Gyan

Posted 2018-10-19T21:31:58.413

Reputation: 21 016