| | 56 | Here is how you stream to twitch.tv or similar services (rtmp protocol), using ffmpeg 1.0 or ffmpeg-git (tested on 2012-11-12), this is also for pulseaudio users: |
| | 57 | Example 1, no sound: |
| | 58 | {{{ |
| | 59 | ffmpeg -f x11grab -s 1920x1200 -r 15 -i :0.0 -c:v libx264 -preset fast -pix_fmt yuv420p -s 1280x800 -threads 0 -f flv "rtmp://live.twitch.tv/app/live_********_******************************" |
| | 60 | }}} |
| | 61 | Example 2, first screen (on dual screen setup, or if on a single screen): |
| | 62 | {{{ |
| | 63 | ffmpeg -f x11grab -s 1920x1200 -r 15 -i :0.0 -f pulse -ac 2 -i default -c:v libx264 -preset fast -pix_fmt yuv420p -s 1280x800 -c:a libmp3lame -ab 96k -ar 22050 -threads 0 -f flv "rtmp://live.twitch.tv/app/live_********_******************************" |
| | 64 | }}} |
| | 65 | Example 3, second screen (on dual screen setup): |
| | 66 | {{{ |
| | 67 | ffmpeg -f x11grab -s 1920x1200 -r 15 -i :0.0+1920,0 -f pulse -ac 2 -i default -c:v libx264 -preset fast -pix_fmt yuv420p -s 1280x800 -c:a libmp3lame -ab 96k -ar 22050 -threads 0 -f flv "rtmp://live.twitch.tv/app/live_********_******************************" |
| | 68 | }}} |
| | 69 | |