使用ffmpeg/ffserver的流式webm

使用ffmpeg/ffserver的流式webm,ffmpeg,webm,Ffmpeg,Webm,我正试图将我的桌面屏幕转换为ffserver,并将其作为webm进行流式处理。我正在使用以下ffserver配置: <Feed feed1.ffm> # This is the input feed where FFmpeg will send File ./feed1.ffm # video stream. FileMaxSize 1G # Maximum file size for buffe

我正试图将我的桌面屏幕转换为ffserver,并将其作为webm进行流式处理。我正在使用以下ffserver配置:

<Feed feed1.ffm>               # This is the input feed where FFmpeg will send
   File ./feed1.ffm            # video stream.
   FileMaxSize 1G              # Maximum file size for buffering video
   ACL allow 127.0.0.1
   ACL allow localhost
</Feed>

<Stream test.webm>              # Output stream URL definition
   Feed feed1.ffm              # Feed from which to receive video
   Format webm

   # Audio settings
   AudioCodec vorbis
   AudioBitRate 64             # Audio bitrate

   # Video settings
   VideoCodec libvpx
   VideoSize 720x576           # Video resolution
   VideoFrameRate 25           # Video FPS

   AVOptionVideo cpu-used 10
   AVOptionVideo qmin 10
   AVOptionVideo qmax 42
   AVOptionVideo quality good
   AVOptionAudio flags +global_header
   PreRoll 15
   StartSendOnKey
   VideoBitRate 400            # Video bitrate
</Stream>
ffmpeg版本为2.4.2,启用了libvpx(Arch上的最新版本)。我得到一个错误:

[libvpx @ 0x20a21a0] CQ level 0 must be between minimum and maximum quantizer value (10-42)
在客户端。从调用
ffmpeg-h full
可以看出,无法设置cq级别,将qmin设置为0不起作用(出于某种原因,它最终为3,我想ffmpeg强制执行最小值)


这种配置似乎对互联网上的其他人有效,但我看不出如果cq级别默认为0,情况会如何。如果有人有任何想法,我将不胜感激。

-c:v libvpx
添加到您的控制台语法:

ffmpeg -f x11grab -r 25 -s 1280x800 -i :0.0 -c:v libvpx -f alsa -i pulse http://127.0.0.1:8090/feed1.ffm
此外,我建议你阅读

ffmpeg -f x11grab -r 25 -s 1280x800 -i :0.0 -c:v libvpx -f alsa -i pulse http://127.0.0.1:8090/feed1.ffm