0

Why does the following code not stream both audio sources?

#!/bin/bash

INRES="1920x1080"
OUTRES="1280x720"
FPS="20"
QUAL="medium"

STREAM_KEY=$(cat ~/.twitch_key)

avconv -g 0 \
-f x11grab -s $INRES  -r "$FPS" -i :0.0+0,768 \
-f pulse -i "alsa_input.pci-0000_00_1b.0.analog-stereo" \
-f pulse -i "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor" \
-vcodec libx264 -s $OUTRES -preset $QUAL \
-acodec libmp3lame -ar 44100 -threads 4 -qscale 1 -b 712k -bufsize 1024k \
-f flv "rtmp://live.justin.tv/app/$STREAM_KEY"
3
  • Not all audio cards support the monitor interface. Apr 6, 2014 at 8:51
  • Open System Settings > Sound and select your device and toogle enable/disable button at bottom of sound settings Window. Apr 6, 2014 at 10:47
  • @panchalsag that does not exist in 14.04. The Settings > Sound exists, but the enable/disable is not there. Apr 6, 2014 at 22:23

1 Answer 1

0

So I solved the problem:

-f pulse -i "alsa_input.pci-0000_00_1b.0.analog-stereo" \
-f pulse -i "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor" \
-filter_complex amix=inputs=2:duration=longest:dropout_transition=3 \

made the entire thing into a github https://github.com/michaeljwjr/twitchstream

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .