I'm running Ubuntu 10.4 with VLC 1.1.4 compiled manually using:
I am reading the audio input directly from my tv tuner board:./configure --enable-shine --disable-swscale --disable-postproc --disable-a52 --disable-glx --enable-x264 --enable-pulse --enable-alsa
Code: Select all
[0x8c4130c] [Media: vlc42] access_alsa demux debug: SAA7134 (SAA7134)
[0x8c4130c] [Media: vlc42] access_alsa demux debug: hw:1,0 : SAA7134 PCM (SAA7134 PCM)
Code: Select all
new vlc42 broadcast enabled
setup vlc42 input "v4l2://"
setup vlc42 option :input-slave=alsa://hw:1,0
setup vlc42 option :v4l2-width=480
setup vlc42 option :v4l2-height=384
setup vlc42 option :v4l2-standard=255
setup vlc42 option :v4l2-audio-volume=12
setup vlc42 option :no-v4l2-audio-mute
setup vlc42 option :v4l2-samplerate=32000
# discovery setup vlc42 option :v4l2-tuner-frequency=133250
setup vlc42 option :v4l2-tuner-frequency=196250
setup vlc42 option http-reconnect
setup vlc42 output #transcode{venc=x264,vcodec=h264,vb=800,scale=1,acodec=mp3,ab=96,channels=1,samplerate=22050}:std{access=http,mux=ts,dst=0.0.0.0:1234}
control vlc42 play
The problem is that I was not able to control this rate. It seemed that VLC always chooses to use the 'araw' decoder with 48000Hz frequency. I tried the :v4l2-samplerate option, as well as the samplerate in the transcoder, nothing:
Code: Select all
[0x8400cdc] [Media: vlc42] main generic debug: looking for decoder module: 21 candidates
[0x8400cdc] [Media: vlc42] araw generic debug: samplerate:48000Hz channels:2 bits/sample:16
[0x8400cdc] [Media: vlc42] main generic debug: using decoder module "araw"
My hard coded solution was to modify the file: modules/codec/araw.c and insert the 32000 line:
Code: Select all
...
if( p_dec->fmt_in.audio.i_rate <= 0 )
{
msg_Err( p_dec, "bad samplerate" );
return VLC_EGENERIC;
}
p_dec->fmt_in.audio.i_rate = 32000;
/* Allocate the memory needed to store the decoder's structure */
if( ( p_dec->p_sys = p_sys =
(decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL )
return VLC_ENOMEM;
...