0

I'm trying to split a video file into 0.5s chunks. The closest command I've found is here (see command below): https://stackoverflow.com/questions/34249159/how-to-get-equal-segment-times-using-ffmpeg

ffmpeg -i input.mp4 -c:v libx264 -crf 22 -map 0 \
-segment_time 0.5 \
-g 9 \
-sc_threshold 0 
-force_key_frames "expr:gte(t,n_forced*9)" \
-f segment output%03d.mp4

This at least gives me more or less the expected amount of chunks, but the chunks vary in duration and are way longer (30s or so). The small 0.5s chunk is at the end, the rest is just a black frame and silence.

Does anyone have a hint on how this can be done so that I only get the actual 0.5s chunk ?

Best, n

3
  • Remove the -g 9 and change n_forced*9 to n_forced*0.5
    – Gyan
    Commented Nov 4, 2021 at 15:53
  • @Gyan Still the same problem ... Commented Nov 5, 2021 at 7:24
  • Add -report and rerun. Share report.
    – Gyan
    Commented Nov 5, 2021 at 8:28

0

You must log in to answer this question.

Browse other questions tagged .