0

Want to stream an image sequence generated by blender to Youtube rtmp server.

Currently using the following command to do so:

ffmpeg -r 24 -f image2 -s 1080x1920 -i /root/sandbox/new/render%04d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p -f flv rtmp://a.rtmp.youtube.com/live2/******"

but this ends up only streaming the pre rendered images.

are there any arguments available so that the stream doesn't ends and while the frames are being rendered by blender and ffmpeg keeps on stacking and broadcasting the images ?

  • 1
    See the answer portion starting with `Edit:` at https://superuser.com/a/1375267 – Gyan Jan 26 '20 at 09:15
  • ` cat /root/sandbox/new/*.png | ffmpeg -f image2pipe -re -framerate 24 -i - -vcodec libx264 tetst.mp4` Here I tested the following command by only saving the video locally but as you can see it only generated a video for about 57 frames. Input #0, image2pipe, from 'pipe:':cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1frame= 57 fps=0.5 q=-1.0 Lsize=552kB time=00:00:02.25 bitrate=2008.7kbits/s but this ends up with the similar problem. The images being rendered by blender are stored in directory called 'a://' with 'render0001.png'~'render[n].png' – TheCuddleDoodle Jan 27 '20 at 04:22
  • See the answer portion **starting with** `Edit:` – Gyan Jan 27 '20 at 05:32
  • `cat *.jpg >> allimages | ffmpeg -f image2pipe -re -framerate 24 -i allimages -vcodec libx264 test.mp4` should the syntax look like this? – TheCuddleDoodle Jan 27 '20 at 06:48
  • No. The ffmpeg command is run separately. Then, as each new image is saved, run `cat new-image >> all-images` – Gyan Jan 27 '20 at 07:36
  • So it should look like this ? 1st command`cat *.jpg >> allimages` 2nd command `ffmpeg -f image2pipe -re -framerate 24 -i allimages -vcodec libx264 test.mp4` – TheCuddleDoodle Jan 27 '20 at 07:41
  • Also how do I run the ffmpeg command first without the 'allimages' is even been generated yet ? – TheCuddleDoodle Jan 27 '20 at 08:01
  • Once you have a few frames ready, run `cat *.jpg >> allimages`. Then start the ffmpeg command and let it remain running. Then as each new frame is saved, run `cat new-image >> all-images` – Gyan Jan 27 '20 at 09:23

0 Answers0