2 Jun 2012 05:10
[PATCH] parameter on command line for raw lpcm audio got lost in dvdpcm codec
xun gu <noguxun <at> gmail.com>
2012-06-02 03:10:59 GMT
2012-06-02 03:10:59 GMT
How to reproduce the problem: try to play a raw pcm will below command : mplayer -demuxer rawaudio -rawaudio samplesize=2:channels=1:rate=44100:format=0x10001 http://res.wordjp.com/mplayer/rawaudio_patch/B-LPCM-1.pcm From the console output, we can see that the dvdpcm codec is using the default setting, all the setting on the command line were ignored. And audio is not played correctly. =============== Opening audio decoder: [dvdpcm] Uncompressed DVD/VOB LPCM audio decoder AUDIO: 48000 Hz, 2 ch, s16be, 1536.0 kbit/100.00% (ratio: 192000->192000) Selected audio codec: [dvdpcm] afm: dvdpcm (Uncompressed DVD/VOB LPCM) =============== after the fix, we can play the the same content like ./mplayer -demuxer rawaudio -rawaudio sampleformat=0x8:samplesize=2:channels=1:rate=44100:format=0x10001 http://res.wordjp.com/mplayer/rawaudio_patch/B-LPCM-1.pcm Description of the patch: 1. a new sampleformat config was added the value of the sampleformat was defined in af_format.h, the value 8 here means AF_FORMAT_S16_BE. 2. make sure other configsare not ignored, default value will not overwrite the pre-set values from configuration.(Continue reading)
RSS Feed