ffmpeg – Encode piped images as they arrive

I’m encoding a video by piping images into ffmpeg using the -i pipe: input.
However the images arrive sporadically, but are encoded as if they are sequential frames.

I have tried using -use_wallclock_as_timestamps 1 in the input block, but it has no effect.

This is the command I’m using:

ffmpeg -use_wallclock_as_timestamps 1 -i pipe: -vf fps=50 -c:v libx264 -map 0 -f segment -segment_list playlist.m3u8 -segment_list_flags +live -segment_time 10 -segment_wrap 5 seg%03d.mkv

Input block parameters I’ve tried to no avail:

  • -re
  • -framerate 1
  • -framerate 1/1000
  • -framerate 50

So to reiterate the problem: A video is being produced, but each piped image is set as an individual frame, despite having arrived and encoded at an entirely different time that its predecessor.

Thanks!

Read more here: Source link