Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4937

Camera board • Recording audio with libcamera-vid gives poor sound quality?

$
0
0
I am using a stereo condensor Samson Go mic.

With this command I get crystal clear audio:

Code:

 arecord -D hw:3,0 -d 5 -f cd test.wav -c 2
However, with this command I get low quality audio ( lacks highs and sounds muddy and bassy and lots of echo ):

Code:

libcamera-vid -t 0 --width 1440 --height 1080 --autofocus-mode default --codec libav --libav-audio --audio-source alsa --audio-device hw:3,0  -o test.mp4
I have also tried this command that uses ffmpeg instead of libcamera-vid to capture the audio. The audio is crystal clear, but the audio and video are out of sync by a second. Also it drops frames randomnly. So quite unuseable.

Code:

libcamera-vid -t 0 --width 1440 --height 1080 --autofocus-mode default -o - | ffmpeg -i - -f alsa -itsoffset 1.1 -async 1 -i hw:3,0 -map 0:0  -map 1:0 -vcodec copy -acodec aac -strict -2 test.mp4
Also tried this idea from another post which gives bad quality audio and out of sync audio:

Code:

libcamera-vid -t 0 --width 1440 --height 1080 --autofocus-mode default -o - | ffmpeg -thread_queue_size 32K -itsoffset 0 -i - -f alsa -itsoffset -1.1 -async 1 -thread_queue_size 32K -i hw:3,0 -c:a aac -b:a 32k -async 1 -c:v copy test.mp4 
I have tried using plughw instead of hw to no avail.

Here is the output of my mic:

Code:

squash@court3:/var/www/html/share $ arecord -l**** List of CAPTURE Hardware Devices ****card 3: Mic [Samson Go Mic], device 0: USB Audio [USB Audio]  Subdevices: 1/1  Subdevice #0: subdevice #0

Statistics: Posted by thisisalloneword — Fri May 03, 2024 10:40 pm



Viewing all articles
Browse latest Browse all 4937

Trending Articles