Page 1 of 1

how to enable 3gp AMR support in vlc 0.8.2!!!

Posted: 28 Jun 2005 15:50
by ukio
hello people,

some people have asked for 3gp amr support in this forum before, including me.
there fore you have built your own version of the ffmpeg-contrib package and enabling amr support there.

instructions for building with winxp/cygwin:
--------------------------------------------------

to build your amr enabled vlc, you have to

1) be sure that you can build vlc-0.8.2 sources (http://download.videolan.org/pub/videol ... .2.tar.bz2) with the precompiled contrib package (http://download.videolan.org/pub/videol ... 24.tar.bz2).
you'll find a tutorial on how to do this here: http://www.firstmiletv.nl/vlc/developers/howto.txt
building vlc-0.8.2 without errors is the prerequisite for 2)

2) get the ffmpeg-contrib package (http://download.videolan.org/pub/videol ... 24.tar.bz2) and copy it to your cygwin /home/%username% directory and extract it there with "tar -xjvf ffmpeg-20050624.tar.bz2 -C ."


next, get the amr reference codecs:
- http://www.3gpp.org/ftp/Specs/2004-03/R ... 04-520.zip
- http://www.3gpp.org/ftp/Specs/2004-03/R ... 73-530.zip
- http://www.3gpp.org/ftp/Specs/2004-03/R ... 04-540.zip

- you need to place those 3gpp files into libavcodec directory in ffmpeg source (please read "configure" file, to find out what are respective directories name). in my ffmpeg version, it should be:
- 26204-520.zip into libavcodec/amrwb_float
- 26073-530.zip into libavcodec/amr
- 26104-540.zip into libavcodec/amr_float


once u have the amr sourcecode copied to the folders in libavcodec,
you can build ffmpeg:
- in the ffmpeg directory, run "./configure --enable-mingw32 --enable-memalign-hack --extra-cflags=-I/usr/win32/include --extra-ldflags=-L/usr/win32/lib --enable-faac --enable-mp3lame --enable-pp --enable-gpl --enable-amr_nb --enable-amr_wb"

- after that run "make" in the ffmpeg directory

if make finishes without errors, go to 3)

3) if you succeeded in compiling ffmpeg on your own, you'll find "avcodec.lib" in folder "libavcodec" and "avformat.lib" in folder "libavformat".
rename these to "libavcodec.a" / "libavformat.a" and put them into /usr/win32/lib/ (which will replace libavcodec.a and libavformat.a from the precompiled contrib package)


4) again, build vlc-0.8.2 (with the new libavformat.a and libavcodec.a):

now you have a vlc, which is able to DEcode amr audio!



but unfortunately i'm not able to ENcode amr :-(
i use ":sout=#transcode{acodec=samr,ab=8000,channels=1}:duplicate{dst=std{access=file,mux=ts,url="d:/test.3gp"}}" i get the following error:

Code: Select all

