/dev/dsp to RTP

Victor Sudakov vas at mpeks.tomsk.su
Mon Sep 19 06:12:46 UTC 2011


Victor Sudakov wrote:
> 
> Multicasting with ffmpeg works fine. The command line
> ffmpeg -i file.mp3 -acodec copy -f rtp rtp://239.8.8.8:5000 -re
> 
> does send a multicast stream which can be listened to with VLC (but
> not mplayer for some reason) on multiple hosts.
> 
> Now I need to figure out how to stream live sound from /dev/dsp. All
> my attemps to record sound from a USB audio interface, as simple as
> 
> ffmpeg -f oss -i /dev/dsp1 out.wav
> 
> have resulted so far in a severely distorted growl instead of normal
> voice. Do you know how to figure out the sampling rate and other
> parameters of the sound card? "cat /dev/sndstat"  does not output
> anything really useful.
> 
> The audio interface is not to blame because I use it all the time with
> linphone for SIP calls.

I have tried with a different soundcard and the following command
line:

ffmpeg -f oss -i /dev/dsp -acodec mp2 -f rtp rtp://239.8.8.8:5000 -re

seems to work fine. However, the delay of voice is about 2-3 seconds.
If I use the libmp3lame codec instead of mp2, the voice quality degrades.

I don't know what the problem with the first audio interface is, so
that linphone works fine but ffmpeg records distorted sounds.

-- 
Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
sip:sudakov at sibptus.tomsk.ru


More information about the freebsd-multimedia mailing list