Using GStreamer to Convert WAV -> RTP Results in Low-Quality RTP Stream
Peter Maersk-Moller
pmaersk at gmail.com
Tue May 16 17:01:01 UTC 2017
You could try setting the correct payload type for 2 channels 44100Hz L16.
I might work
See RFC3551. Or see IANAs list of allocated payload types
https://www.iana.org/assignments/rtp-parameters/rtp-parameters.xhtml#rtp-parameters-1
I could suggest payload type 10. Set for rtpL16pay (and for the sdp file)
Regards
Peter
On Fri, May 12, 2017 at 7:50 PM, Josh Dickson <joshdickson40 at gmail.com>
wrote:
> Hi Jan,
>
> Thank you, that is definitely what I need. I have gotten that pipeline
> working successfully, but now when I play it (via ffplay), it sounds
> comically slow/distorted.
>
> I am now using the pipeline:
>
> gst-launch-1.0 -m filesrc location=myfile.wav ! wavparse ! audioconvert !
> rtpL16pay ! udpsink host=127.0.0.1 port=12008
>
> I used the -v option to produce what I thought was a correct SDP file:
>
> v=0
> o=root IN IP4 127.0.0.1
> c=IN IP4 127.0.0.1
> s=My Name
> m=audio 12008 RTP/AVP 96
> a=rtpmap:96 L16/44100
> a=fmtp:96 media=audio; clock-rate=44100; encoding-name=L16; channels=2;
>
> I am playing the sound with:
>
> ffplay -i stream.sdp -protocol_whitelist file,udp,rtp
>
> Ffplay does open, and the sound resembles the original song, but it is
> very slowed down/distorted.
>
> Ffplay sees:
>
> bitrate: 705 kb/s
> Stream #0:0: Audio: pcm_s16be, 44100 Hz, 1 channels, s16, 705 kb/s
>
> (not sure if that will help)
>
> I have been trying to research what is wrong here but I am not sure what
> part of this I’ve messed up. Any help would be much appreciated. Thank you!
>
> Josh
>
>
>
> On Fri, May 12, 2017 at 01:39 Jan Schmidt <Jan Schmidt
> <Jan+Schmidt+%3Cthaytan at noraisin.net%3E>> wrote:
>
>> Hi,
>>
>> On 12/05/17 14:43, Josh Dickson wrote:
>>
> Hi,
>
> I am sorry in advance if this is not the correct place to ask a question…
>
> I am trying to convert a high-quality WAV file to RTP stream. I am
> successfully streaming with:
>
> gst-launch-1.0 -m filesrc location=myfile.wav ! wavparse ! audioconvert !
> audioresample ! alawenc ! rtppcmapay ! udpsink host=127.0.0.1 port=12000
>
>
> alaw is 8-bit @ 8khz and will generally sound awful for anything except
> speech. Try rtpL16pay for 16-bit CD quality audio.
>
> Cheers,
> Jan.
>
>
> I can then check the RTP stream from ffmpeg, which shows that is is 64
> kb/s, pct_alaw, 8000 Hz, 1 channel, s16.
>
> My WAV file is much higher quality than this (it is a sample of music at
> CD quality). I thought that the problem was with audioresample, but I have
> tried a number of changes and I cannot get any of them to stream correctly.
> Ideally the stream should be as high-quality as the WAV it’s generated from.
>
> I would greatly appreciate a pointer on how I might be able to do this.
> Thank you!
>
> Josh
>
>
>
>
>
>
>
> _______________________________________________
> gstreamer-devel mailing listgstreamer-devel at lists.freedesktop.orghttps://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170516/5681488f/attachment.html>
More information about the gstreamer-devel
mailing list