Last active
August 29, 2015 14:15
-
-
Save m13253/5170e9b58c032193758e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To record both mic and other audio input sources we need to add a named output sink. See: | |
# http://www.linuxquestions.org/questions/linux-software-2/alsa-and-pulseaudio-recording-multiple-input-devices-877614/ | |
# http://www.youtube.com/watch?v=oJADNOY615Y&feature=player_embedded | |
# Add this to your /etc/pulse/default.pa file | |
load-module module-null-sink sink_name=stream | |
load-module module-loopback latency_msec=5 sink=stream | |
load-module module-loopback latency_msec=5 sink=stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
STREAM_KEY="<justin.tv stream key>" | |
INRES="hd1080" | |
OUTRES="hd720" | |
FPS="24" | |
QUAL="fast" | |
ffmpeg -f x11grab -s "$INRES" -r "$FPS" -i :0.0+1680,0 \ | |
-f alsa -i pulse -ac 2 -vcodec libx264 -preset "$QUAL" -s "$OUTRES" \ | |
-acodec libmp3lame -ar 44100 -ab 128k -threads 0 \ | |
-f flv "rtmp://live.justin.tv/app/$STREAM_KEY flashver=FMLE/3.0\20(compatible;\20FMSc/1.0)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment