[英]Browser downloads video stream instead of playing it
I'm trying to stream video from IP camera to browser using ffmpeg
and ffserver
but if I try to open stream in any browser it starts downloading it instead of playing. 我正在尝试使用
ffmpeg
和ffserver
将视频从IP摄像机流传输到浏览器,但是如果我尝试在任何浏览器中打开流,它将开始下载而不是播放。 I've tried to display video using <video>
tag but that doesn't work either: Here is the code I used: 我尝试使用
<video>
标记显示视频,但这也不起作用:这是我使用的代码:
<video width="800" height="600" controls>
<source src="http://10.10.7.19:8090/cam4.mp4" type="video/mp4">
</video>
The stream works fine in vlc, it is H.264 stream. 该流在vlc中工作正常,它是H.264流。 ffserver shows buffer underflow errors when I try to view it in chrome.
当我尝试在chrome中查看时,ffserver显示缓冲区下溢错误。 When I try to open it in firefox I get
No video with supported format and MIME type found
error on video element. 当我尝试在firefox中打开它时,在video元素上
No video with supported format and MIME type found
视频。
How do I make it work? 我该如何运作? Also, are there any tools for debugging video streams on Chrome or Firefox (console doesn't show any errors) ?
另外,是否有用于在Chrome或Firefox上调试视频流的工具(控制台未显示任何错误)?
服务器必须设置正确的Content-Type标头。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.