I am simply trying to send a ffmpeg stream consisting of a desktop capture to a local ffserver:

 # ffserver >/dev/null 2>&1 &
 # ffmpeg -video_size 1600x900 -framerate 25 -f x11grab -i :0.0 -f alsa \
   -ac 2 -i hw:0 http://localhost:8090/feed1.ffm

I have the following error:

[mpeg1video @ 0x55652e5d5da0] MPEG-1/2 does not support 3/1 fps
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height

How can I avoid this error and stream my desktop to my ffserver?

  • What does feed1.ffm say? – Gyan Nov 17 '18 at 16:32

This should help you:
You should be able to tailor this info to your needs.


ffmpeg -r 25 -s 1600x900 -f x11grab -i :0.0 http://localhost:8090/feed1.ffm 

and have a separate feed for audio if you want.

ffmpeg -f alsa -i hw:0,0 -acodec pcm_s16le http://localhost:8090/feed2.ffm

Or: Figure out how to get the two to play nice together in a one liner.

Try useing these ACL settings:

ACL allow
ACL allow

With this Command:

ffserver >/dev/null 2>&1 &
ffmpeg -video_size 1600x900 -framerate 20 -f x11grab -i :0.0 \
-f alsa -ac 2 -i hw:0

It seems as though the connection may be being refused because of the word localhost.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.