Skip to content

Instantly share code, notes, and snippets.

@Plazmaz
Created May 21, 2017 00:13
Show Gist options
  • Save Plazmaz/cd5ddfe43ecb849ac598ce8966dbc227 to your computer and use it in GitHub Desktop.
Save Plazmaz/cd5ddfe43ecb849ac598ce8966dbc227 to your computer and use it in GitHub Desktop.
Stream an image file to twitch
#! /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