Simple Live Stream - FFmpeg Uncomplicated Stream Script
This is a simple script to simplify streaming platforms like YouTUBE or Twitch through ffmpeg
- install ffmpeg
- Ubuntu: apt-get install ffmpeg
- Mac install ffmpeg on a mac
- Windows: unsupported but you probably can install windows subsystem for linux and apt-get ffmpeg
- Add stream keys:
- Get a Youtube Stream Key and put in config.sh as YOUTUBE_KEY
- Get a Twitch Stream Key and put in config.sh as YOUTUBE_KEY
- edit DEFAULT_VIDEO_SOURCE to reflect the video background file
- edit your playlist, default music.txt playlist with One music file per line in the following format: 'file filename.mp3' . Note the word file is required
- optionally run the screen command if you want to run it remotely
- optionally add an overlay to your video with add_image.sh
- run stream.sh with optional parameters below
./stream.sh
./stream.sh -t twitch -l YES
./stream.sh -p music.txt -t title.png
./stream.sh -p dance.txt -v video.mp4
./stream.sh -p play.txt -o title.png -v video.mov >log.txt @&1 -l YES &&
./add_image.sh {input.video} {output.video} {overlay.image}
- -p [playlist] provide a file playlist
- -t [target] provide a target - youtube or twitch
- -v [video] provide a video file for background
- -i [img.file] provide a image for the background, preferably transparent png
- -o [image] provide an image to overlay on video
- -d [dir] provide a dir to play all audio files in a directory
- -c [config] provide an alternate config to support multiple configs
- config.sh - variables to customize the script
- common.sh - common functions
- stream.sh - main stream script
- add_image.sh - overlay an image on an existing video