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

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


On 28/08/13 08:29, Dave wrote:
> see below

Please just cut the text to the part of interest.

> Based on your example, I tried this:
> 
> OUTPUT="/path/audio_`date +%Y-%m-%d_%H%M`.flac"
> avconv \
> -ac 1 -f pulse -i
> alsa_input.usb-Focusrite_Scarlett_2i2_USB-00-USB.analog-stereo \
> -ac 1 -f pulse -i

Still -ac 1 looks wrong.

> alsa_output.usb-Focusrite_Scarlett_2i2_USB-00-USB.analog-stereo.monitor \
> -map 0:a \
> -map 1:a \
> -c:a flac \
> -threads 0 \
> -y $OUTPUT
> exit 0
> 
> I end up with a single channel in the output file and the audio is garbled.

paste the avconv message. Here it works as supposed w/out -ac 1, try
using the option documented in the pulse section I pointed you.

> If I record either of those inputs alone, it works as expected. Combining
> them is the problem. The way I would like to combine them is like the left
> and right channels of a stereo recording. Each input if mono, of course.

https://libav.org/avconv.html#amix

Is what you need.

lu


More information about the libav-tools mailing list