[MPlayer-dev-eng] Re: [PATCH] add support for big-endian PCM output

Giacomo Comes comes at naic.edu
Wed Mar 21 20:23:44 CET 2007


On Wed, Mar 21, 2007 at 07:09:57PM +0000, Grant Edwards wrote:
> On 2007-03-21, Giacomo Comes <comes at naic.edu> wrote:
> 
> >> I needed to be able to encode to 16-bit uncompressed big-endian
> >> PCM.  I couldn't get either "-format sb16be" or "-af format=s16be" 
> >> to encode to big-endian format, so I gave up and added a "pcms"
> >> audio encoder that swaps the byte-order of the data stream.  In
> >> order to get lavf containers to label the stream correctly, I
> >> had to invent a new "wav" audio tag for big-endian PCM.
> >> 
> >> Although it works I have a feeling that this wasn't really the
> >> "right" way to do it.  If anybody would care to comment or
> >> suggest a better way to get big-endian PCM output please feel
> >> free to do so.
> >> 
> >> Anyway, the patch is available at 
> >> 
> >> http://www.visi.com/~grante/sansa/mplayer-1.0rc1-encode-bigendian-pcm.patch
> >
> > I did create some time ago a patch that allow to use the option -format 
> > togheter with -ao pcm:nowaveheader.
> 
> How does the output file end up with the selected audio format in the
> header?  It's set based on the format in the WAV header isn't it?

The output of -ao pcm:nowaveheader is a raw pcm file, no wav header.
I assume that you can use a raw pcm file, otherwise my patch wont help you.

Giacomo

> 
> > I'm sending it again with the hope that this time it will be considered
> > (it still apply against current svn).
> >
> > Could you use my (simpler) patch for your purpose?
> 
> Possibly.
> 
> I don't see how the output file is going to end up with the
> correct audio format in the header.  Not to say that it
> doesn't -- my understanding of how mencoder works is pretty
> fuzzy.
> 



More information about the MPlayer-dev-eng mailing list