我正在尝试将我的桌面屏幕投射到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 -f x11grab -r 25 -s 1280x800 -i :0.0 -f alsa -i pulse http://127.0.0.1:8090/feed1.ffm
我的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-level的方法,将qmin设置为0也无效(由于某些原因最终变成了3,我想是因为ffmpeg强制执行了最小值)。尽管在互联网上这种配置似乎已经奏效,但我不明白如果cq-level默认为0那么它是如何工作的。如果有人有任何想法,我会非常感激。