[vlc-devel] Re: Transcode stereo stream to mono AMR
Alex Antropoff
alant at transtelecom.md
Wed May 30 15:07:23 CEST 2007
On Wed, May 30, 2007 at 02:57:42PM +0200, Herman Meerlo wrote:
> Alex Antropoff wrote:
> > On Fri, Jan 19, 2007 at 02:34:12PM +0100, Herman Meerlo wrote:
> > HM> Hi,
> > HM> HM> I am trying to transcode a public stereo stream to mobile format
> > using the HM> AMR audio codec (and H.263 for video). This gives no problem
> > if the input HM> source is mono because AMR is mono as well. But when the
> > input source is HM> stereo (or more) then the transcode fails.
> > HM> The problem has been around for a long time and I was wondering
> > whether HM> there is a workaround for this? Can someone maybe explain what
> > is going HM> wrong so I can try to make a patch mysel. I would think that
> > it can not be HM> very hard to transcode the input to mono. Or am I
> > missing something?
> > HM>
> > HM> [00000616] linear_resampler private debug:
> > fl32/44100KHz/2->s16l/8000KHz/1
> > HM> [00000616] main private debug: using audio filter2 module
> > "linear_resampler"
> > HM> [00000617] main private debug: looking for audio filter2 module: 5 HM>
> > candidates
> > HM> [00000617] audio_format private debug: fl32->s16l, bits per sample: 32
> > HM> [00000617] main private debug: using audio filter2 module
> > "audio_format"
> > HM> [00000618] main private debug: looking for audio filter2 module: 5 HM>
> > candidates
> > HM> [00000614] main encoder debug: removing module "ffmpeg"
> > HM> [00000581] stream_out_transcode private debug: number of audio
> > channels for HM> mixing changed, trying to reopen the encoder for mixing 2
> > to 2 channels
> > HM> [00000614] main encoder debug: looking for encoder module: 7
> > candidates
> > HM> [00000614] ffmpeg encoder debug: libavcodec already initialized
> > HM> [00000614] ffmpeg encoder warning: Only mono supported
> > HM> (amr_nb at 0x82c56d0)
> > HM> [00000614] ffmpeg encoder error: cannot open encoder
> > HM> [00000581] stream_out_transcode private error: cannot find encoder
> > ((null))
> > HM> Anyone has solved this problem ?
> > Currently I have to use afilter=mono and --sout-mono-downmix with vlc
> > 0.9.0,
> > with 0.8.6 all work fine.
> >
> Hi Alex,
>
> I did not manage to get this working and therefore had to settle for a
> stereo stream. Jean-Paul has confirmed in this thread that this is a kind of
> fundamental problem in the way VLC is designed to handle transcoding. Please
> see the post of me on Jan-24-2007 and the reply from Jean-Paul on
> Feb-27-2007.
As I see, linear_resampler make 8000hz conversion, audio_format do fl32->s16l,
so adding mono filter do last part of work.
My debug:
[00000333] ffmpeg encoder debug: found encoder AMR narrow band
[00000333] main encoder debug: using encoder module "ffmpeg"
[00000355] main private debug: looking for audio filter2 module: 2 candidates
[00000355] audio_format private debug: s16l->fl32, bits per sample: 16
[00000355] main private debug: using audio filter2 module "audio_format"
[00000359] main private debug: looking for audio filter2 module: 2 candidates
[00000359] linear_resampler private debug: fl32/48000KHz/2->s16l/8000KHz/1
[00000359] main private debug: using audio filter2 module "linear_resampler"
[00000360] main private debug: looking for audio filter2 module: 2 candidates
[00000360] audio_format private debug: fl32->s16l, bits per sample: 32
[00000360] main private debug: using audio filter2 module "audio_format"
[00000361] main private debug: looking for audio filter2 module: 2 candidates
[00000362] main private debug: looking for audio filter2 module: 1 candidate
[00000362] mono private debug: using stereo to mono downmix
[00000362] mono private debug: s16l->s16l, channels 6->1, bits per sample: 16->16
[00000362] main private debug: using audio filter2 module "mono"
--
Regards,
Alex Antropoff
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel
mailing list