[vlc-devel] Transcode stereo stream to mono AMR

Herman Meerlo herman at service2media.com
Fri Jan 19 14:34:12 CET 2007


Hi,

I am trying to transcode a public stereo stream to mobile format using 
the AMR audio codec (and H.263 for video). This gives no problem if the 
input source is mono because AMR is mono as well. But when the input 
source is stereo (or more) then the transcode fails.
The problem has been around for a long time and I was wondering whether 
there is a workaround for this? Can someone maybe explain what is going 
wrong so I can try to make a patch mysel. I would think that it can not 
be very hard to transcode the input to mono. Or am I missing something?

Config used:

[main] # main program
sout=#transcode:gather:rtp
sout-keep=1
repeat=1
verbose=3
color=1
extraintf=rc

[access_mms] # Microsoft Media Server (MMS) input
mms-maxbitrate=80

[ffmpeg] # FFmpeg audio/video decoder/encoder ((MS)MPEG4,SVQ1,H263,WMV,WMA)
sout-ffmpeg-keyint=12
sout-ffmpeg-vt=5
sout-ffmpeg-strict-rc=1
sout-ffmpeg-rc-buffer-size=18350080
sout-ffmpeg-noise-reduction=10
sout-ffmpeg-strict=1

[rc] # Remote control interface
rc-host=192.168.10.90

[stream_out_transcode] # Transcode stream output
sout-transcode-vcodec=H263
sout-transcode-vb=30
sout-transcode-width=128
sout-transcode-height=96
sout-transcode-acodec=samr
sout-transcode-ab=12.2
sout-transcode-channels=1
sout-transcode-samplerate=8000

[stream_out_rtp] # RTP stream output
sout-rtp-dst=192.168.10.70
sout-rtp-sdp=file:///tmp/streams/kooi.sdp
sout-rtp-name=Gouden kooi live
sout-rtp-port-audio=2242
sout-rtp-port-video=2244
sout-rtp-ttl=12
sout-rtp-mp4a-latm=1


[00000612] main private debug: looking for crop padd module: 0 candidates
[00000612] main private error: no crop padd module matched "any"
[00000581] stream_out_transcode private debug: no video filter found
[00000608] ffmpeg decoder debug: ffmpeg codec (Windows Media Video 3) 
stopped
[00000608] main decoder debug: removing module "ffmpeg"
[00000609] main encoder debug: removing module "ffmpeg"
[00000580] main stream output debug: adding a new input
[00000581] stream_out_transcode private debug: creating audio 
transcoding from fcc=`wma2' to fcc=`samr'
[00000613] main decoder debug: looking for decoder module: 23 candidates
[00000613] ffmpeg decoder debug: libavcodec already initialized
[00000613] ffmpeg decoder debug: ffmpeg codec (Windows Media Audio 2) 
started
[00000613] main decoder debug: using decoder module "ffmpeg"
[00000614] main encoder debug: looking for encoder module: 7 candidates
[00000614] ffmpeg encoder debug: libavcodec already initialized
[00000614] ffmpeg encoder debug: found encoder AMR narrow band
[00000614] main encoder debug: using encoder module "ffmpeg"
[00000615] main private debug: looking for audio filter2 module: 5 
candidates
[00000615] audio_format private debug: s16l->fl32, bits per sample: 16
[00000615] main private debug: using audio filter2 module "audio_format"
[00000616] main private debug: looking for audio filter2 module: 5 
candidates
[00000616] linear_resampler private debug: fl32/44100KHz/2->s16l/8000KHz/1
[00000616] main private debug: using audio filter2 module "linear_resampler"
[00000617] main private debug: looking for audio filter2 module: 5 
candidates
[00000617] audio_format private debug: fl32->s16l, bits per sample: 32
[00000617] main private debug: using audio filter2 module "audio_format"
[00000618] main private debug: looking for audio filter2 module: 5 
candidates
[00000614] main encoder debug: removing module "ffmpeg"
[00000581] stream_out_transcode private debug: number of audio channels 
for mixing changed, trying to reopen the encoder for mixing 2 to 2 channels
[00000614] main encoder debug: looking for encoder module: 7 candidates
[00000614] ffmpeg encoder debug: libavcodec already initialized
[00000614] ffmpeg encoder warning: Only mono supported
 (amr_nb at 0x82c56d0)
[00000614] ffmpeg encoder error: cannot open encoder
[00000581] stream_out_transcode private error: cannot find encoder ((null))


Regards,
Herman

-- 
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