SHOW:
|
|
- or go back to the newest paste.
| 1 | SCRIPT | |
| 2 | --------- | |
| 3 | #!/bin/shh | |
| 4 | # Streams Desktop to Twitch/Justin.tv | |
| 5 | ||
| 6 | INRES="1600x900" | |
| 7 | OUTRES="1280x720" | |
| 8 | FPS="30" | |
| 9 | QUAL="medium" | |
| 10 | BITRATE="256k" | |
| 11 | STREAM_KEY="live_40412197_hV3SclTOv5M23rZ7GuOKuNnDCSkXsL" | |
| 12 | ||
| 13 | ffmpeg \ | |
| 14 | -f x11grab \ | |
| 15 | -s "$INRES" \ | |
| 16 | -r "$FPS" \ | |
| 17 | -i :0.0+0,299 \ | |
| 18 | - | -i hw:0,0 \ |
| 18 | + | |
| 19 | -f alsa \ | |
| 20 | -i hw:3,0 \ | |
| 21 | - | -preset "$BITR" \ |
| 21 | + | |
| 22 | -vcodec libx264 \ | |
| 23 | -preset "$QUAL" \ | |
| 24 | -s "$OUTRES" \ | |
| 25 | -acodec libmp3lame \ | |
| 26 | -ar 44100 \ | |
| 27 | -threads 4 \ | |
| 28 | - | -f flv "rtmp://live.justin.tv/app/$STREAM_KEY" |
| 28 | + | |
| 29 | -pix_fmt yuv420p \ | |
| 30 | -f flv "rtmp://live.justin.tv/app/$STREAM_KEY" | |
| 31 | ---------End Script | |
| 32 | ||
| 33 | ||
| 34 | Output | |
| 35 | --------- | |
| 36 | ffmpeg version 0.8.6-6:0.8.6-1ubuntu2, Copyright (c) 2000-2013 the Libav developers | |
| 37 | built on Mar 30 2013 22:20:06 with gcc 4.7.2 | |
| 38 | *** THIS PROGRAM IS DEPRECATED *** | |
| 39 | This program is only provided for compatibility and will be removed in a future release. Please use avconv instead. | |
| 40 | [x11grab @ 0x2589b80] device: :0.0+0,299 -> display: :0.0 x: 0 y: 299 width: 1600 height: 900 | |
| 41 | [x11grab @ 0x2589b80] shared memory extension found | |
| 42 | [x11grab @ 0x2589b80] Estimating duration from bitrate, this may be inaccurate | |
| 43 | Input #0, x11grab, from ':0.0+0,299': | |
| 44 | Duration: N/A, start: 1368300010.795797, bitrate: 1382400 kb/s | |
| 45 | Stream #0.0: Video: rawvideo, bgra, 1600x900, 1382400 kb/s, 30 tbr, 1000k tbn, 30 tbc | |
| 46 | [alsa @ 0x2596da0] Estimating duration from bitrate, this may be inaccurate | |
| 47 | Input #1, alsa, from 'hw:3,0': | |
| 48 | Duration: N/A, start: 3449.763855, bitrate: N/A | |
| 49 | Stream #1.0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s | |
| 50 | Unrecognized option 'af' | |
| 51 | Failed to set value 'aresample' for option 'af' | |
| 52 | ---------end output |