[MEncoder-users] Re: Don't get big-endian output with s16be

Grant Edwards grante at visi.com
Sun Jan 7 21:05:54 CET 2007


On 2007-01-07, Grant Edwards <grante at visi.com> wrote:

> mencoder -ovc lavc -lavcopts vcodec=mjpeg:vbitrate=150:vhq \
>          -vf rotate=1,scale=160:208 -ofps 15 -ffourcc mjpb \
>          -oac pcm -srate 11025 -format s16be \
>          -of lavf -lavfopts i_certify_that_my_video_stream_does_not_use_b_frame$
>          $1 -o $2
>
> [...] The problem is that
> the file produced above always contains little-endian sound
> data even though I've requested "-format s16be". The resulting
> file is always show by mplayer as s16le (the ID string is
> "sowt" instead of "twos").

I've searched the archive, and this problem has come up a few
times, and the stock answer is always "too old mplayer".  

At one point, I believe somebody was told to upgrade to pre8 to
solve the problem.  However, it's still broken in pre8, rc1,
and SVN: the pcm encoder hasn't changed.  It still always
encodes to little-endian.  What exactly is the "-format" option
supposed to control?  The pcm "encoder" is simplay a memcpy()
in all of the versions I've looked at.

I tested a quick hack in the pcm "encoder" that does a
byte-swap after the memcpy(), and then manually changed "sowt"
to "twos" in the resuling .mov file, and the file will play
properly, but how do I get mplayer to obey the '-format s16be'
command-line option??

-- 
Grant Edwards
grante at visi.com




More information about the MEncoder-users mailing list