Created
April 6, 2015 18:21
-
-
Save danzeeeman/14f2bc6a0af5d81cdde3 to your computer and use it in GitHub Desktop.
Stream to YouTube
This file contains hidden or 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 | |
VBR="2500k" # Bitrate | |
FPS="30" # FPS | |
QUAL="medium" # Quality | |
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL | |
SOURCE="udp://239.255.139.0:1234" # Source | |
KEY="XXXX.XXXXXXX" # Event (from youtube) | |
ffmpeg \ | |
-i "$SOURCE" -deinterlace \ | |
-vcodec libx264 -pix_fmt yuv420p -preset $QUAL -r $FPS -g $(($FPS * 2)) -b:v $VBR \ | |
-acodec libmp3lame -ar 44100 -threads 6 -qscale 3 -b:a 712000 -bufsize 512k \ | |
-f flv "$YOUTUBE_URL/$KEY" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment