无法获得FFserver流

时间:2016-08-18 21:41:43

标签: ffmpeg streaming video-streaming http-live-streaming ffserver

我想在这个问题前面加上这样一个事实:我对ffmpeg非常陌生,甚至更新于ffserver。

对于我的生活,我不能让这件事情继续下去。 我明白了:

"Too large number of skipped frames 882933314374 > 60000"

另外,ffplay给了我first frame is no keyframe

这是我的ffserver.conf文件

HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 1000
MaxClients 10
MaxBandwidth 2000000
NoDefaults

###############################################################################################

<Feed test.ffm>
    File /tmp/test.ffm
    FileMaxSize 10000M
    ACL ALLOW localhost
</Feed>

<Stream status.html>
Format status

# Only allow local people to get the status
    ACL allow localhost
</Stream>

<Stream test.avi>
    Feed test.ffm
    Format avi
    ACL ALLOW localhost
    ACL ALLOW 192.168.1.0
    NoAudio
    VideoSize 3840x2160
    VideoFrameRate 30
    Preroll 10
</Stream>

###############################################################################################

这是我的ffmpeg命令

ffmpeg -i smaller.avi http://localhost:8090/test.ffm

我整天都在和这个东西打架,一直在谷歌上搜索疯子。我究竟做错了什么?任何帮助都将受到热烈欢迎。

1 个答案:

答案 0 :(得分:1)

这些是我的笔记,因为我目前正在进行类似的处理:

来自ffserver的视频流用于Raspberry PI - 未经优化

按照本教程:(我知道人们不喜欢链接,但这种方式很有效) https://oscarliang.com/webcam-streaming-video-raspberry-pi-via-browser/

下载ffmpeg for windows(或linux)

git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg

//首先保持你的ffserver.conf简单

&#13;
&#13;
HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 1000
MaxClients 10
MaxBandwidth 2000000
NoDefaults

###############################################################################################

<Feed test.ffm>
    File /tmp/test.ffm
    FileMaxSize 10M
</Feed>

<Stream test.avi>
    Feed test.avi
    Format mjpeg
    VideoSize 640x480
    VideoFrameRate 20
    VideoBitRate 2000
    VideoQMin 2
    VideoQMax 10
</Stream>
&#13;
&#13;
&#13;

将端点放在http://<localhost>/webcam.mjpeg

Makesure webcam.sh包含:

ffserver -f /etc/ffserver.conf \ & ffmpeg -v verbose \ -r 30 \ -s 640x480 \ -f video4linux2 \ -i /dev/video0 http://localhost/webcam.ffm

运行以下命令:

//使用以下代替vlc,因为它具有更快的流式传输

WIN: ffplay.exe http://localhost/webcam.mjpeg

Linux中: ffplay http://localhost/webcam.mjpeg