Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Audio recording (using ossaudio)

Dear current-users,

Can anyone else record audio correctly via ossaudio?
audiorecord seems to work as long as the frequency
divides the native frequency (see dmesg excerpt below)

  audiorecord -d /dev/audio -c 1 -s 48000 -e slinear_le -P 16 /tmp/test.wav

seems to work fine, and

  audiorecord -d /dev/audio -c 1 -s 44100 -e slinear_le -P 16 /tmp/test.wav

is a little noisy (maybe due to sample rate conversion?).


 ffmpeg4 -f oss -i /dev/audio -channels 1 -sample_rate 48000 /tmp/test.wav

is completely garbled and too short. The file also seems to be 2-channel,
so I think the recording settings are somehow not applied correctly.

On the other hand,

 gst-launch-1.0 osssrc \! audio/x-raw,channels=1,format=S16LE,rate=48000 \! wavenc \! filesink location=/tmp/test.wav

works fine (I am not sure what it does differently.

Apologies for not finding the cause of the issue, I have not had time to
investigate. I need ffmpeg recording to work in case I have to make videos
for my classes :-)

Kind regards,

Yorick Hardy

Home | Main Index | Thread Index | Old Index