Compile vlc1.0.2 full notes on Fedora10

Source: Internet
Author: User
Tags superuser permission
It took a long time to compile vlc on linux. Therefore, it was specially recorded throughout the compilation process. Originally, I first wanted to use cygwin or msys + mingw for compilation on windows. Later, the boss came to the saying that linux is not compiled, but false linux will encounter problems, my goal is not to build a vlc version on windows, but to debug vlc and check its execution process. So I will return to linux for compilation, fast compilation on real linux physical machines

It took a long time to compile vlc on linux. Therefore, it was specially recorded throughout the compilation process.
Originally, I first wanted to use cygwin or msys + mingw for compilation on windows. Later, the boss came to the saying that linux is not compiled, but false linux will encounter problems, my goal is not to build a vlc version on windows, but to debug vlc and check its execution process. So I will return to linux for compilation, compilation on real linux physical machines is fast.

The linux version is Fedora10, And the vlc version is the latest vlc1.0.2.

Compilation process on Vlc linux:
1. download the latest vlc code from the official vlc website, decompress the code, and enter the decompressed directory.
Because vlc uses a large number of third-party libraries, such as libdvbpsi (TS), libmp eg2, and ffmpeg, we need to first download the required third-party libraries for compilation. VLC provides an automated solution. Let's take a look at the main directory \ extras \ contrib. There are some tools in it to help you automatically download, patch, and compile all third-party libraries that may be used. Run the bootstrap in that directory first ***. mak can be found in the VLC code library. It is a system-related file, and then a simple make statement is enough. If you are familiar with these libraries, you 'd better manually filter them first. Some may not be what you need, but it may take a long time to download them.

After you executed bootstrap, there is a file called "distro. mk", you can modify it to decide which libs you will compile?

This step will take a long time and may encounter many problems in the middle:
1)
For example, libgsm is required when ffmpeg is compiled. If you make ffmpeg not support libgsm, the link address provided by libgsm cannot be found, therefore, you need to download the file from the Internet and put it in the extras/contrib/src directory. Then you can compile the file. during the compilation of the extras library, many link addresses may have expired, in this case, you need to download these libraries and compile them;
2)
The most depressing issue during the compilation process is the libtool issue. The latest libtool bug exists, so you can use the libtool that comes with the system. in/usr/bin, you can copy them, of course, you can also modify the configure file and change libtool to/usr/bin/libtool.
3)
When compiling x264, the system prompts that there is an error in libavswscale in ffmpeg. Compilation is always fail, and it is later found to be pixdesc. h /. c is put in libavcodec, and previously put in libavutil, so you have to put this file back, and then modify the Makefile file so that compilation can be completed.

2. after completing the first step, you can go to the vlc directory to compile the vlc source code. At this time, you can understand that not all libraries in the First Step need to be compiled, in fact, you only need to compile the library you need. For example, if you just want vlc to play the TS stream with mpeg2, you only need to compile libmp eg2, liba52, and libdvbpsi.
The most important thing here is to configure the configure parameter, because it determines which plug-ins you need to add in the vlc and the size of the compiled vlc, the following is my configuration file:

./Configure \
Enable-x11 \
-- Enable-xvideo \
-- Enable-sdl \
-- Enable-avcodec \
-- Enable-avformat \
-- Enable-swscale \
-- Enable-mad \
-- Enable-dvbpsi \
Enable-a52 \
Enable-libmpeg2 \
-- Enable-dvdna V \
-- Enable-faad \
-- Enable-vorbis \
-- Enable-ogg \
-- Enable-theora \
-- Enable-mkv \
-- Enable-freety -- disable-fribidi \
-- Enable-speex \
-- Enable-flac \
Disable-live555 \
-- Enable-caca \
Disable-skins2 \
-- Enable-alsa \
Disable-qt4 \
-- Enable-ncurses \
-- Enable-release \
-- With-dvbpsi =/usr/local \
-- Enable-run-as-root \
-- With-libmpeg2-tree =/home/lf/linfeng/vlc/vlc-1.0.4/extras/contrib/src/libmp eg2

Here we can execute./configure-h to obtain which parameters can be configured. If you have read more, you will understand what is going on.
Run make & make install. Note that make install requires the superuser permission.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.