Skip to content

Instantly share code, notes, and snippets.

@troke12
Created February 3, 2022 13:16
Show Gist options
  • Save troke12/f93ad43aa750d999b01141e771d268bf to your computer and use it in GitHub Desktop.
Save troke12/f93ad43aa750d999b01141e771d268bf to your computer and use it in GitHub Desktop.
Untuk youfi anjing
#!/bin/bash
streamKey="MASUKINDISINI"
namaFile="data/youfi_anjing.mp4"
ffmpeg -re -stream_loop -1 -i $namaFile -c copy -f flv -flvflags no_duration_filesize rtmp://a.rtmp.youtube.com/live2/$streamKey
@troke12
Copy link
Author

troke12 commented Feb 13, 2022

#! /bin/bash

VBR="2500k"
FPS="30"
QUAL="medium"
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2"

SOURCE="youfimp4.mp4"
KEY="...."

ffmpeg \
    -re -stream_loop -1 \
    -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"
    -flvflags no_duration_filesize

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