Article 6QBFD How to play back big endian PCM (raw audio) files in mplayer?

How to play back big endian PCM (raw audio) files in mplayer?

by
exerceo
from LinuxQuestions.org on (#6QBFD)
ffplay can already do it:

Code:ffplay -i filename.pcm -acodec pcm_s16beDoes mplayer have such a straightforward way or not?

----

Details:

I would like to play a RAW (PCM) audio file with s16be (signed 16-bit big endian) audio.

mplayer can play RAW audio like this:
Code:mplayer -demuxer rawaudio -rawaudio channels=2:rate=44100 filename.pcmBut it only plays back in s16le (little endian).

In the manual, there is an audio filter, but it doesn't change anything.
Code:-af format=s16beEven if it did, I doubt it would because "-af" seems not to work on byte level but at the soundcard level.

There is also this:
Code:format=<value>
fourcc in hexUnfortunately, there is no fourcc (four character code) for s16be (signed 16-bit big endian).

One can import the RAW audio in audacity and reverse its endianess to little endian, but I prefer to play it directly in mplayer.

Is there an option for this?
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments