[FFmpeg-user] Audio sample format in alsa?
Simon Roberts
simon at dancingcloudservices.com
Wed Jul 1 04:11:53 EEST 2020
I'm trying to grab audio from a USB device that's managed by alsa. I find
that if I configure pulse to use this device, then I can grab successfully
with:
ffmpeg -f alsa -i pulse audiotest.mp3
But I need to refer to the hardware device directly, and I'm failing to do
that.
I have these cards:
$ cat /proc/asound/cards
0 [HDMI ]: HDA-Intel - HDA Intel HDMI
HDA Intel HDMI at 0xf7e34000 irq 44
1 [UA3FX ]: USB-Audio - UA-3FX
EDIROL UA-3FX at usb-0000:00:14.0-3, full speed
2 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf7e30000 irq 43
and these devices:
$ cat /proc/asound/devices
1: : sequencer
2: [ 1] : control
3: [ 1- 0]: digital audio playback
4: [ 1- 0]: digital audio capture
5: [ 1- 1]: digital audio playback
6: [ 0] : control
7: [ 0- 3]: digital audio playback
8: [ 0- 7]: digital audio playback
9: [ 0- 8]: digital audio playback
10: [ 0- 9]: digital audio playback
11: [ 0- 0]: hardware dependent
12: [ 2] : control
13: [ 2- 0]: digital audio playback
14: [ 2- 0]: digital audio capture
15: [ 2- 0]: hardware dependent
33: : timer
But when I try:
$ ffmpeg -f alsa -i hw:1,0 audiotest.mp3
I get:
[alsa @ 0x55ac7254fd80] cannot set sample format 0x10000 2 (Invalid
argument)
hw:1,0: Input/output error
But I'm not sure where to start with configuring this sample format. Can
someone point me in the right direction? I didn't find much in the alsa
section of the online manual.
Cheers,
Simon
More information about the ffmpeg-user
mailing list