【问题标题】:Can not view the below webcam stream using ffserver + ffmpeg on osx无法在 osx 上使用 ffserver + ffmpeg 查看以下网络摄像头流
【发布时间】:2015-06-18 14:35:52
【问题描述】:

我在尝试使用 ffserver + ffmpeg 将我的网络摄像头流式传输为 mpeg 流时迷路了。 我已经在 OSX Yosemite (10.10.13) 上安装了以下 ffserver.conf

HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000
CustomLog /Users/admin/Documents/ffserver/webcam.log
NoDaemon

<Feed webcam.ffm>
    File /Users/admin/Documents/ffserver/webcam.mjpeg
    #FileMaxSize 200K
    #ACL allow 10.0.0.0 255.255.255.0
</Feed>


<Stream webcam.mjpg>

# coming from live feed 'webcam.ffm'

Feed webcam.ffm
Format mpegts

VideoCodec libx264
VideoFrameRate 24
VideoBitRate 512
VideoSize 640x480
#AVOptionVideo crf 23
#AVOptionVideo preset medium
# for more info on crf/preset options, type: x264 --help
#AVOptionVideo flags +global_header

NoAudio

</Stream>

运行下面的ffmpeg流到服务器

ffmpeg -f avfoundation -i "0" -vcodec libx264 -s 640X480 http://localhost:8090/webcam.mjpg

如果我运行 ffmepg 以输出为文件,我可以访问网络摄像头视频,但我无法使用 vlc 看到流(我从 ffserver 获得连接验证)

知道为什么吗?

谢谢 纳迪戈

【问题讨论】:

  • 您是否从 ffserver 获得任何输出(stdout/stderr)?我认为您需要取消注释 crf 和预设的 AVOptionVideo 选项,因为 x264 将使用您当前的设置中止,因此 ffserver 将永远不会真正流式传输任何内容。

标签: macos video ffmpeg ffserver


【解决方案1】:

你将添加 libx264 ,并在 ffmpeg 中构建,或者你尝试构建有网络问题的 ffmpeg,以及 --enable-protocols --enable-network 并启用一些解复用器。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-09-10
    • 1970-01-01
    • 2016-10-23
    • 2014-08-06
    • 2017-12-27
    • 1970-01-01
    • 2020-10-15
    • 1970-01-01
    相关资源
    最近更新 更多