-
-
Save Bioblaze/90f3299bad25e21fa5f2d4aba4628a3e 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