Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Account Info
- CHANNEL="CHANNEL"
- user="USERNAME"
- passw="PASSWORD"
- RECORD="false" # Record stream
- APILOT="true" # AutoPilot
- #Aspect and Resolution
- W_RATIO=16
- H_RATIO=9
- SOURCE="x11grab"
- VINPUT=":0.0"
- #SOURCE="video4linux2"
- #VINPUT="/dev/video0"
- INRES="$(xwininfo -root | grep 'geometry' | awk '{print $2;}')" # Input resolution
- #OUTRES="hd480" # Output resolution (480p)
- OUTRES="hd720" # Output resolution (720p)
- #OUTRES="hd1080" # Output resolution (native)
- VIDBITRATE="385k" # Video bitrate
- THREADS="auto" # Number of threads/cores available to each stream ("A V")
- FRAMESKIP="none" # Possible values:
- #‘none’
- #‘default’
- #‘noref’
- #‘bidir’
- #‘nokey’
- #‘all’
- ACHANNELS="2" # Specify mono or stereo (1=mono|2=stereo)
- ABITRATE="44100" # Audio bitrate (CD Quality)
- #ABITRATE="22050" # Audio bitrate (Radio Quality)
- AOFFSET="0" #Audio offset. Defines how long a delay till the sound plays (in seconds)
- FPS="24" # target FPS
- QUAL="ultrafast" # one of the many FFMPEG presets on (k)ubuntu found in /usr/share/ffmpeg
- # If you have low bandwidth, put the qual preset on 'fast' (upload bandwidth)
- # If you have medium bandwitch put it on normal to medium
- notify-send "LiveStream" "Stream started. Press 'Ctrl+C' to stop streaming. Recording: '$RECORD'" -i ~/.livestream/livestream-icon.png
- avconv -f x11grab -framerate $FPS -show_region 1 -video_size $INRES -i :0.0+0,0 -f pulse -i default -r $FPS -s $OUTRES -ar $ABITRATE -vb $VIDBITRATE -ab 128k -strict experimental -y -vcodec libx264 -bufsize 2000k -preset ultrafast -acodec mp3 -bufsize 2000k -g 48 -f flv "rtmp://publish.livestream.com/mogulus/$CHANNEL/username=$user/password=$passw/isAutoLive=true/autoVOD=true/autoRecord=$RECORD/autoPilot=$APILOT/aspectWidth=$W_RATIO/aspectHeight=$H_RATIO app=mogulus/$CHANNEL/username=$user/password=$passw/isAutoLive=true/autoVOD=true/autoRecord=$RECORD/autoPilot=$APILOT/aspectWidth=$W_RATIO/aspectHeight=$H_RATIO"
- notify-send "LiveStream" "Stream stopped." -i ~/.livestream/livestream-icon.png
- exit
- ## Removed extra (apparently useless) streams.
- ## Complete overhaul of avconv options and variables. Script is buggy, but is at least somewhat functional again.
- ## Restored input FPS value, more cleanup, fixed input/output resolution.
- ## Lesser overhaul, almost there. Focusing on video claeity issues.
Add Comment
Please, Sign In to add comment