0

我想以我对 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

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

4

1 回答 1

1

这些是我的笔记,因为我目前正在通过类似的过程:

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

遵循本教程:(我知道人们不喜欢链接,但这个 tut 有效) https://oscarliang.com/webcam-streaming-video-raspberry-pi-via-browser/

下载适用于 Windows(或 linux)的 ffmpeg

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

// 首先保持 ffserver.conf 简单

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>

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

确保 webcam.sh 包含:

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

运行以下命令:

// 使用以下内容而不是 vlc,因为这具有更快的流式传输

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

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

于 2016-09-18T12:22:26.850 回答