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
-g 9
and changen_forced*9
ton_forced*0.5