Creating Video and Streaming Command Line

社会主义新天地 提交于 2020-01-17 07:15:17

问题


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?

来源:https://stackoverflow.com/questions/45141199/creating-video-and-streaming-command-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!