Advertisement
Guest User

code

a guest
Jan 26th, 2022
61
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #! /bin/bash
  2.  
  3. VBR="1500k"
  4. FPS="24"
  5. QUAL="superfast"
  6.  
  7. YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"
  8. KEY="z5k3-8888-69qu-9999"
  9.  
  10. VIDEO_SOURCE="/home/root/cover.gif"
  11. AUDIO_SOURCE="http://134.122.81.86/radio/8000/radio.mp3"
  12. NP_SOURCE="/home/root/song.txt"
  13. FONT="/home/root/VinMonoPro-Light.ttf"
  14.  
  15. ffmpeg \
  16.     -re -f lavfi -i "movie=filename=$VIDEO_SOURCE:loop=0, setpts=N/(FRAME_RATE*TB)" \
  17.     -thread_queue_size 512 -i "$AUDIO_SOURCE" \
  18.     -map 0:v:0 -map 1:a:0 \
  19.     -map_metadata:g 1:g \
  20.     -vf drawtext="fontsize=20: fontfile=$FONT: \
  21.        box=0: boxcolor=black@0.5: boxborderw=20: \
  22.        textfile=$NP_SOURCE: reload=1: fontcolor=white@0.8: x=50: y=th" \
  23.     -vcodec libx264 -pix_fmt yuv420p -preset $QUAL -r $FPS -g $(($FPS * 2)) -b:v $VBR \
  24.     -acodec libmp3lame -ar 44100 -threads 6 -qscale:v 3 -b:a 320000 -bufsize 512k \
  25.     -f flv "$YOUTUBE_URL/$KEY"
Advertisement
RAW Paste Data Copied
Advertisement