2017-02-23 905 views
0

我有一個一般的Windows網絡攝像頭,我想廣播的ffmpeg到ffserver的作品,但不能查看

ffmpeg -f vfwcap -I 0 -vcodedc libx264 -tune zerolatency-b 900k -f mpegts udp://domain.com:8090 

出現無差錯。 我可以看到大量的流量使用tcpdump的端口8090

ffserver的是在FreeBSD服務器上沒有防火牆配置

# cat /usr/local/etc/ffserver.conf| egrep -v "(^#.*|^$)" 
HTTPPort 8090 
HTTPBindAddress 0.0.0.0 
MaxHTTPConnections 2000 
MaxClients 1000 
MaxBandwidth 1000 
CustomLog - 
<Feed feed1.ffm> 
File /tmp/feed1.ffm 
FileMaxSize 200K 
ACL allow 98.124.117.129 
</Feed> 
<Stream test1.mpg> 
Feed feed1.ffm 
Format mpeg 
AudioBitRate 32 
AudioChannels 1 
AudioSampleRate 44100 
VideoBitRate 64 
VideoBufferSize 40 
VideoFrameRate 3 
VideoSize 160x128 
VideoGopSize 12 
ACL ALLOW all 
</Stream> 
<Stream test.asf> 
Feed feed1.ffm 
Format asf 
VideoFrameRate 15 
VideoSize 352x240 
VideoBitRate 256 
VideoBufferSize 40 
VideoGopSize 30 
AudioBitRate 64 
StartSendOnKey 
</Stream> 
<Stream test1-rtsp.mpg> 
Format rtp 
File "/tmp/feed1.ffm" 
</Stream> 
<Stream stat.html> 
Format status 
ACL allow localhost 
ACL allow 192.168.0.0 192.168.255.255 98.124.117.129 0.0.0.0 
</Stream> 
<Redirect index.html> 
URL http://www.ffmpeg.org/ 
</Redirect> 

港是活

# netstat -an|grep 8090 
tcp4  0  0 *.8090     *.*     LISTEN 

但是,當我嘗試通過VLC連接到服務器

rtsp://persiaspalace.us:8090/feed1.ffm 

con聯接失敗。 沒有網絡問題

如何配置從ffmpeg到ffserver的攝像頭廣播以便通過VLC(或類似)進行查看?

回答

0

我相信你的端口是混在一起的。 FFserver使用端口8090進行HTTP,RTSP。在您的FFserver配置文件中設置RTSPPort,然後確保您點擊了流而不是提要(如QA Collective指出的那樣)。喜歡的東西:

... 
HTTPPort 8090 
RTSPPort 5554 
... 

確保端口可用,然後嘗試:

ffplay -loglevel debug "rtsp://persiaspalace.us:5554/test1.mpg" 
0

您需要連接到流,而不是饋送。 Feed是傳入的視頻。該流是傳出視頻。

RTSP://persiaspalace.us:8090/feed1.ffm

需要是

RTSP://persiaspalace.us:8090/test1.mpg 或 rtsp://形式persiaspalace。我們:8090/test.asf 或 rtsp://persiaspalace.us:8090/test1-rtsp.mpg

相關問題