简体   繁体   English

ffmpeg将mp4文件输入到rtsp流

[英]ffmpeg feeding mp4 file to rtsp stream

ffserver.conf [![] I am trying to feed a mp4 file from ffmpeg to rtsp stream using the command on centos 7: 我正在尝试使用centos 7上的命令将ffmpeg的mp4文件提供给rtsp流:

from console 1: ffmpeg -i space.mp4 -vcodec libx264 -tune zerolatency -crf 18 http://localhost:8050/feed1.ffm 从控制台1:ffmpeg -i space.mp4 -vcodec libx264 -tune zerolatency -crf 18 http:// localhost:8050 / feed1.ffm

from console 2: I have started ffserver and it is started listening. 从控制台2:我已经启动了ffserver并开始监听。

But when i open http://xxxx:8050/feed1.ffm in browser it shows error: 但是当我在浏览器中打开http:// xxxx:8050 / feed1.ffm时 ,它显示错误:

File ??feed1.ffm? 文件?? feed1.ffm? not found 未找到

My ffserver.conf file is attached 我的ffserver.conf文件已附加

Browser can't play RTSP directly so you need it delivered in a HTML5 format (HLS) that can load inside a VIDEO tag. 浏览器无法直接播放RTSP,因此您需要以HTML5格式(HLS)提供,可以加载到VIDEO标记内。 You can directly embed the mp4 inside a VIDEO tag if you wish. 如果您愿意,可以直接将mp4嵌入VIDEO标签内。

FFMPEG needs to publish the video/stream to a streaming server that supports RTSP or the format you decide to publish as. FFMPEG需要将视频/流发布到支持RTSP的流式服务器或您决定发布的格式。

You can schedule mp4 videos to play as a live stream with this tool https://broadcastlivevideo.com/schedule-video-playlist-as-live-streaming-channel/ , available as free open source WP plugin. 您可以使用此工具安排mp4视频作为实时流播放https://broadcastlivevideo.com/schedule-video-playlist-as-live-streaming-channel/ ,可作为免费的开源WP插件使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM