streaming with amr_nb

About encoding, codec settings, muxers and filter usage
badpit
New Cone
New Cone
Posts: 6
Joined: 10 Mar 2006 15:53

streaming with amr_nb

Postby badpit » 26 Mar 2006 20:50

Hello ,


I am struggling for 1 week till now to enable the vlc encoding with amr and I find the process still like pain in the ass!
I have read hundreds of post in the forums how i should enable it, but after doing and testing almost everything, i still cant!

i have ffmpeg (cvs version from today) compiled with --enable-shared --enable-mp3lame --enable-gpl --enable-faad --mandir=/share/man --enable-vorbis --enable-pthreads --enable-faac --enable-xvid --enable-dts --enable-amr_nb --enable-amr_wb --enable-pp --enable-libogg --enable-a52 --enable-theora --enable-libgsm --enable-x264 --enable-a52bin

after that i exported PKG_CONFIG_PATH to /root/src/ffmpeg/ and compiled the vlc (cvs from today too) with
--enable-v4l --with-ffmpeg-amr_nb --disable-mad --disable-wxwidgets --disable-skins2

i am not sure about the --with-ffmpeg-amr_nb option, but i have seen it in one post in the forum and i included it. it never hurts ;)

i am starting the program with the long
./vlc --color v4l:/dev/video0:norm=pal:frequency=175250:channel=0:adev=/dev/dsp:audio=0 --sout '#transcode{vcodec=H263,vb=32,width=128,height=96,acodec=samr}:rtp{dst=127.0.0.1,port-video=22000, ttl=127, sdp="file:///usr/local/movies/hhh.sdp"}' -vvvv


and I get the disappointing

[00000289] ffmpeg encoder debug: found encoder H263
[00000289] main encoder debug: using encoder module "ffmpeg"
[00000289] main encoder debug: removing module "ffmpeg"
[00000254] stream_out_transcode private debug: creating audio transcoding from fcc=`s16l' to fcc=`samr'
[00000303] main decoder debug: looking for decoder module: 19 candidates
[00000303] araw decoder debug: samplerate:44100Hz channels:2 bits/sample:16
[00000303] main decoder debug: using decoder module "araw"
[00000304] main encoder debug: looking for encoder module: 5 candidates
[00000304] ffmpeg encoder debug: libavcodec already initialized
[00000304] ffmpeg encoder error: cannot open encoder
[00000254] stream_out_transcode private error: cannot find encoder
[00000303] main decoder debug: removing module "araw"
[00000254] stream_out_transcode private error: cannot create audio chain
[00000270] main packetizer error: cannot create packetizer output (s16l)

and the output sdp is without audio :(

debilian:~# cat /usr/local/movies/hhh.sdp
v=0
o=- 1143398713930775 1 IN IP4 127.0.0.1
s=NONE
t=0 0
a=tool:vlc 0.8.5-test1
c=IN IP4 127.0.0.1
m=video 22000 RTP/AVP 96
a=rtpmap:96 H263-1998/90000



i have checked that the ld is using the right libavcodec libs from my newly compiled ffmpeg (ldconfig -p)


i see that H263 codec is working and it is transcoded by the ffmpeg. in the ffmpeg -formats it is written that the amr_nb is supported (decode, encode) by it.
So how to make vlc use properly ffmpeg for amr transcoding?
Where can I find what codecs are supported by the vlc using ffmpeg ?
And how can I change the H263-1998 version to plain h263?

Wow, this post came longer than expected ;)

tipok
Blank Cone
Blank Cone
Posts: 38
Joined: 29 Sep 2005 22:28
Location: Kiev, Ukraine
Contact:

Re: streaming with amr_nb

Postby tipok » 04 Apr 2006 20:06

It can help you!

Code: Select all

--sout '#transcode{vcodec="H263",width=176,height=144,vb="37.8",fps="15",acodec="samr", ab="12.2",samplerate="8000",channels="1"}:rtp{dst="239.0.1.6",port-audio="22002", port-video="22000",ttl="6",sdp="rtsp://192.168.0.6:8000/test1.sdp"}'
You have set all parameters for AMR codec.
But U'll have another problem! Read here: viewtopic.php?t=17402
Комп не выключать!!!

badpit
New Cone
New Cone
Posts: 6
Joined: 10 Mar 2006 15:53

Postby badpit » 04 Apr 2006 21:41

yeah, i have read this post, but the problem is that i have no voice, not bad quality voice. it tells me that i don't have this codec. How did you succeed in compiling it with it ?

tipok
Blank Cone
Blank Cone
Posts: 38
Joined: 29 Sep 2005 22:28
Location: Kiev, Ukraine
Contact:

Postby tipok » 05 Apr 2006 15:29

Did You do this during ffmpeg's installation process:
AMR WB FLOAT NOTICE ! Make sure you have downloaded TS26.204 V5.1.0 from
http://www.3gpp.org/ftp/Specs/archive/2 ... 04-510.zip
and extracted the source to libavcodec/amrwb_float


AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104 REL-5 V5.1.0 from
http://www.3gpp.org/ftp/Specs/latest/Re ... 04-5??.zip
and extracted the source to libavcodec/amr_float
and if u try this on an alpha, u may need to change Word32 to int in amr/typedef.h
Be sure that the source of amr codecs is in libavcodec directory!
Комп не выключать!!!

badpit
New Cone
New Cone
Posts: 6
Joined: 10 Mar 2006 15:53

Postby badpit » 06 Apr 2006 11:14

Of course ;) and even i had a little problems with compiling the amr directory, but i saw what is written in amr.c in the libavcodec directory. the ffmpeg is ok, because i can make amr encoded files with it

tipok
Blank Cone
Blank Cone
Posts: 38
Joined: 29 Sep 2005 22:28
Location: Kiev, Ukraine
Contact:

Postby tipok » 06 Apr 2006 11:25

Strange...
This problem occurted when I didn't specify all transcoding parameters
Like

Code: Select all

...acodec="samr",ab="12.2",samplerate="8000",channels="1"...
But it works now!... :?
Can you show me your log with enabled this parameters?
Комп не выключать!!!

badpit
New Cone
New Cone
Posts: 6
Joined: 10 Mar 2006 15:53

Postby badpit » 06 Apr 2006 13:45

ok, with this one it finds the amr nb codec, but
./vlc --color v4l:/dev/video0:norm=pal:frequency=175250:channel=0:adev=/dev/dsp:audio=0 --sout '#transcode{vcodec=H263,vb=32,width=128,height=96,acodec="samr",ab="12.2",samplerate="8000",channels="1"}:rtp{dst=127.0.0.1,port-video=22000,port-audio="22002", ttl=127, sdp="file:///usr/local/movies/hhh.sdp"}' -vvvv

i get another error:
[00000308] ffmpeg encoder debug: found encoder AMR narrow band
.
.
.
[00000254] stream_out_transcode private error: no audio filter found for mixing from 2 to 1 channels
[00000307] main decoder debug: removing module "araw"
[00000308] main encoder debug: removing module "ffmpeg"
[00000309] main private debug: removing module "audio_format"
[00000317] main private debug: removing module "linear_resampler"
[00000318] main private debug: removing module "audio_format"
[00000254] stream_out_transcode private error: cannot create audio chain
[00000270] main packetizer error: cannot create packetizer output (s16l)


any ideas ?

tipok
Blank Cone
Blank Cone
Posts: 38
Joined: 29 Sep 2005 22:28
Location: Kiev, Ukraine
Contact:

Postby tipok » 06 Apr 2006 13:55

Ouch! :x
I have this problem too... All what I know, that if I install newer version of VLC this problem was gone. How? I don't know...
Комп не выключать!!!

badpit
New Cone
New Cone
Posts: 6
Joined: 10 Mar 2006 15:53

Postby badpit » 06 Apr 2006 13:56

newer ? which one ? i am installing vlc-trunk, which is CVS version and it is the latest :(

tipok
Blank Cone
Blank Cone
Posts: 38
Joined: 29 Sep 2005 22:28
Location: Kiev, Ukraine
Contact:

Postby tipok » 06 Apr 2006 14:03

I have no this problem in VLC version tarball-20060128.
Комп не выключать!!!

badpit
New Cone
New Cone
Posts: 6
Joined: 10 Mar 2006 15:53

Postby badpit » 06 Apr 2006 14:05

ok, sposibo bolshoe.
i will try with it and write the result

tipok
Blank Cone
Blank Cone
Posts: 38
Joined: 29 Sep 2005 22:28
Location: Kiev, Ukraine
Contact:

Postby tipok » 06 Apr 2006 14:09

Good Luck
Комп не выключать!!!

Guest

Postby Guest » 10 Apr 2006 20:23

Beating my head into the wall with the same issue, I've recompiled VLC a hundred different ways and still cannot get it done.

It's always the same issue, the samr codec cannot be found.

ffmpeg is most definitely properly compiled with amr/nb support.

Would anyone be a kind soul and wrap it all up in an rpm ;)

tipok
Blank Cone
Blank Cone
Posts: 38
Joined: 29 Sep 2005 22:28
Location: Kiev, Ukraine
Contact:

Postby tipok » 13 Apr 2006 10:39

