我目前在一個項目中,我有過一個TCP連接流從一臺計算機2個攝像頭流到另一個工作到ffserver的,我可以流1沒有問題發送2個不同的攝像頭飼料從FFmpeg的
ffserver.conf:
HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxClients 40
MaxBandwidth 30000
CustomLog -
NoDaemon
<Stream status.html>
Format status
ACL allow localhost
ACL allow 192.168.0.0 192.168.255.255
</Stream>
#feed for camera 1
<Feed webcam1.ffm>
File /tmp/webcam1.ffm
FileMaxSize 100M
</Feed>
#feed for camera 2
<Feed webcam2.ffm>
File /tmp/webcam2.ffm
FileMaxSize 100M
</Feed>
#stream for feed 1
<Stream webcam1.mjpeg>
Feed webcam1.ffm
Format mjpeg
VideoSize 1280x720
VideoFrameRate 30
Preroll 0
NoAudio
Strict -1
</Stream>
#stream for feed2
<Stream webcam2.mjpeg>
Feed webcam2.ffm
Format mjpeg
VideoSize 1280x720
VideoFrameRate 30
Preroll 0
NoAudio
Strict -1
</Stream>
命令ffserver的運行:
ffserver /etc/ffserver.conf
命令養活ffserver的:
ffmpeg -v 2 -r 20 -f video4linux2 -i /dev/video0 http://localhost:8090/webcam1.ffm
和它的作品完美的,但是當我嘗試運行其他飼料:
ffmpeg -v 2 -r 20 -f video4linux2 -i /dev/video1 http://localhost:8090/webcam2.ffm
我能看到的只是第二流和第一個不工作了。 一些想法?
您確定您在良好的端口上發送這兩個Feed嗎?因爲你的配置使用端口'8090',但你在兩個命令示例中發送到端口'80'。他們不應該像這樣工作,這是一個錯字嗎? – aergistal
對不起,我忘了,ffmpeg的命令是 –
ffmpeg ..... .... http:// localhost:8090/..... –