Skip to content

Instantly share code, notes, and snippets.

@cds
Created August 13, 2021 19:16
Show Gist options
  • Save cds/0a773ae9d34eb8c1ab6e5f19eb09d7ed to your computer and use it in GitHub Desktop.
Save cds/0a773ae9d34eb8c1ab6e5f19eb09d7ed to your computer and use it in GitHub Desktop.
#! /bin/bash
VBR="1500k"
FPS="24"
QUAL="superfast"
YOUTUBE_URL="rtmp://x.rtmp.youtube.com/live2"
KEY="-=-=-this-isis-keyy-=-=-"
VIDEO_SOURCE="/root/yt/cover.gif"
AUDIO_SOURCE="http://loacation/radio/list/song.mp3"
ffmpeg \
-re -f lavfi -i "movie=filename=$VIDEO_SOURCE:loop=0, setpts=N/(FRAME_RATE*TB)" \
-thread_queue_size 512 -i "$AUDIO_SOURCE" \
-map 0:v:0 -map 1:a:0 \
-map_metadata:g 1:g \
-vcodec libx264 -pix_fmt yuv420p -preset $QUAL -r $FPS -g $(($FPS * 2)) -b:v $VBR \
-acodec libmp3lame -ar 44100 -threads 6 -qscale:v 3 -b:a 320000 -bufsize 512k \
-f flv "$YOUTUBE_URL/$KEY"
@cds
Copy link
Author

cds commented Aug 13, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment