gpt4 book ai didi

ffmpeg - 无法让 FFserver 流继续

转载 作者:行者123 更新时间:2023-12-04 23:16:04 24 4
gpt4 key购买 nike

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

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

最佳答案

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

来自 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

关于ffmpeg - 无法让 FFserver 流继续,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39027939/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com