https://github.com/younelan/simplelivestream
Simple Live Stream using Bash and ffmpeg
https://github.com/younelan/simplelivestream
broadcasting ffmpeg ffmpeg-wrapper music-player radio streaming twitch youtube
Last synced: about 2 months ago
JSON representation
Simple Live Stream using Bash and ffmpeg
- Host: GitHub
- URL: https://github.com/younelan/simplelivestream
- Owner: younelan
- Created: 2022-08-09T00:03:28.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-03T02:48:45.000Z (over 2 years ago)
- Last Synced: 2023-10-03T12:09:26.840Z (over 2 years ago)
- Topics: broadcasting, ffmpeg, ffmpeg-wrapper, music-player, radio, streaming, twitch, youtube
- Language: Shell
- Homepage:
- Size: 6.08 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
*Simple Live Stream* - FFmpeg Uncomplicated Stream Script
This is a simple script to simplify streaming platforms like **YouTUBE** or **Twitch** through **ffmpeg**
## Steps to make it work:
- 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
## Syntax examples:
### stream using defaults in config.sh
> ./stream.sh
### stream to twitch restarting on a loop if streaming fails
> ./stream.sh -t twitch -l YES
### stream playlist "music.txt" with background "title.png"
> ./stream.sh -p music.txt -t title.png
### stream playlist dance.txt with video video.mp4 as a background
> ./stream.sh -p dance.txt -v video.mp4
### stream playlist play.txt with overlay overlay title.png and video video.mov in the background
> ./stream.sh -p play.txt -o title.png -v video.mov >log.txt @&1 -l YES &&
### pre-create a video with your overlay to use less resources while streaming
> ./add_image.sh {input.video} {output.video} {overlay.image}
## optional parameters
- **-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
## main files:
- **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