0

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?

1
  • What does feed1.ffm say? Commented Nov 17, 2018 at 16:32

1 Answer 1

1

This should help you:
https://organicdesign.nz/Simple_video_streaming_with_ffserver
https://www.youtube.com/watch?v=cObC-nNUIwI
You should be able to tailor this info to your needs.

Like:

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.
And:

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 127.0.0.1
ACL allow 192.168.0.0 192.168.255.255

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 http://127.0.0.1:8090/feed1.ffm

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.