I have a 30 minute video. I want to skip 3 seconds every 30 seconds. And continue to the end of the video. And it connects all 30s video together Example: 00:00:00 to 00:30:00 + 00:33:00 to 00:63:00 + 00:66:00 to 00:96:00 ..... so much for the ending video Please help me write it
Asked
Active
Viewed 1,957 times
3
-
Possible duplicate of [Cutting the videos based on start and end time using ffmpeg](https://stackoverflow.com/questions/18444194/cutting-the-videos-based-on-start-and-end-time-using-ffmpeg) – Sinto Jun 09 '18 at 03:51
-
1I do not think so. I want to cut 30s and skip 3 s then continue to cut 30s like that and connect that video together – Kion Dung Jun 09 '18 at 04:00
-
You cut the required time from that, after that you have to skip 3 secs after the next start time & has to proceed. – Sinto Jun 09 '18 at 04:03
-
it's correct. as in the example above. I want to take from 0 seconds to 30 seconds and connect with 33s to 63s like that until the end of the video – Kion Dung Jun 09 '18 at 04:10
1 Answers
6
The select filter is the most convenient for this,
ffmpeg -i in -vf "select='lt(mod(t,33),30)',setpts=N/FRAME_RATE/TB" -af "aselect='lt(mod(t,33),30)',asetpts=N/SR/TB" out
The video and audio select filters keep the first 30 seconds out of every 33 seconds. If your file doesn't have audio, drop the -af ..
option.

Gyan
- 85,394
- 9
- 169
- 201
-
1It works very well. I really thank you very much. You explain very clearly. Really thank you – Kion Dung Jun 09 '18 at 04:41