1

I am using RPI 2 and trying to record a screen and stream it on udp using ffmpeg. I tried the following lines

ffmpeg -f video4linux2 -i video="screen-capture-recorder":audio="Stereo Mix (IDT High Definition" -vcodec libx264 -preset ultrafast -tune zerolatency -r 10 -async 1 -acodec libmp3lame -ab 24k -ar 22050 -bsf:v h264_mp4toannexb -maxrate 750k -bufsize 5000k -f mpegts udp://239.0.1.23:1234

But I am getting error.

The ffmpeg program is only provided for script compatibility and will be removed in a future release. It has been deprecated in the Libav project to allow for incompatible command line syntax improvements in its replacement called avconv (see Changelog for details). Please use avconv instead.

Unknown input format: 'video4linux2'

I also tried x11grab but still getting the same error.

Please help!

  • How about the quoted avconv program that is suggested? – SlySven Dec 31 '15 at 21:39
  • As @SlySven suggested, I tried avconv and it is working fine now. Thanks :) – aug born Jan 1 '16 at 5:44
  • How about writing it up as an answer and then accepting it? That way this doesn't float around as another unanswered question, the fact that you found you could record a screen and stream it on UDP may be useful for someone else...! – SlySven Jan 1 '16 at 20:11
0

I reinstalled ffmpeg. Doing that, x11grab error was resolved but i faced lot more issues after that. Finally I move to avconv and used the following line to stream desktop recording:

avconv -f x11grab -r 25 -s 1920x540 -i :0.0 -vcodec libx264 -an udp://239.0.1.23:1234?buffer_size=10000B/a.avi

The links, I used for reference are,

For streaming

For recording

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.