Mediocre Gopher
Mediocre Gopher

Reputation: 2304

Streaming webm with ffmpeg/ffserver

I'm attempting to cast my desktop screen to an ffserver and stream it as a webm. I'm using the following ffserver configuration:

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

And the following command on my desktop:

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

With ffmpeg being version 2.4.2 and with libvpx enabled (latest on Arch). I get the error:

[libvpx @ 0x20a21a0] CQ level 0 must be between minimum and maximum quantizer value (10-42)

On the client side. As far as I can tell from calling ffmpeg -h full there's no way of setting the cq-level, and setting qmin to 0 doesn't work (it ends up as 3 for some reason, I guess ffmpeg enforces a minimum).

This configuration seems to have worked for others on the internet, but I can't see how if cq-level defaults 0. If anyone has any ideas I'd really appreciate it.

Upvotes: 3

Views: 14877

Answers (1)

grzebyk
grzebyk

Reputation: 1034

Add -c:v libvpx to your console syntax:

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

Also I'd recommend reading the ffmpeg streaming guide

Upvotes: 6

Related Questions