I think that all troubles - in input parameters of VLC-encoder's!
Would anyone be a kind soul and wrap it all up in an rpm ;)
My system - is Debian x86_64, I have all libs and ffmpeg(amr'ed)+VLC, but i can't create .rpm or .deb files. (i don't know howto do it).
I can share my /usr/local directory.
Комп не выключать!!!

Guest

Postby Guest » 24 Apr 2006 14:49

He!

No need to wrap anymore - I got it working. (I'm the guest from the earlier post :))

Now to get AAC+ working with Darwin and Nokia cells.. :)

tipok
Blank Cone
Blank Cone
Posts: 38
Joined: 29 Sep 2005 22:28
Location: Kiev, Ukraine
Contact:

Postby tipok » 24 Apr 2006 16:36

He!

No need to wrap anymore - I got it working. (I'm the guest from the earlier post :))

Now to get AAC+ working with Darwin and Nokia cells.. :)
Can you describe us how??
Комп не выключать!!!

Guest

Postby Guest » 06 Jun 2006 11:39

hey,

how did you get rid of the
"no audio filter found for mixing from 2 to 1 channels" -error?

i'm struggling with the same issue ...

Mait

tipok
Blank Cone
Blank Cone
Posts: 38
Joined: 29 Sep 2005 22:28
Location: Kiev, Ukraine
Contact:

Postby tipok » 06 Jun 2006 13:48

how did you get rid of the
"no audio filter found for mixing from 2 to 1 channels" -error?
Try another versions of VLC and ffmpeg
Комп не выключать!!!

Jill

Postby Jill » 13 Jun 2006 13:42

He!

No need to wrap anymore - I got it working. (I'm the guest from the earlier post :))

Now to get AAC+ working with Darwin and Nokia cells.. :)
Can you describe us how??
http://ficken.dyndns.dk/

tux-edo
New Cone
New Cone
Posts: 4
Joined: 18 Dec 2005 12:36
Location: Bandung
Contact:

Error AMR

Postby tux-edo » 28 Jan 2007 21:58

Hi, I'm get error with AMR with VLC

I build ffmpeg-cvs20060303 with AMR support and it's success if encode with AMR codec.

I want to stream H263 and AMR to my network with VLC but there is following error :

[00000285] stream_out_transcode private debug: creating audio transcoding from fcc=`s16l' to fcc=`samr'
[00000342] main decoder debug: looking for decoder module: 22 candidates
[00000342] araw decoder debug: samplerate:32000Hz channels:2 bits/sample:16
[00000342] main decoder debug: using decoder module "araw"
[00000343] main encoder debug: looking for encoder module: 9 candidates
[00000343] ffmpeg encoder debug: libavcodec already initialized
[00000343] ffmpeg encoder debug: found encoder AMR narrow band
[00000343] main encoder debug: using encoder module "ffmpeg"
[00000344] main private debug: looking for audio filter2 module: 5 candidates
[00000344] audio_format private debug: s16l->fl32, bits per sample: 16
[00000344] main private debug: using audio filter2 module "audio_format"
[00000350] main private debug: looking for audio filter2 module: 5 candidates
[00000350] linear_resampler private debug: fl32/32000KHz/2->s16l/8000KHz/1
[00000350] main private debug: using audio filter2 module "linear_resampler"
[00000351] main private debug: looking for audio filter2 module: 5 candidates
[00000351] audio_format private debug: fl32->s16l, bits per sample: 32
[00000351] main private debug: using audio filter2 module "audio_format"
[00000352] main private debug: looking for audio filter2 module: 5 candidates
[00000343] main encoder debug: removing module "ffmpeg"
[00000285] stream_out_transcode private debug: number of audio channels for mixing changed, trying to reopen the encoder for mixing 2 to 2 channels
[00000343] main encoder debug: looking for encoder module: 9 candidates
[00000343] ffmpeg encoder debug: libavcodec already initialized
[00000343] ffmpeg encoder error: cannot open encoder
[00000285] stream_out_transcode private error: cannot find encoder ((null))
[00000342] main decoder debug: removing module "araw"
[00000344] main private debug: removing module "audio_format"
[00000350] main private debug: removing module "linear_resampler"
[00000351] main private debug: removing module "audio_format"
[00000285] stream_out_transcode private error: cannot create audio chain
[00000308] main packetizer error: cannot create packetizer output (s16l)

I use VLC-0.8.6 and compiled ffmpeg with AMR support. If I use ffmpeg only to encode AMR, it's success with nice audio. But when I want to stream there is an error.
In that error log, there is found AMR codec but then vlc cannot open the encoder.

My vlc command (from VLC Wiki):
transcode{vcodec=H263,width=128,height=96,vb=28,fps="12.5",acodec=samr,ab="5.25",samplerate=8000,
channels=1,venc=ffmpeg{keyint=6,strict=1,strict-rc=1}}:rtp{mp4a-latm,port-video=2244,port-audio=2242,dst=1
27.0.0.1,ttl=12,sdp=rtsp://10.14.200.244:8090/test.sdp}

If I use another codec, like mp3, there is no error and success.
Any one, please tell me how to solve this problem..
Thanks
-------------------------
Just Do The Best

tipok
Blank Cone
Blank Cone
Posts: 38
Joined: 29 Sep 2005 22:28
Location: Kiev, Ukraine
Contact:

Postby tipok » 10 Apr 2007 16:58

You have 2 channels audio as input? there some troubles while transcoding from 2 channels to 1 ch.

Try to transcode one channel audio.
Комп не выключать!!!


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 15 guests