mardi 23 décembre 2014

Twitch stream with FFMpeg using multiple audio inputs

I'm using the following script to try and stream my linux desktop to Twitch.tv, I have the stream working, but I want to throw in 2 audio inputs into the stream (one for the game, and one for my mic)


Here's the script



#! /bin/bash
INRES="1900x600"
OUTRES="800x600"
INAUD="pulse"
FPS="25
STREAM_KEY=$(cat ~/.twitch_key)
STREAM_URL="rtmp://live.twitch.tv/app/$STREAM_KEY"

ffmpeg \
-f alsa -ac 2 -i "$INAUD" \
-f x11grab -s "$INRES" -r "$FPS" -i :0.0+1280,0 \
-vcodec libx264 -s "$OUTRES" -pix_fmt yuv420p \
-acodec libmp3lame -threads 6 -qscale 5 -b 64KB \
-f flv -ar 44100 "$STREAM_URL"


I use Pulseaudio and have pavucontrol, if that matters. The game would be on "Build-in Audio Analog Stereo" and the mic is from the recording device "Webcam C110 Analog Mono"


Thanks in advance.


Aucun commentaire:

Enregistrer un commentaire