ffmpeg rtmp和本地文件输出 [英] ffmpeg rtmp and local file output

查看:622
本文介绍了ffmpeg rtmp和本地文件输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对ffmpeg有麻烦 我从抓取设备(相机)接收到rtsp流,并将其流式传输到rtmp(Youtube Live) 我想在计算机中拥有流的副本,所以我同时在本地文件中写入

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

我使用此命令:

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'

问题是当我断开连接时,ffmpeg退出并停止记录 即使没有互联网,是否有任何标志或选项可告诉ffmpeg继续在本地文件中记录?

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 ?

非常感谢您的帮助=)

推荐答案

您可以尝试:

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

此处可用.

这篇关于ffmpeg rtmp和本地文件输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