Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- streaming() {
- INRES="640x480" # input resolution
- OUTRES="640x480"
- FPS="30" # target FPS
- QUAL="fast" # one of the many FFMPEG preset
- STREAM_KEY="$1"
- URL="rtmp://live.twitch.tv/app/$STREAM_KEY" #flashver=FMLE/3.0\20(compatible;\20FMSc/1.0)"
- ffmpeg -f v4l2 -s "$INRES" -r "$FPS" -i /dev/video0 -ab 44100 \
- -f alsa -ac 2 -i default -vcodec libx264 -pix_fmt yuv420p -crf 30 -preset "$QUAL" -s "640x480" \
- -acodec libmp3lame -ar 44100 -threads 0 \
- -f flv "$URL"
- }
Advertisement
Add Comment
Please, Sign In to add comment