how to push a video list to rtmp server and keep connect

流过昼夜 提交于 2019-12-25 19:46:28

问题


Current methods

ffmpeg -re -i 1.mp4 -f flv "rtmp://example.com/live"
ffmpeg -re -i 2.mp4 -f flv "rtmp://example.com/live"
ffmpeg -re -i 3.mp4 -f flv "rtmp://example.com/live"
...

but 1.mp4 push done later , client and server will be disconnected. i hope keep connect.


回答1:


Try concat demuxer.

Create a list (myfiles.txt):

file '1.mp4'
file '2.mp4'
file '3.mp4'
...

Then

ffmpeg -f concat -i myfiles.txt -f flv "rtmp://example.com/live"


来源:https://stackoverflow.com/questions/34803506/how-to-push-a-video-list-to-rtmp-server-and-keep-connect

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