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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Rohan0993
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?

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



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

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

Sebastian Dröge-3
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


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Rohan0993


Sebastian Dröge-3 wrote
> Add change the end of the pipeline to
>   ... rtpL16depay ! audioconvert ! audio/x-raw,format=S16LE ! filesink ...

This helped!

exactly what I was searching for. Thanks :)



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel