0

我正在尝试通过 FFserver 将带有 FFmpeg 的视频流式传输到网络浏览器。FFmpeg 在 Windows 上运行,FFserver 在 Ubuntu 上运行。从 FFmpeg 到 FFserver 的流式传输正在工作,但是从网络浏览器访问流时出现以下错误:

[webm @ 0x1da3c90]sample rate not set
Error writing output header for stream 'test.webm': Invalid argument
192.168.2.3 - - [GET] "/test.webm HTTP/1.1" 200 63
[webm @ 0x1da4fd0]sample rate not set
Error writing output header for stream 'test.webm': Invalid argument
192.168.2.3 - - [GET] "/test.webm HTTP/1.1" 200 63

我正在使用以下命令运行 FFmpeg:

ffmpeg -f gdigrab -video_size 800x600 -i desktop -f lavfi -i aevalsrc=0:1 http://192.168.2.5:8090/feed1.ffm

我的 FFserver 配置文件:

Port 8090                      
BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 10000

CustomLog -                  

<Feed feed1.ffm>               
   File ./feed1.ffm            
   FileMaxSize 1G              
   #ACL allow 127.0.0.1         
</Feed>

<Stream test.webm>              
   Feed feed1.ffm             
   Format webm

   AudioCodec vorbis
   AudioBitRate 64
   AudioSampleRate 48000
   VideoCodec libvpx
   VideoSize 720x576          
   VideoFrameRate 25          
   AVOptionVideo flags +global_header  
   AVOptionVideo cpu-used 0
   AVOptionVideo qmin 10
   AVOptionVideo qmax 42
   AVOptionVideo quality good
   AVOptionAudio flags +global_header
   PreRoll 15
   StartSendOnKey
   VideoBitRate 400            
</Stream>

<Stream status.html>            
   Format status
   # Only allow local people to get the status
   ACL allow localhost
   ACL allow 192.168.0.0 192.168.255.255
</Stream>

<Redirect index.html>
   # Redirect index.html to the appropriate site
   URL http://www.ffmpeg.org/
</Redirect>

这个问题有解决方案吗?

任何帮助表示赞赏

4

0 回答 0