gstreamer pipeline outputs a big-endian raw audio file instead of little-endian

Sebastian Dröge sebastian at centricular.com
Tue Feb 19 07:53:43 UTC 2019


On Mon, 2019-02-18 at 22:34 -0600, Rohan0993 wrote:
> Hi all,
> 
> I am making a pipeline where I am making rtp packets with L16 PCM
> using wave file and throwing them at a local port
> 
> *gst-launch-1.0 filesrc location=/path/to/wave/file/Tornado.wav !
> wavparse !
> audioconvert ! audio/x-raw,channels=1,depth=16,width=16,rate=44100 !
> rtpL16pay  ! udpsink host=xxx.xxx.xxx.xxx port=5000*
> 
> Then, I am catching the packets on that port and depayloading the
> data into a file.
> 
> *gst-launch-1.0 udpsrc port=5000 ! "application/x-
> rtp,media=(string)audio,
> clock-rate=(int)44100, width=16, height=16, encoding-
> name=(string)L16,
> encoding-params=(string)1, channels=(int)1, channel-positions=(int)1,
> payload=(int)96" ! rtpL16depay ! filesink
> location=/path/to/dump/raw/data/Tornado.raw*
> 
> I have noticed that the data being written in the file is big-endian, 
> while I require it to be little-endian.
> What do I do?

Add change the end of the pipeline to
  ... rtpL16depay ! audioconvert ! audio/x-raw,format=S16LE ! filesink ...

This converts the audio back to S16LE instead of S16BE.

The L16 RTP spec only allows big endian.

> I have tried adding the "endianness=1234" and "endianness=4321" in
> both sender and receiver sides, but it didn't work.

That's GStreamer 0.10 caps.

-- 
Sebastian Dröge, Centricular Ltd · https://www.centricular.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190219/539eb97e/attachment.sig>


More information about the gstreamer-devel mailing list