[FFmpeg-user] Split stream in equal chunks

Marian Klymov nekto1989 at gmail.com
Thu Mar 25 08:35:27 EET 2021

I want to receive rtmp stream (using nginx-rtmp module), transcode it and
save it in chunks.
I would like to have splitting at specific times and to have all chunks
equal to 30.00 seconds (except first and last obviously). I've tried
playing with different parameters. segment_atclocktime looked like it
should do what I want but it creates chunks of different sizes. Originally
I thought that this is because of keyframes, but even with -g 1 it fails
My last try looks like this https://pastebin.com/raw/dYED4YXQ Is it
possible to do such thing with ffmpeg or do I need to implement some
heuristics with trying to resplit chunks outside?

More information about the ffmpeg-user mailing list