0

我想用一个事实来说这个问题,我对ffmpeg甚至是ffserver更新。无法获得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 

我一直在机智整天这个东西,整个时间都像疯子一样用Google搜索。我究竟做错了什么?任何帮助将受到热烈欢迎。

回答

1

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

视频流从ffserver的树莓PI - 未优化

按照本教程:(我知道人们不喜欢联系,但这种啧啧工作) https://oscarliang.com/webcam-streaming-video-raspberry-pi-via-browser/

下载的ffmpeg的Windows(或Linux)

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

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