Created
May 21, 2017 00:13
-
-
Save Plazmaz/cd5ddfe43ecb849ac598ce8966dbc227 to your computer and use it in GitHub Desktop.
Stream an image file to twitch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
IN_IMG="1.jpg" | |
STREAM_KEY="live_xxxxxxxxx_xxxxxxxxxxxxxx" | |
ffmpeg -re -loop 1 -framerate 2 -i $IN_IMG \ | |
-f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 \ | |
-c:a libmp3lame \ | |
-vcodec libx264 -pix_fmt yuv420p -maxrate 2048k -bufsize 2048k \ | |
-framerate 30 -g 2 -strict experimental -f flv \ | |
-strict experimental -f flv rtmp://live.twitch.tv/app/$STREAM_KEY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment