Created
December 24, 2014 19:17
-
-
Save shaposhnikoff/d22e7a778480f5fcd8f5 to your computer and use it in GitHub Desktop.
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 -x | |
VBR="2500k" | |
FPS="30" | |
QUAL="medium" | |
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" | |
SOURCE="rtsp://xxx.xxx.xxx:554/Streaming/Channels/1" | |
KEY="xxxxxxxxxxxxxxxx.xxx-xxx-qms4-emuc" | |
#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" | |
ffmpeg -i "$SOURCE" -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -vcodec copy -acodec aac -ab 128k -g 50 -strict experimental -f flv "$YOUTUBE_URL/$KEY" | |
#ffmpeg -i "$SOURCE" -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -preset $QUAL -r $FPS -vcodec copy -acodec aac -b:v $VBR -ab 128k -g 50 -strict experimental -f flv "$YOUTUBE_URL/$K | |
EY" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
thank you for this script.
My video on youtube is a little choppy/jerky and if I look at the terminal from where I launched your script I have these messages:
Any idea why ?