[FFmpeg-user] desktop streaming
Lou
lou at lrcd.com
Wed Feb 19 19:24:53 CET 2014
On Wed, 19 Feb 2014 17:07:58 +0100
YuGiOhJCJ Mailing-List <yugiohjcj-mailinglist at laposte.net> wrote:
> On Wed, 19 Feb 2014 18:15:43 +0700
> nugroho <nugroho.redbuff at gmail.com> wrote:
>
> > Hi, I have ffmpeg installed in debian linux. I also have a flash
> > streaming server located at http://a.b.c.d/app/stream.
> > Now, I would like to stream my desktop include the sound to the
> > streaming server. So what kind of ffmpeg syntax should be? Is it like
> > this one bellow?
> >
> > _ffmpeg -video_size 1024x768 -framerate 25 -f x11grab -i :0.0+100,200 -f
> > flv rtmp://a.b.c.d/app/__stream_
> >
> > thanks for help!
>
> Hello,
>
> You have all the instructions you need here:
> https://trac.ffmpeg.org/wiki/StreamingGuide
Also see:
http://trac.ffmpeg.org/wiki/EncodingForStreamingSites
> In order to stream, I use the following command:
> ffmpeg -y -f alsa -i default -f x11grab -r 10 -s 640x480 -async 1 -i :0.0 -strict -2 -c:a aac -c:v libx264 -pix_fmt yuv420p -preset ultrafast -s 640x480 -threads 0 -ar 44100 -b:a 64k -b:v 64k -bufsize 64k -f flv "rtmp://live-fra.twitch.tv/app/`cat ~/twitch.key`"
* Is "-async 1" required?
* "-c:a libmp3lame" can be used instead of "-c:a aac -strict -2" if you
prefer its output.
* "-threads 0" is default for libx264, so you can omit that if you like.
* 64k for video is low (for almost all content at 640x480), but you
mentioned this already.
* You might be able to use a slower -preset depending on your hardware.
* "-framerate" should be used instead of "-r" for x11grab input.
* I believe Twitch recommends a Group of Pictures interval of 2 seconds,
so in your example that would be an output option of "-g 20".
* -bufsize for gaming is probably 1-2 seconds (I'm guessing here), so in
your example that would be maxrate * 1-2 = 64k-128k.
* -maxrate can be ~80% of your upload data rate speed - audio bitrate,
or if you have a fast upload data rate it can be the minimum download
data rate speed that you want your viewers to have without additional
buffering.
More information about the ffmpeg-user
mailing list