Re: gstreamer pipeline outputs a big-endian raw audio file instead of little-endian
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-
> clock-rate=(int)44100, width=16, height=16, encoding-
> encoding-params=(string)1, channels=(int)1, channel-positions=(int)1,
> payload=(int)96" ! rtpL16depay ! filesink
> 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.