[MPlayer-dev-eng] Re: [PATCH] add support for big-endian PCM output
Grant Edwards
grante at visi.com
Wed Mar 21 20:42:05 CET 2007
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.
No, I need a Quicktime file with s16be PCM audio:
$ mplayer -identify AndyBarkerPI.mov
MPlayer 1.0rc1-3.4.6 (C) 2000-2006 MPlayer Team
[...]
Playing AndyBarkerPI.mov.
ISO: File Type Major Brand: Original QuickTime
Quicktime/MOV file format detected.
ID_VIDEO_ID=0
ID_AUDIO_ID=1
VIDEO: [mjpb] 160x208 24bpp 15.000 fps 0.0 kbps ( 0.0 kbyte/s)
ID_FILENAME=AndyBarkerPI.mov
ID_DEMUXER=mov
ID_VIDEO_FORMAT=mjpb
ID_VIDEO_BITRATE=0
ID_VIDEO_WIDTH=160
ID_VIDEO_HEIGHT=208
ID_VIDEO_FPS=15.000
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=twos
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=11025
ID_AUDIO_NCH=2
ID_LENGTH=1796.40
[...]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffmjpegb] vfm: ffmpeg (FFmpeg MJPEG-B decoder)
==========================================================================
ID_VIDEO_CODEC=ffmjpegb
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 11025 Hz, 2 ch, s16be, 352.8 kbit/100.00% (ratio:
44100->44100)
ID_AUDIO_BITRATE=352800
ID_AUDIO_RATE=11025
ID_AUDIO_NCH=2
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
AO: [oss] 11025Hz 2ch s16be (2 bytes per sample)
ID_AUDIO_CODEC=pcm
--
Grant Edwards grante Yow! Send your questions
at to "ASK ZIPPY", Box 40474,
visi.com San Francisco, CA 94140,
USA
More information about the MPlayer-dev-eng
mailing list