[FFmpeg-user] No Audio from ALSA device on Raspberry Pi
Mark L
mvlambiase at gmail.com
Mon Jan 31 13:49:25 EET 2022
The problem is that arecord and ffmpeg do not use the same devices.
Trying the hw"0 and sysdefault, as recommended in the links I posted from
ffmpeg.org.
Each program is calling the device natively and appears to recognize my
device designations without erring.
The reason I mentioned arecord is to demonstrate that I have tested the
microphone, and it works.
On Sun, Jan 30, 2022 at 11:01 PM Adam Nielsen via ffmpeg-user <
ffmpeg-user at ffmpeg.org> wrote:
> > Using 'arecord' I am able to record audio. I have a .asoundrc file in my
> > home dir and reference the device by the name in there ("-D dmic_sv").
>
> Where is the ffmpeg output from where you tried using this "dmic_sv"
> device that works with arecord?
>
> > But, when I try to record with ffmpeg, nothing.
> >
> > If I use the device "hw:0" it fails
>
> Does this work with arecord? If it works with arecord it should work
> with ffmpeg.
>
> > pi at cam-08:~/scripts $ ffmpeg -hide_banner -f alsa -channels 1
> -sample_rate
> > 44100 -i hw:0 -t 30 out.wav
> > [alsa @ 0x1997210] cannot open audio device hw:0 (No such file or
> directory)
> > hw:0: Input/output error
>
> hw:0 means card #0, but your device list shows you don't have a card at
> index 0 that supports recording:
>
> > pi at cam-08:~/scripts $ arecord -l
> > **** List of CAPTURE Hardware Devices ****
> > card 1: sndrpii2scard [snd_rpi_i2s_card], device 0:
> simple-card_codec_link
>
> hw:1,0 looks like the only valid device based on that output (card 1,
> device 0). Since there is no card 0 in the list, anything with hw:0
> will return "no such file" (which really means "no such audio device").
>
> > Again, I get a file, but when I play it it seems to have no audio.
>
> It looks like you're passing different device names to arecord and
> ffmpeg. It's probably best to stick to using the same devices for both
> otherwise it's difficult to know where the problem is.
>
> Cheers,
> Adam.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-user
mailing list