HOW TO Compile VLC with AMR and G.711 support

*nix specific usage questions
maksim_kravchenko
New Cone
New Cone
Posts: 6
Joined: 16 Oct 2008 14:28

HOW TO Compile VLC with AMR and G.711 support

Postby maksim_kravchenko » 20 Oct 2008 12:50

Hello I'm trying to compile VLC with AMR and G.711 support
if anybody has solved this problem please write dow the solution

I could compile VLC 0.8.6i with ffmpeg that I previously compiled, but as I understand VLC 0.8.6i doesn't support G.711
So I decide to move to 0.9.3 and here I faced with problems:

As I understand VLC 0.9.3 doesn't use ffmpeg because in the ./configure keys I didn't find how to set ffmpeg the PATH to ffmpeg

here is my VLC configuration
./configure --prefix=/usr --disable-hal --disable-dbus --disable-dbus-control --disable-telepathy --enable-debug --enable-run-as-root --enable-coverage --enable-live555 --disable-swscale --enable-postproc --enable-faad --enable-real --enable-realrtsp --enable-a52 --enable-theora --disable-x264 --enable-x11 --with-x --with-live555-tree=/home/vlc/live --with-dvdnav-config-path=/home/vlc/libdvdnav-0.1.10 --with-dvbpsi-tree=/home/vlc/libdvbpsi4-0.1.5 --with-mad-tree=/home/vlc/libmad-0.15.1b --with-faad-tree=/home/vlc/faad2 --with-a52-tree=/home/vlc/a52dec-0.7.4 PKG_CONFIG_PATH=/home/vlc/fribidi-0.10.9/

configure passed ok.
Then I use make and received the following:
v4l2.c:256: error: `V4L2_TUNER_MODE_LANG1_LANG2' undeclared here (not in a function)
v4l2.c:256: error: initializer element is not constant
v4l2.c:256: error: (near initialization for `i_tuner_audio_modes_list[5]')
v4l2.c: In function `ControlListPrint':
v4l2.c:2965: error: `V4L2_CTRL_FLAG_READ_ONLY' undeclared (first use in this function)
v4l2.c:2965: error: (Each undeclared identifier is reported only once
v4l2.c:2965: error: for each function it appears in.)
v4l2.c:3038: error: `V4L2_CTRL_TYPE_CTRL_CLASS' undeclared (first use in this function)
v4l2.c:3091: warning: implicit declaration of function `V4L2_CTRL_ID2CLASS'
v4l2.c:3091: error: `V4L2_CTRL_CLASS_MPEG' undeclared (first use in this function)
v4l2.c: In function `ControlList':
v4l2.c:3155: error: `V4L2_CTRL_FLAG_NEXT_CTRL' undeclared (first use in this function)
v4l2.c:3164: error: `V4L2_CTRL_TYPE_CTRL_CLASS' undeclared (first use in this function)
v4l2.c:3172: error: `V4L2_CTRL_CLASS_USER' undeclared (first use in this function)
v4l2.c:3176: error: `V4L2_CTRL_CLASS_MPEG' undeclared (first use in this function)
v4l2.c: In function `ControlReset':
v4l2.c:3314: error: `V4L2_CTRL_FLAG_NEXT_CTRL' undeclared (first use in this function)
v4l2.c:3322: error: `V4L2_CTRL_TYPE_CTRL_CLASS' undeclared (first use in this function)
v4l2.c:3322: error: `V4L2_CTRL_CLASS_MPEG' undeclared (first use in this function)
v4l2.c: In function `Control':
v4l2.c:3410: error: storage size of 'ext_control' isn't known
v4l2.c:3411: error: storage size of 'ext_controls' isn't known
v4l2.c:3428: error: void value not ignored as it ought to be
v4l2.c:3428: error: invalid use of void expression
v4l2.c:3429: error: void value not ignored as it ought to be
v4l2.c:3429: error: invalid use of void expression
v4l2.c:3441: error: `VIDIOC_S_EXT_CTRLS' undeclared (first use in this function)
v4l2.c:3454: error: `VIDIOC_G_EXT_CTRLS' undeclared (first use in this function)
v4l2.c:3410: warning: unused variable `ext_control'
v4l2.c:3411: warning: unused variable `ext_controls'
v4l2.c: At top level:
v4l2.c:1675: warning: unused parameter 'i_fd'
v4l2.c:2865: warning: unused parameter 'p_sys'
v4l2.c:2886: warning: unused parameter 'p_sys'
v4l2.c:2257: warning: unused parameter 'b_demux'
v4l2.c:2446: warning: unused parameter 'b_demux'
make[6]: *** [libv4l2_plugin_la-v4l2.lo] Error 1
make[6]: Leaving directory `/home/vlc/vlc-0.9.3/modules/access/v4l2'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/home/vlc/vlc-0.9.3/modules/access/v4l2'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/vlc/vlc-0.9.3/modules/access'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/vlc/vlc-0.9.3/modules/access'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/vlc/vlc-0.9.3/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/vlc/vlc-0.9.3'
make: *** [all] Error 2

