[FFmpeg-devel] [RFC] dts and ac3 autodetection in wav

Benjamin Larsson banan
Sat Apr 19 12:22:49 CEST 2008


Benjamin Larsson wrote:
> Michael Niedermayer wrote:
>> On Fri, Apr 18, 2008 at 11:42:28PM +0200, Benjamin Larsson wrote:
>>> Hi, this is just a first try. For some reason ac3 detection works but
>>> the audio doesn't play 
>> try -acodec copy -f image2 frame%d.raw
>> and look at the result are these valid ac3 frames
>> also i assume the file does play with some other player
>>
> 
> I think I know the issue for AC3, the bitstream might be byteswapped.
> 
>>> and dts gets the channel count wrong. So what is
>>> wrong with this approach?
>> well where is the channel number set? wav.c likely does set it
> 
> It does.
> 
>> , is this
>> value correct?
> 
> No.
> 
>> next comes the parser it seems out dts parser does not
>> set the channels,
> 
> Correct.
> 
>> and last is the decoder,
> 
> ffmpeg -i dtsinwav.wav does not execute the decoder, so even if I set
> the channels to 0 it doesn't work. Do I need to NULL the samplerate and
> other parameters to make it call the decoder ?

Note to self, NULLing both sample_rate and channels worked better.


> 
>> it does a
>>  if (!avctx->channels)
>> before setting the channels
>>

MvH
Benjamin Larsson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dtsac3inwav.diff
Type: text/x-patch
Size: 3124 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080419/e490f573/attachment.bin>



More information about the ffmpeg-devel mailing list