ffmpeg rtmp and local file output

家住魔仙堡 提交于 2019-12-03 22:30:23

问题


I have a trouble with ffmpeg I receive a rtsp stream from a grabbing device (camera) and I stream-out it to rtmp (Youtube Live) I want to have a copy of the stream in my computer so I write at the same time in a local file

I use this command :

ffmpeg -y -i 'RTSP_SOURCE' -c:v copy -c:a libvo_aacenc -map 0:v -bsf:v dump_extra -fflags +genpts -flags +global_header -movflags +faststart
-map_metadata 0 -metadata title= -f tee -filter_complex aevalsrc=0 '[f=mp4]/tmp/backup.mp4|[f=mpegts]/tmp/backup.ts|[f=flv]rtmp://a.rtmp.youtube.com/live2/STREAM_ID'

The problem is when I have some disconnections, ffmpeg exits and stop to recording Is there any flag or option for telling to ffmpeg to continue recording in local files even there is not internet ?

Thank you very much for your help =)


回答1:


You can try:

ffmpeg -f tee "[onfail=ignore] ...

More description is available here.



来源:https://stackoverflow.com/questions/27272717/ffmpeg-rtmp-and-local-file-output

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