[libav-tools] need help defining audio stream inputs to avconv

Luca Barbato lu_zero at gentoo.org
Wed Aug 28 08:04:45 CEST 2013


On 28/08/13 07:14, Dave wrote:
> This is almost working. However, the recorded audio is garbled and there is
> only one track. My goal was to record each of these two sources to its own
> channel (like left & right in a stereo audio file).



> I'm not sure what the problem is because I'm new to everything related to
> audio.
> 
> #!/bin/bash
> 
> pacmd list-cards | grep -qi -e
> "alsa_output.usb-Focusrite_Scarlett_2i2_USB-00-USB.analog-stereo.monitor"
> if [ $? -ne 0 ]; then
>     echo "there seems to be a problem with the Focusrite_Scarlett_2i2..."
>     exit 1
> fi
> 
> OUTPUT="/path/audio_`date +%Y-%m-%d_%H%M`.flac"
> ffmpeg \

If you are using ffmpeg I'm not sure how I can help you, I have no idea
how this command line is parsed.

> -ac 1 -f pulse -i
> alsa_input.usb-Focusrite_Scarlett_2i2_USB-00-USB.analog-stereo -name
> localmic \

-ac 1 looks wrong to me.

> -ac 1 -f pulse -i
> alsa_output.usb-Focusrite_Scarlett_2i2_USB-00-USB.analog-stereo.monitor
> -name remote \
> -map 0:0 -map 1:0 \
> -c:a flac \
> -threads 0 \
> -y $OUTPUT
> exit 0

You are recording an input and the monitor of that input?

lu




More information about the libav-tools mailing list