[FFmpeg-user] Replacing stream input when using segment time option

jamesfowkes jamesfowkes at gmail.com
Fri Oct 16 11:11:36 EEST 2020


Further to this, I've managed to get a still frame to record into timestamped
segments using:

ffmpeg -loop 1 -i frame.png -reset_timestamps 1 -vcodec libx264 -f segment
-segment_time 60 -strftime 1 +%Y-%m-%d_%H-%M-%S.mp4

But while the segments are 60 seconds of wallclock time long, they are
record much faster than that, taking (on my laptop) about 30 seconds to
actually record, meaning I have ~120 seconds of video every 60 seconds of
elapsed wallclock time.

If I add the "-re" and "-vsync  0" options:

ffmpeg -re -vsync 0 -loop 1 -i frame.png -reset_timestamps 1 -vcodec libx264
-f segment -segment_time 60 -strftime 1 +%Y-%m-%d_%H-%M-%S.mp4

The speed is just slightly lower than 1x (around 0.98x), resulting in very
slightly truncated files. This is no so much of an issue, but again would be
good to solve.

Is there a way to get an exact 1x encoding speed in this case?




--
Sent from: http://www.ffmpeg-archive.org/


More information about the ffmpeg-user mailing list