我使用avconv(ffmpeg“替换”)从我的覆盆子pi直播网络摄像头
avconv -f video4linux2 -v debug -r 5 -s 176x144 -i /dev/video0 -vcodec mjpeg http://192.168.0.3:8090/feed1.ffm
到我的本地网络OSX机器(用于测试)运行ffserver
Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 10000
CustomLog -
NoDaemon
<Feed feed1.ffm>
File feed1.ffm
FileMaxSize 20M
ACL allow 192.168.0.10
</Feed>
<Stream test.mjpeg>
Feed feed1.ffm
Format mjpeg
NoAudio
VideoQMin 1
VideoQMax 10
VideoSize 176x144
VideoFrameRate 5
</Stream>
当我启动avconv时,它似乎正在流式传输到ffserver:
Output #0, ffm, to 'http://192.168.0.3:8090/feed1.ffm':
Metadata:
encoder : Lavf55.0.1
Stream #0.0, 0, 1/1000000: Video: mjpeg, yuvj420p, 320x240, 1/5, q=2-31, 200 kb/s, 1000k tbn, 5 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo -> mjpeg)
Press ctrl-c to stop encoding
frame= 108 fps= 18 q=21.7 size= 688kB time=21.60 bitrate= 260.9kbits/s
ffserver状态页面显示了流
然而,当我在VLC中加载http://localhost:8090/test.mjpeg
时,它无法播放并且ffserver会吐出:
Sat May 25 17:25:34 2013 dimensions not set
Sat May 25 17:25:34 2013 Error writing output header
Sat May 25 17:25:34 2013 127.0.0.1 - - [GET] "/test.mjpeg HTTP/1.1" 200 66
我尝试了很多不同的配置和设置,我对导致错误的原因感到茫然!
谢谢