Asynchrounous Audio Sample Rate Conversion with gstreamer
Sebastian Dröge
sebastian at centricular.com
Mon May 2 06:08:55 UTC 2016
On Fr, 2016-04-29 at 21:11 +0200, Maik Scholz wrote:
>
> My example:
> My Transmitter (sending samples with (48-1)kHz):
> gst-launch-0.10 audiotestsrc freq=300 ! audio/x-raw-int,
> endianness="(int)1234", signed="(boolean)true", width="(int)16",
> depth="(int)16", rate="(int)47000", channels="(int)1" ! tcpclientsink
> host=localhost port=3000
>
> My Receiver: (Expeting 48kHz)
> gst-launch-0.10 tcpserversrc host=localhost port=3000 ! audio/x-raw-
> int, endianness="(int)1234", signed="(boolean)true", width="(int)16",
> depth="(int)16", rate="(int)48000", channels="(int)1" ! audioconvert
> ! audioresample ! audio/x-raw-int, endianness="(int)1234",
> signed="(boolean)true", width="(int)16", depth="(int)16",
> rate="(int)48000", channels="(int)1" ! autoaudiosink
Also some notes regarding your specific pipelines. First of all, don't
use GStreamer 0.10 but use a recent 1.x version, e.g. 1.8.1. 0.10 is no
longer maintained since more than 3 years and you're unlikely to get
much support for it anywhere.
Then, you should make sure that downstream of tcpserversrc always a
multiple of full samples arrives. That is, in your case an even buffer
size. This is not guaranteed because TCP is a stream protocol.
The audioparse element can ensure that this is the case for you.
--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160502/fdbd3a4e/attachment-0001.sig>
More information about the gstreamer-devel
mailing list