Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jdetmold/7adefa6a65605f10ddbdfbedc8db6f5c to your computer and use it in GitHub Desktop.
Save jdetmold/7adefa6a65605f10ddbdfbedc8db6f5c to your computer and use it in GitHub Desktop.
#! /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