Stream ffserver流式传输webm数据,但不显示任何内容
我正试图在lubuntu机器上通过互联网传输网络摄像头数据。为了实现这一点,我安装了ffmpeg和ffserver。然而,我似乎无法让这个工作。 我想使用webm格式将其集成为HTML5视频。我在互联网上找到了几个这样的例子,这就是我设置的基础。这是我目前拥有的ffserver配置:Stream ffserver流式传输webm数据,但不显示任何内容,stream,ffmpeg,webcam,ffserver,Stream,Ffmpeg,Webcam,Ffserver,我正试图在lubuntu机器上通过互联网传输网络摄像头数据。为了实现这一点,我安装了ffmpeg和ffserver。然而,我似乎无法让这个工作。 我想使用webm格式将其集成为HTML5视频。我在互联网上找到了几个这样的例子,这就是我设置的基础。这是我目前拥有的ffserver配置: HTTPPort 8090 # Port to bind the server to HTTPBindAddress 0.0.0.0 MaxHTTPConnections
HTTPPort 8090 # Port to bind the server to
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 10000 # Maximum bandwidth per client
# set this high enough to exceed stream bitrate
CustomLog -
#NoDaemon # Remove this if you want FFserver to daemonize after start
<Feed feed1.ffm> # This is the input feed where FFmpeg will send
File ./feed1.ffm # video stream.
FileMaxSize 5M # Maximum file size for buffering video
ACL allow 127.0.0.1 # Allowed IPs
</Feed>
<Stream camera1.webm> # Output stream URL definition
Feed feed1.ffm # Feed from which to receive video
Format webm
# Audio settings
#AudioCodec vorbis
#AudioBitRate 64 # Audio bitrate
NoAudio
# Video settings
VideoCodec libvpx
VideoSize 640x480 # Video resolution
VideoFrameRate 2 # Video FPS
AVOptionVideo flags +global_header # Parameters passed to encoder
# (same as ffmpeg command-line parameters)
#AVOptionVideo cpu-used 0
AVOptionVideo qmin 1
AVOptionVideo qmax 42
#AVOptionVideo quality good
AVOptionAudio flags +global_header
#PreRoll 1
#StartSendOnKey
VideoBitRate 400 # Video bitrate
</Stream>
<Stream status.html> # Server status URL
Format status
# Only allow local people to get the status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
</Stream>
<Redirect index.html> # Just an URL redirect for index
# Redirect index.html to the appropriate site
URL http://www.ffmpeg.org/
</Redirect>
输入是一个标准的UVC网络摄像头,WPRK正常工作(使用奶酪测试),ffmpeg似乎正常工作(将文件设置为输出正常工作),连接到ffserver似乎正常工作,两个程序相互重新组织。如果应用程序请求ffserver流,它将接收数据。例如,wget会生成一个文件,其大小与给定比特率下的预期大小相同。但是,在网页中打开流不起作用。
我尝试了两种方式:简单地浏览webm链接。firefox表示它正在接收一些数据,但没有显示任何内容。ffserver还指示传输的数据量正常。我尝试的第二个选项是带有视频流视频标签的网页:
<video with="640" height="480" autoplay>
<source src="http://localhost:8090/camera1.webm" type="video/webm">
</video>
但这两者都不起作用。
谁知道我哪里出错了?为此,您可以尝试使用
标记。类似这样的内容:<embed type="video/webm" src="http://localhost:8090/camera1.webm" width="640" height="480">
如果不起作用,您可以尝试127.0.0.1
而不是localhost
<embed type="video/webm" src="http://localhost:8090/camera1.webm" width="640" height="480">