Any ideas?

maksim_kravchenko
New Cone
New Cone
Posts: 6
Joined: 16 Oct 2008 14:28

Re: HOW TO Compile VLC with AMR and G.711 support

Postby maksim_kravchenko » 21 Oct 2008 15:07

After some changes in the ./configure I passed a little bit futher but still can't compile VLC 0.9.3
Here is my configuration
./configure --prefix=/usr --disable-v4l2 --disable-hal --disable-dbus --disable-dbus-control --disable-telepathy --enable-debug --enable-run-as-root --enable-coverage --enable-live555 --disable-swscale --enable-postproc --enable-real --enable-realrtsp --enable-a52 --enable-theora --disable-x264 --enable-x11 --with-x --with-live555-tree=/home/vlc/live --with-dvdnav-config-path=/home/vlc/libdvdnav-0.1.10 --with-dvbpsi-tree=/home/vlc/libdvbpsi4-0.1.5 --with-mad-tree=/home/vlc/libmad-0.15.1b --with-a52-tree=/home/vlc/a52dec-0.7.4 PKG_CONFIG_PATH=/home/vlc/fribidi-0.10.9/

Then I do the following
sudo sed -e 's/define\s*_POSIX_SPIN_LOCKS\s*/define _POSIX_SPIN_LOCKS -1 \/\/ wrong: /g' -i /usr/include/bits/posix_opt.h

