[FFmpeg-user] ffmpeg cannot capture audio from capture card

Moritz Barsnick barsnick at gmx.net
Wed Jul 31 13:30:53 EEST 2019


Hi,

On Wed, Jul 31, 2019 at 03:14:22 +0000, Md Ismail, Zakiah wrote:

> [out_0_0 @ 0x5643d94ec840] EOF on sink link out_0_0:default.=0.244x
> No more output streams to write to, finishing.
> size=       1kB time=00:00:27.37 bitrate=   0.4kbits/s speed=0.243x
> video:0kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 5.685131%
> Input file #0 (hw:CARD=nuc-03i,DEV=0):
>   Input stream #0:0 (audio): 8 packets read (1568 bytes); 8 frames decoded (392 samples);
>   Total: 8 packets (1568 bytes) demuxed
> Output file #0 (test-03i-debug.wav):
>   Output stream #0:0 (audio): 7 frames encoded (343 samples); 7 packets muxed (1372 bytes);
>   Total: 7 packets (1372 bytes) muxed
> 8 frames successfully decoded, 0 decoding errors
> [AVIOContext @ 0x5643d94e83c0] Statistics: 4 seeks, 4 writeouts
>
> The audio capture was not successful - the output file is always a 1KB/2KB file that cannot be played at all.

What do you mean with "cannot be played at all"? Do you not get a valid
WAV file, albeit with possibly very ugly sounds?

> My knowledge on ffmpeg is limited - can any of you help or just give me clues of what this might be?

That's indeed peculiar that only 392 samples arrived within 30 seconds.

Since you used arecord to show your ALSA devices: Can you successfully
record with arecord?

> ffmpeg version 4.0.4 Copyright (c) 2000-2019 the FFmpeg developers

This is a bit old, but as ALSA support hasn't been changed recently, it
probably doesn't matter. It's still worth trying a newer version. You
can grab a static binary for x86_64 from
https://johnvansickle.com/ffmpeg/
(left column, "git master", please).

Cheers,
Moritz


More information about the ffmpeg-user mailing list