我有一个通用的windows网络摄像头,我正在尝试广播。
ffmpeg -f vfwcap -I 0 -vcodedc libx264 -tune zerolatency-b 900k -f mpegts udp://domain.com:8090这看起来是没有错误的。我可以在端口8090上看到大量使用tcpdump的流量
在未配置防火墙FreeBSD服务器上配置了ffserver
# 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连接到ffserver时
rtsp://persiaspalace.us:8090/feed1.ffm连接失败。没有网络问题
如何配置从ffmpeg到ffserver的摄像头广播,以便通过VLC (或类似方式)查看?
发布于 2017-04-14 03:40:55
我相信你的港口搞乱了。FFserver对HTTP、RTSP使用端口8090。在FFserver配置文件中设置RTSPPort,然后确保命中的是流,而不是提要(正如QA Collective指出的那样)。类似于:
...
HTTPPort 8090
RTSPPort 5554
...确保端口可用,然后尝试:
ffplay -loglevel debug "rtsp://persiaspalace.us:5554/test1.mpg"发布于 2017-04-13 19:57:56
您需要连接到流,而不是提要。提要是传入的视频。流是传出的视频。
rtsp://persiaspalace.us:8090/feed1.ffm
需要的是
rtsp://persiaspalace.us:8090/test1.mpg或rtsp://persiaspalace.us:8090/test.asf或rtsp://persiaspalace.us:8090/test1-rtsp.mpg
https://stackoverflow.com/questions/42406000
复制相似问题