then
make
demux.c: At top level:
demux.c:87: error: syntax error before "IOSeek"
demux.c:87: error: syntax error before "offset_t"
demux.c:87: warning: type defaults to `int' in declaration of `IOSeek'
demux.c:87: warning: data definition has no type or storage class
demux.c: In function `OpenDemux':
demux.c:103: warning: passing arg 2 of `stream_Peek' from incompatible pointer type
demux.c:173: warning: implicit declaration of function `offset_t'
demux.c:173: error: syntax error before ')' token
demux.c:177: warning: passing arg 8 of `init_put_byte' from incompatible pointer type
demux.c: In function `Control':
demux.c:387: warning: cast does not match function type
demux.c: At top level:
demux.c:496: error: syntax error before "IOSeek"
demux.c:496: error: syntax error before "offset_t"
demux.c:497: warning: return type defaults to `int'
demux.c:497: warning: no previous prototype for 'IOSeek'
demux.c: In function `IOSeek':
demux.c:498: error: `opaque' undeclared (first use in this function)
demux.c:498: error: (Each undeclared identifier is reported only once
demux.c:498: error: for each function it appears in.)
demux.c:500: error: `offset' undeclared (first use in this function)
demux.c:507: error: `whence' undeclared (first use in this function)
demux.c: At top level:
../../codec/avcodec/fourcc.h:1035: warning: 'GetFfmpegCodec' defined but not used
make[6]: *** [libavformat_plugin_la-demux.lo] Error 1
make[6]: Leaving directory `/home/vlc/vlc-0.9.3/modules/demux/avformat'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/home/vlc/vlc-0.9.3/modules/demux/avformat'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/home/vlc/vlc-0.9.3/modules/demux'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/vlc/vlc-0.9.3/modules/demux'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/vlc/vlc-0.9.3/modules'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/vlc/vlc-0.9.3'
make: *** [all] Error 2

Anybody who knows what the problem is and the workaround please help
Don't hesitate :)

Rémi Denis-Courmont
Developer
Developer
Posts: 15358
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: HOW TO Compile VLC with AMR and G.711 support

Postby Rémi Denis-Courmont » 21 Oct 2008 17:13

G.711 is built-in. AMR is not supported due to licensing constraints.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

maksim_kravchenko
New Cone
New Cone
Posts: 6
Joined: 16 Oct 2008 14:28

Re: HOW TO Compile VLC with AMR and G.711 support

Postby maksim_kravchenko » 22 Oct 2008 06:34

Thank you for reply, but now as you see I can't even compile VLC 0.9.3.
Can you help me with it?

maksim_kravchenko
New Cone
New Cone
Posts: 6
Joined: 16 Oct 2008 14:28

Re: HOW TO Compile VLC with AMR and G.711 support

Postby maksim_kravchenko » 22 Oct 2008 10:21

Ok finally I could compile VLC
here is the instuction

Install the following packages:

a52dec-0.7.4.tar.gz
libdvdnav-0.1.10.tar.gz
libmad-0.15.1b.tar.gz
libtheora-1.0beta3.tar.gz
live555-latest.tar.gz
libogg-1.1.3.tar.gz
libmpcdec-1.2.6.tar
libmodplug-0.8.tar.gz
libgpg-error-1.6.tar
libassuan-1.0.5.tar
howto-korean-7.2-1.noarch.rpm
qt-x11-opensource-src-4.4.3 (be aware that you need approximately 3-4 Gb free space to install this package)
(May be I forgot to mention some packages here, also I could mention some packages that are not needed)

download vlc-0.9.3.tar.gz
and unpack it

./configure --prefix=/usr --disable-v4l2 --disable-hal --disable-dbus --disable-dbus-control --disable-telepathy --enable-debug --enable-run-as-root --enable-coverage --enable-live555 --disable-swscale --enable-postproc --enable-real --enable-realrtsp --enable-a52 --enable-theora --disable-x264 --enable-x11 --with-x --with-live555-tree=/home/vlc/live --with-dvdnav-config-path=/home/vlc/libdvdnav-0.1.10 --with-dvbpsi-tree=/home/vlc/libdvbpsi4-0.1.5 --with-mad-tree=/home/vlc/libmad-0.15.1b --with-a52-tree=/home/vlc/a52dec-0.7.4 PKG_CONFIG_PATH=/home/vlc/fribidi-0.10.9/

sudo sed -e 's/define\s*_POSIX_SPIN_LOCKS\s*/define _POSIX_SPIN_LOCKS -1 \/\/ wrong: /g' -i /usr/include/bits/posix_opt.h

Then do the following changes:
----------------------------------------------------------------------------------------------------------------------------------
--- ./modules/demux/avformat/demux.c
+++ ./modules/demux/avformat/demux.c
@@ -84,7 +84,7 @@ static int Demux ( demux_t *p_demux );
static int Control( demux_t *p_demux, int i_query, va_list args );
static int IORead( void *opaque, uint8_t *buf, int buf_size );
-static offset_t IOSeek( void *opaque, offset_t offset, int whence );
+static int64_t IOSeek( void *opaque, int64_t offset, int whence );
/*****************************************************************************
* Open
@@ -170,7 +170,7 @@ int OpenDemux( vlc_object_t *p_this )
(int (*) (URLContext *, unsigned char *, int))IORead;
p_sys->url.prot->url_write = 0;
p_sys->url.prot->url_seek =
- (offset_t (*) (URLContext *, offset_t, int))IOSeek;
+ (int64_t (*) (URLContext *, int64_t, int))IOSeek;
p_sys->url.prot->url_close = 0;
p_sys->url.prot->next = 0;
init_put_byte( &p_sys->io, p_sys->io_buffer, p_sys->io_buffer_size,
@@ -493,7 +493,7 @@ static int IORead( void *opaque, uint8_t *buf, int buf_size )
return i_ret ? i_ret : -1;
}
-static offset_t IOSeek( void *opaque, offset_t offset, int whence )
+static int64_t IOSeek( void *opaque, int64_t offset, int whence )
{
URLContext *p_url = opaque;
demux_t *p_demux = p_url->priv_data;
--- ./modules/demux/avformat/mux.c
+++ ./modules/demux/avformat/mux.c
@@ -78,7 +78,7 @@ static int DelStream( sout_mux_t *, sout_input_t * );
static int Mux ( sout_mux_t * );
static int IOWrite( void *opaque, uint8_t *buf, int buf_size );
-static offset_t IOSeek( void *opaque, offset_t offset, int whence );
+static int64_t IOSeek( void *opaque, int64_t offset, int whence );
/*****************************************************************************
* Open
@@ -135,7 +135,7 @@ int OpenMux( vlc_object_t *p_this )
p_sys->url.prot->url_write =
(int (*) (URLContext *, unsigned char *, int))IOWrite;
p_sys->url.prot->url_seek =
- (offset_t (*) (URLContext *, offset_t, int))IOSeek;
+ (int64_t (*) (URLContext *, int64_t, int))IOSeek;
p_sys->url.prot->url_close = 0;
p_sys->url.prot->next = 0;
init_put_byte( &p_sys->io, p_sys->io_buffer, p_sys->io_buffer_size,
@@ -475,7 +475,7 @@ static int IOWrite( void *opaque, uint8_t *buf, int buf_size )
return i_ret ? i_ret : -1;
}
-static offset_t IOSeek( void *opaque, offset_t offset, int whence )
+static int64_t IOSeek( void *opaque, int64_t offset, int whence )
{
URLContext *p_url = opaque;
sout_mux_t *p_mux = p_url->priv_data;
----------------------------------------------------------------------------------------------------------------------------------

make
make install

On my side VLC installed successfuly.

But now bad news. I still can't perform the transcoding audio to the G.711
I do the following command:
vlc "/home/FFMPEG/Mr.Credo.mp3" :sout='#transcode{acodec=alaw,ab=64,scale=1,channels=1,ar=8000}:duplicate{dst=std{access=file,dst=/home/FFMPEG/my.wav}}'

Seems it VLC transcodes ok, but the my.wav file has "araw" as the audio codec and bitrate>300kbit/s. But in the command I set bitrate to 64k and codec "alaw".
Can anyone help?

maksim_kravchenko
New Cone
New Cone
Posts: 6
Joined: 16 Oct 2008 14:28

Re: HOW TO Compile VLC with AMR and G.711 support

Postby maksim_kravchenko » 22 Oct 2008 10:42

I found that after I installed VLC I don't have the following files related to alaw codec in the /vlc-0.9.3/modules/codec/ folder
I don't have such files as:
alaw.c
libalaw_plugin.la

So as I understand tht is the reason why I can't convers to G.711 format.

Can anybody help?

torino
Blank Cone
Blank Cone
Posts: 12
Joined: 27 Dec 2006 19:04

Re: HOW TO Compile VLC with AMR and G.711 support

Postby torino » 12 Nov 2008 14:52

Hi all,

I've a similar problem... I'm running Debian and I've got a VLC that supports AMR_NB perfectly. In order to have this running, I installed libamrnb, then I installed ffmpeg (compiling it with the --enable-libamr_nb option) and finally I installed VLC (compiling it over the amr-ed ffmpeg)

Well, the version of VLC that I've got running is VLC-0.8.6h. But now, when I want to update to a newest version (vlc-0.9.5) I am not able to compile the new VLC over the amr-ed ffmpeg.

If I compile it with the simple options:

./configure --disable-glx --disable-qt4 --disable-skins2

I can convert files but not to AMR (the avcodelib that VLC uses is not the one I've installed with the AMR support), and if I compile it with similar option than the ones I used for the 0.8.6h version compilation:

./configure --disable-glx --disable-qt4 --disable-skins2 --prefix=/usr --enable-pp --enable-shared --enable-shared-pp --enable-static --enable-live555 --with-live555-tree=/usr/local/lib/live --enable-v4l --enable-v4l2 --enable-faad --enable-ffmpeg --enable-real --enable-realrtsp

I can't even play some codecs (like wmv3) 'cause the VLC doesn't call the ffmeg decoders...

Then, the question is... ¿how can I compile the newest versions of VLC to use the libs of a resident FFmpeg?

Thanks in advance...

Rémi Denis-Courmont
Developer
Developer
Posts: 15358
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: HOW TO Compile VLC with AMR and G.711 support

Postby Rémi Denis-Courmont » 12 Nov 2008 17:14

Are you sure you have the avformat and avcodec pkg-config files installed properly? and pointing to the right pkg-config(not the native one)?
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

skliarie
New Cone
New Cone
Posts: 8
Joined: 18 Nov 2008 18:11

Re: HOW TO Compile VLC with AMR and G.711 support

Postby skliarie » 05 Jan 2009 19:06

I have managed to compile VLC 0.9.8a with AMR support, but now I have problem that all AMR encoded audio is stretched.

See the following bug report: https://trac.videolan.org/vlc/ticket/2384

Can someone help me please?

skliarie
New Cone
New Cone
Posts: 8
Joined: 18 Nov 2008 18:11

Re: HOW TO Compile VLC with AMR and G.711 support

Postby skliarie » 25 Mar 2009 14:08

Here are the instructions (as a shell script, but don't even think to run it as is) to build the vlc 0.9.8 with AMR support:
http://t11.mine.nu/~arie/vlc098_amr.sh

If you find errors in the script, please report to me at skliarie@gmail.com


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 20 guests