Build a VLC streaming media compilation environment (cygwin + vlc1.1.3)

Source: Internet
Author: User

Build the VLC compiling environment:

Recently, I want to create a VLC-based streaming media transmission and playback project. Because VLC is open-source, I have tailored VLC. The first step is to build a VLC compiling environment and search for a lot of information at night, I think Jeremiah has better summary. I am also a beginner in VLC. I have set up the environment for two days. I have finished it today. I will summarize it to my VLC friends:

(1) Preparations: Download cygwin, download vlc1.1.3, download library, and Lua. These Jeremiah files are provided:

Vlc-1.1.3 source code: http://download.videolan.org/pub/videolan/vlc/1.1.3/vlc-1.1.3.tar.bz2

Library: http://download.videolan.org/pub/testing/win32/contrib-20100616-win32-bin-gcc-4.4.4-runtime-3.17-only.tar.bz2

Lua: http://www.lua.org/ftp/lua-5.1.4.tar.gz

(2) first install cygwin. Note that cygwin can only be installed under the root directory, that is, under each disk. Otherwise, errors may occur. When installing cygwin, select:

Archive
Unzip
Zip
Devel
Autoconf
Automake
Binutils
CVS
Gcc
Gcc-core
Gcc-G
Gcc-mingw
Gcc-mingw-core
Gcc-mingw-G
GDB
Gettext
Gettext-devel
Git
Libiconv
Libgcrypt-devel
Libtool
Make
Mingw-runtime
NASM
Patchutils
PKG-config
Subversion
Editor
Vim
Libs
Expat
Libgcrypt
Web
Curl
Wget

After the installation is complete, click the cygwin shortcut on the desktop, and the home directory will be displayed under the installation directory;

(3) decompress Lua to the specified directory: Decompress Lua to/home/yourname. Modify src/makefile, change cc = GCC to CC = gcc-MnO-cygwin, and then execute

Make mingw
Make install

Luac

If the following text appears, the installation is successful.

D:/cygwin_new/usr/local/bin/luac.exe: no input files given
Usage: D:/cygwin_new/usr/local/bin/luac.exe [Options] [filenames].
Available options are:
-Process stdin
-L list
-O name output to file 'name' (default is "luac. Out ")
-P parse only
-S strip debug information
-V show version information
-- Stop handling options

 

(4) extract the source code and Library to the specified directory.

Decompress the source code to (D:/cygwin/home/yourname), and decompress the library to cygwin. You can use WinRAR to decompress the decompressed files, but you need to select the correct directory. The source code is decompressed under D:/cygwin/home/yourname. The Library is decompressed to D: /cygwin. Note: to decompress the package, right-click the package and click extract (Lua, vlc1.1.3, and library decompress ), this will decompress the file to the specified directory. (5) Delete the Linux editing command: Delete the three files (MOC, rcc, uic, and uic.exe) under/usr/Win32/bin. MOC, RCC, UIC is mainly used in Linux, in order to prevent conflicts, in Windows to delete it: (6) Run boststrap CD to the vlc-1.1.3 to execute. /Bootstrap this is a long process. wait patiently (7) Compile configvlc. sh (do not paste the following code in txt) in cygwin, VI configvlc. sh, paste the following statement in VI, save and exit, and execute. /configvlc. shpath =/usr/Win32/bin: $ path/
Pkg_config_libdir =/usr/Win32/lib/pkgconfig/
Cppflags = "-I/usr/Win32/include-I/usr/Win32/include/ebml "/
Ldflags =-L/usr/Win32/lib/
Cc = "gcc-MnO-cygwin" cxx = "G-MnO-cygwin "/
./Configure/
-- Host = i686-pc-mingw32/
-- Enable-NLS -- enable-SDL/
-- Enable-avcodec -- enable-avformat -- enable-swscale/
-- Enable-faad -- enable-Flac -- enable-theora/
-- Enable-FreeType/
-- Enable-fribidi/
-- Disable-fluidsynth/
-- Enable-live555 -- with-live555-tree =/usr/Win32/live.com/
-- Enable-Caca/
-- With-dvdna V-config-Path =/usr/Win32/bin/
-- Disable-vcdx -- enable-goom/
-- Enable-twolame -- enable-dvdread/
-- Enable-Debug -- enable-DCA/
-- Disable-MKV -- disable-taglib -- disable-projectm/
-- Disable-zvbi -- disable-Schroedinger -- disable-Dirac/
-- Enable-Mozilla -- With-mozilla-SDK-Path =/usr/Win32/gecko-SDK if the selected library does not match the source code, the compilation will fail, an error is reported and displayed.

Libvlc Configuration
--------------------
Version: 1.1. 3
System: mingw32
Architecture: i686 mmx sse sse2
Build flavor: Debug devel
VLC aliases: cvlc rvlc svlc qvlc
Plugins/bindings: ActiveX Mozilla

You can tune the compiler flags in VLC-config.
To build VLC and Its plugins, type './compile' or 'make '.

 

(8) modify the following rows of makefile. am, that is, add the first row to # (search by searching ).

# Cp "$ (top_srcdir)/extras/package/Win32/vlc.exe. manifest" $(win3
2_destdir )/"
# CP $ (top_srcdir)/projects/Mozilla/npvlc. dll. manifest $ (win32_des
Tdir)/Mozilla/
# CP $ (top_srcdir)/projects/ActiveX/axvlc. dll. manifest $ (win32_des
Tdir)/ActiveX/

 

(9) then make the compilation. Well, it will take a longer time to go home and have a meal to check the results. There should be no errors.

 

(10) Packaging

The exciting time is finally reached. Haha, package the compiled items into a green version and install the version, so that you can feel happy and increase confidence for yourself. Haha, the following describes the packaging command:

Make package-win32-base: packaged into green

Make package-win32-zip: pack into. ZIP file

 

(11) Installation Package Creation

Just when NSIs is installed on my computer, I will follow the method in my blog to create the installation package. Haha, the installation package can also be used. The method is described as follows: first install NSIS

In step 10, we have to go to the green edition and the. ZIP file, and then find the VLC. win32.nsi, right-click and select compile NSIs script. In this case, an error is reported and the VLC is opened based on the error message. win32.nsi (I opened it with ultraedit), locate the corresponding row, add the; sign in front, comment out the row, and then repeat this operation to compile successfully. At this point, the compilation of VLC is complete. If you have any questions, refer to Jeremiah's blog!

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.