[issue1850] AC3 transcode (eg to WAV) - bad audio

2010-03-28 Thread Justin Ruggles

Justin Ruggles justin.rugg...@gmail.com added the comment:

So right now the application can know that the number of channels changes 
because avctx-channels changes.  But I guess it wouldn't hurt to log a 
warning in the decoder when the number of channels changes and the decoder 
goes from matching request_channels to not matching it.  Or just log it 
either way.  Same probably goes for sample rate too.


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1850



[issue1850] AC3 transcode (eg to WAV) - bad audio

2010-03-27 Thread Antr

New submission from Antr ant20...@gmail.com:

ffmpeg.exe -i test.ac3 -acodec pcm_s16le -f wav -ac 6 
test.wav

Tested in VLC
File 'test.ac3' not attached - you can download it from 
https://roundup.ffmpeg.org/file854.

--
files: test.ac3
messages: 10003
priority: normal
status: new
substatus: new
title: AC3 transcode (eg to WAV) - bad audio
type: bug


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1850



[issue1850] AC3 transcode (eg to WAV) - bad audio

2010-03-27 Thread Justin Ruggles

Justin Ruggles justin.rugg...@gmail.com added the comment:

So what happens is that when the stream changes to stereo, the decoder 
will start outputting stereo.  The audio seems correct though.  But 
since the output format is wav, it expects everything to be the same 
channel layout.  So when it changes to stereo, it throws off the channel 
order.  So after that point the channels are interpreted as Rs, LFE, L, 
C, R, Ls instead of L, C, R, Ls, Rs, LFE.

The next question is, should FFmpeg do anything about this?  When the 
mid-stream switch is the other way (stereo-5.1-stereo) we handle it by 
downmixing the 5.1 content to match.  But in this case we don't upmix 
the stereo content to match the 5.1 content.  We just change 
AVCodecContext.channels to 2 and start outputting stereo.


FFmpeg issue tracker iss...@roundup.ffmpeg.org
https://roundup.ffmpeg.org/issue1850