[00000397] main stream output debug: adding a new input [00000398] stream_out_transcode private debug: creating audio transcoding from f cc=`mpga' to fcc=`samr' [00000412] main decoder debug: looking for decoder module: 23 candidates [00000146] main module debug: using decoder module "mpeg_audio" [00000413] main encoder debug: looking for encoder module: 10 candidates [00000413] ffmpeg encoder debug: libavcodec already initialized [00000413] ffmpeg encoder error: cannot open encoder [00000398] stream_out_transcode private error: cannot find encoder [00000146] main module debug: unlocking module "mpeg_audio" [00000398] stream_out_transcode private error: cannot create audio chain [00000408] main packetizer error: cannot create packetizer output [00000396] main input debug: EOF reached [00000396] main input debug: closing input [00000147] main module debug: unlocking module "mpeg_audio" [00000408] main packetizer debug: killing decoder fourcc `mpga', 0 PES in FIFO [00000171] main module debug: unlocking module "packetizer_mpegvideo" [00000409] main packetizer debug: killing decoder fourcc `mpgv', 0 PES in FIFO [00000397] main stream output debug: removing an input [00000403] mux_ts private debug: removing input pid=68 [00000403] mux_ts private debug: new PCR PID is 8191 [00000403] main private warning: no more input stream for this mux [00000396] main input debug: Program doesn't contain anymore ES [00000178] main module debug: unlocking module "ps" [00000032] main module debug: unlocking module "access_file" [00000396] main input warning: destroying sout [00000398] main private debug: destroying chain... (name=transcode) [00000400] main private debug: destroying chain... (name=duplicate) [00000400] stream_out_duplicate private debug: closing a duplication [00000401] main private debug: destroying chain... (name=std) [00000403] mux_ts private debug: Close [00000014] main module debug: unlocking module "mux_ts" [00000402] access_output_file private debug: file access output closed [00000039] main module debug: unlocking module "access_output_file" [00000216] main module debug: unlocking module "stream_out_standard" [00000401] main private debug: destroying chain done [00000211] main module debug: unlocking module "stream_out_duplicate" [00000400] main private debug: destroying chain done [00000217] main module debug: unlocking module "stream_out_transcode" [00000398] main private debug: destroying chain done [00000396] main input debug: thread times: real 0m1.000000s, kernel 0m0.484375s, user 0m0.390625s [00000396] main input debug: thread 3872 joined (src/input/input.c:386) [00000261] main playlist: nothing to play

this sux.. can anyone help?

regards, ukio

problem

Posted: 11 Aug 2005 19:13
by perry
I am doing exactly as described and get this result any suggestion, Please?


gcc -Wl,--warn-common -L/usr/win32/lib -g -o ffmpeg_g.exe ffmpeg.o cmdutils.o -L./libavformat -lavformat -L./libavcodec -lav
-lz -lmp3lame -lfaac
ffmpeg.o: In function `output_packet':
/cygdrive/c/johans/realffmpeg/ffmpeg-20050624/ffmpeg.c:1262: undefined reference to `_avcodec_decode_subtitle'
/cygdrive/c/johans/realffmpeg/ffmpeg-20050624/ffmpeg.c:750: undefined reference to `_av_interleaved_write_frame'
/cygdrive/c/johans/realffmpeg/ffmpeg-20050624/ffmpeg.c:734: undefined reference to `_avcodec_encode_subtitle'
ffmpeg.o: In function `output_packet':
/cygdrive/c/johans/realffmpeg/ffmpeg-20050624/libavformat/avformat.h:55: undefined reference to `_av_destruct_packet_nofree'
ffmpeg.o: In function `output_packet':
/cygdrive/c/johans/realffmpeg/ffmpeg-20050624/ffmpeg.c:741: undefined reference to `_av_rescale_q'
/cygdrive/c/johans/realffmpeg/ffmpeg-20050624/ffmpeg.c:741: undefined reference to `_av_rescale_q'

Posted: 08 Jun 2006 07:44
by mait
hey,

you need to specify the audio bitrate also for AMR encoding.
try: ...acodec=samr,ab=12.2,...

why not play .amr file?

Posted: 02 Oct 2006 15:06
by chiao
it can play file with .3gf ext
but not do .amr file!
please tell me why? thanks

where to get library or executable for windows?

Posted: 24 Dec 2006 18:53
by allviewer
understood there are quite a big community using VLC, aren't there anybody around who could post ready-made executable or library of latest version for Windows?
I have no idea how to compile all this stuff from sources, but I cannot play 3gp files recorded on my mobile phone with sound.

Posted: 24 Dec 2006 20:05
by Jean-Baptiste Kempf
That would be illegal. So you will not find some help here, sorry...

Posted: 25 Dec 2006 12:51
by allviewer
deep sigh..... :(
OK, if anybody knows something and drop me private message with relevant information - I'd be very thankful.

Re: how to enable 3gp AMR support in vlc 0.8.2!!!

Posted: 07 Sep 2010 15:05
by JesterHest
As the man says, it is illegal..

That said, the K-Lite Codec Pack (full) has an AMR codec for use with media player classic or windows media player.

Re: how to enable 3gp AMR support in vlc 0.8.2!!!

Posted: 07 Sep 2010 15:08
by JesterHest
oops, a four year necroposting.. but I still think it might be useful.

Re: how to enable 3gp AMR support in vlc 0.8.2!!!

Posted: 08 Sep 2010 01:21
by Lotesdelere
VLC can play AMR NB since version 1.1.0.

Re: how to enable 3gp AMR support in vlc 0.8.2!!!

Posted: 09 Sep 2010 19:04
by JesterHest
Great news. It doesn't allow use of the slider bar for the nokia amr files I am using, but the sound is fine.