Creating Video and Streaming Command Line

2019-08-23 05:35发布

Currently, using ffmpeg, I am using two commands on my Terminal to:

1) create a video from a bunch of images:

ffmpeg -r 60 -f image2 -s 1920x1080 -i rotated-pano_frame%05d_color_corrected_gradblend.jpg -vcodec libx264 -crf 25 -pix_fmt yuv420p test.mp4

2) stream the video to a udp address:

ffmpeg -re -i test.mp4 -c copy -f flv udp://127.0.0.1:48550

I am trying to combine both these instructions into one command line instruction, using &&, as suggested in the answer to a previous question of mine:

ffmpeg -r 60 -f image2 -s 1920x1080 -i rotated-pano_frame%05d_color_corrected_gradblend.jpg -vcodec libx264 -crf 25 -pix_fmt yuv420p test.mp4 \
&& ffmpeg -re -i test.mp4 -c copy -f flv udp://127.0.0.1:48550

but am encountering an error which prevents streaming:

[flv @ 0x7fa2ba800000] video stream discovered after head already parsed.

Thoughts on a different command line syntax to join the two instructions, different ffmpeg instruction (filters perhaps?), and why I am getting the error?

0条回答
登录 后发表回答