<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Smowton</id>
	<title>VideoLAN Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Smowton"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/Smowton/"/>
	<updated>2026-11-04T14:52:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=22161</id>
		<title>Win32CompileMSYSNew</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=22161"/>
		<updated>2012-02-28T08:40:46Z</updated>

		<summary type="html">&lt;p&gt;Smowton: /* Glib and PKG-CONFIG */ Note yet more missing build instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction  =&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
&lt;br /&gt;
MSys is a helper environment for MinGW, the compiler chain for Windows based on GCC. It can build VLC natively on Windows.  Note that you could also [[Win32Compile|cross compile]] VLC from Linux, if desired (it is faster, and feels easier).&lt;br /&gt;
&lt;br /&gt;
VLC is a complex program with many dependencies, so minimal command-line experience is required. Also, don&#039;t be in a hurry (2 hours is a minimum for the whole process) and don&#039;t despair if it doesn&#039;t work first time.&lt;br /&gt;
&lt;br /&gt;
== On the edge vs Conservative ==&lt;br /&gt;
&lt;br /&gt;
This update aims at building versions from the 1.1.0 branch natively in the most straightforward way. &lt;br /&gt;
&lt;br /&gt;
Of course, if you want to live on the edge, feel free to select more recent versions of the proposed tools, contribs or sources, but the build has only been thoroughly validated with the versions indicated in the main text flow. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Such alternative ways are indented, italicized and marked &amp;quot;Note for the brave&amp;quot;&amp;amp;nbsp;:-). Your mileage may vary&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
This howto was re-created by [[User:J-b|Jean-Baptiste Kempf]] and updated in June 2009, September 2009, December 2009 and March 2010. &lt;br /&gt;
&lt;br /&gt;
It was updated in June 2010 by Vicne with the help of J-b, gnosygnu and MichaelMc &lt;br /&gt;
&lt;br /&gt;
= Windows tools needed  =&lt;br /&gt;
&lt;br /&gt;
== Text editor  ==&lt;br /&gt;
&lt;br /&gt;
To edit unix-style text documents you need a suitable editor. &lt;br /&gt;
&lt;br /&gt;
You can look at [http://sourceforge.net/projects/notepad2/ notepad2]. You can set File - Line endings - Default to &amp;quot;Unix (LF)&amp;quot;, but it always saves opened files in the ending style they have.&lt;br /&gt;
&lt;br /&gt;
Or you can look at [http://notepad-plus-plus.org/ notepad++].&lt;br /&gt;
&lt;br /&gt;
== Unzip Utility (7-zip) ==&lt;br /&gt;
&lt;br /&gt;
Many files to downloaded will have to be uncompressed. As most of them use Linux-originated formats (.tar.gz, .tar.bz2, .tar.lzma), you will need a versatile unzipping utility. A recent version of [http://www.7-zip.org/ 7-zip] is therefore strongly advised. &lt;br /&gt;
&lt;br /&gt;
Please note that most archives contain directory structures. Unless otherwise stated, you have to merge the contents with the existing dirs&lt;br /&gt;
&lt;br /&gt;
= GNU Windows Environment  =&lt;br /&gt;
&lt;br /&gt;
Before installing, ensure your Windows user name does not contain spaces (VLC will not build in a folder with spaces in it). If it does, please create another user on your system. &lt;br /&gt;
&lt;br /&gt;
In the following text, we&#039;ll refer to this user name as &amp;quot;&amp;amp;lt;username&amp;amp;gt;&amp;quot;. Replace it appropriately where needed of course. &lt;br /&gt;
&lt;br /&gt;
== MinGW  ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;the old version of mingw GCC (3.4.5) worked with VLC, because it uses SjLj exception unwinding.  Any &amp;quot;vanilla&amp;quot; version 4.0+ by default uses dwarf2 exception unwinding, so isn&#039;t compatible with the contribs.  So recommend installing TDM, below.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== TDM/MinGW Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-4.5.2.exe/download &lt;br /&gt;
&lt;br /&gt;
Go through the wizard: &lt;br /&gt;
&lt;br /&gt;
*uncheck &amp;quot;Check for updated files...&amp;quot; &lt;br /&gt;
*Select &amp;quot;Create&amp;quot; &lt;br /&gt;
*install to C:\MinGW &lt;br /&gt;
*keep default settings &lt;br /&gt;
&lt;br /&gt;
*afterwards check that C:\MinGW\bin is added to windows PATH (http://www.computerhope.com/issues/ch000549.htm)&lt;br /&gt;
&lt;br /&gt;
=== MinGW utils&amp;lt;br&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz &lt;br /&gt;
&lt;br /&gt;
Extract contents to c:\MinGW&lt;br /&gt;
&lt;br /&gt;
== MSys  ==&lt;br /&gt;
&lt;br /&gt;
=== MSys Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/project/downloading.php?group_id=2435&amp;amp;amp;filename=MSYS-1.0.11.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard and install to to default C:\Msys\1.0 &lt;br /&gt;
&lt;br /&gt;
In the command window that opens, answer questions as follows: &lt;br /&gt;
&lt;br /&gt;
 Accept Post Install: [y]&lt;br /&gt;
 MinGW Installed?&amp;amp;nbsp;:   [y]&lt;br /&gt;
 path to MinGW:       [c:/MinGW]&lt;br /&gt;
&lt;br /&gt;
=== MSys Developer Toolkit  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard, keeping default values &lt;br /&gt;
&lt;br /&gt;
=== AutoTools and libcrypt  ===&lt;br /&gt;
&lt;br /&gt;
Update autoconf, automake, libtool as well as libcrypt by downloading the following files and extracting them to C:\Msys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS/msysdev/autoconf/autoconf-2.68-1/autoconf-2.68-1-msys-1.0.17-bin.tar.lzma/download&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS/msysdev/automake/automake-1.11.1-1/automake-1.11.1-1-msys-1.0.13-bin.tar.lzma/download&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS/msysdev/libtool/libtool-2.4-1/libtool-2.4-1-msys-1.0.15-bin.tar.lzma/download&lt;br /&gt;
*http://prdownloads.sourceforge.net/mingw/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS/Extension/perl/perl-5.8.8-1/perl-5.8.8-1-msys-1.0.17-bin.tar.lzma/download&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS/Extension/m4/m4-1.4.14-1/m4-1.4.14-1-msys-1.0.13-bin.tar.lzma/download&lt;br /&gt;
&lt;br /&gt;
=== Glib and PKG-CONFIG  ===&lt;br /&gt;
&lt;br /&gt;
Similarly, download the following files and extract them to C:\MSys\1.0: &lt;br /&gt;
&lt;br /&gt;
Note* Download the latest version inside this folders (Last tested to be OK is glib 2.28, non-dev version)):&lt;br /&gt;
&lt;br /&gt;
*http://ftp.gnome.org/pub/GNOME/binaries/win32/glib &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip&lt;br /&gt;
*http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: I found that compiling 2.1.0 requires xgettext, msgmerge, msgfmt and so on. These in turn require libiconv. I&#039;m not sure if that suffices as at this point I gave up.&lt;br /&gt;
&lt;br /&gt;
=== Add pkg config path variable  ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to the *top* of C:\MSys\1.0\msys.bat: &lt;br /&gt;
&lt;br /&gt;
 set PKG_CONFIG_PATH=/win32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
=== Fix libtool search dirs  ===&lt;br /&gt;
&lt;br /&gt;
Open C:\MSys\1.0\bin\libtool and change line 9926 by appending &#039; /mingw/lib&#039; to the end of &#039;compiler_lib_search_dirs&#039;. The line should then read&amp;amp;nbsp;: &lt;br /&gt;
&lt;br /&gt;
 compiler_lib_search_dirs=&amp;quot;/usr/lib /usr/lib /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /mingw/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== LUA tools  ==&lt;br /&gt;
&lt;br /&gt;
VLC uses the LUA scripting language (See [http://www.lua.org lua.org]). Unfortunately, no binaries are provided so you need to compile them. &lt;br /&gt;
&lt;br /&gt;
*Download the lua tools package from http://www.lua.org/ftp/lua-5.1.4.tar.gz &lt;br /&gt;
*Uncompress it in your home folder (C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;) &lt;br /&gt;
*run MSys&lt;br /&gt;
*type the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd /home/&amp;lt;username&amp;gt;/lua-5.1.4 &lt;br /&gt;
 make mingw&lt;br /&gt;
&lt;br /&gt;
This should produce lua.exe, luac.exe and lua51.dll in the src directory. Put these in your /bin with the commands: &lt;br /&gt;
&lt;br /&gt;
 cd src &lt;br /&gt;
 cp *.exe *.dll /bin&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
Alternatively you could download some &amp;quot;full lua&amp;quot; package, as long as it puts a luac.exe in your path you are good to go, for instance http://code.google.com/p/luaforwindows binaries.&lt;br /&gt;
&lt;br /&gt;
= Precompiled contribs  =&lt;br /&gt;
&lt;br /&gt;
== New contrib system ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is the preferred way, especially if using a source version &amp;gt;= 2.1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Go into vlc_dir/contrib&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important note here&#039;&#039;&#039;: i586-mingw32msvc is just an example, the actual name must match your target system triplet, as printed by /vlc/source/root/autotools/config.guess. For example, I needed to name this &#039;i686-pc-mingw32&#039;. You can also see this test near the top of config.log: if your contrib/ directory is wrongly named, configure will not find any of your prebuilt contrib libraries (the first failure will be Lua, in my case).&lt;br /&gt;
&lt;br /&gt;
 $ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
 $ ../bootstrap --build=i586-mingw32msvc&lt;br /&gt;
 $ make prebuilt&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: it used to say &amp;quot;if tar complains, just ignore it&amp;quot; here. For me tar didn&#039;t just complain but died, because it was trying to unpack symlinks to non-existent absolute paths. I had to manually execute the rest of the prebuilt target, which consists of&lt;br /&gt;
&lt;br /&gt;
 $ mv i586-pc-something ..&lt;br /&gt;
 $ cd ../i586-pc-something&lt;br /&gt;
 $ change_prefix.sh&lt;br /&gt;
&lt;br /&gt;
I also found that change_prefix.sh, which rewrites .pc files to deal with their chosen location, used the -i option which is not supported by MSYS-shipped sed. I rewrote the sed script to write changes $file.new then mv $file.new $file.&lt;br /&gt;
&lt;br /&gt;
== Old precompiled contribs ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: Alternatively, you can get the latest contrib from&amp;amp;nbsp;:http://people.videolan.org/~jb/Contribs/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*download the file http://people.videolan.org/~jb/Contribs/contrib-20100608-win32-bin-gcc-4.4.4-runtime-3.17-only.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0 &#039;&#039;&#039;but without the /usr path&#039;&#039;&#039;. For example, one of the resulting files should be:&lt;br /&gt;
&lt;br /&gt;
 C:\MSys\1.0\win32\lib\libdvdnav.a&lt;br /&gt;
&lt;br /&gt;
Contribs are basically some precompiled 3rd party library (Here&#039;s a [[Contrib_Status|list]] of what they all are).&lt;br /&gt;
&lt;br /&gt;
= VLC sources  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: This section lists the steps for VLC version 1.1.0rc3. Alternatively, you could get the latest sources from the development tree using GIT. It&#039;s not as difficult as it looks to do so. If you want chose that route, please follow instructions on the [[Git Windows]] page (just download the VLC repository--you don&#039;t need the x264 one) then skip the next section &amp;quot;Last Change&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Base: VLC version 1.1.0rc3  ==&lt;br /&gt;
&lt;br /&gt;
*download the file http://download.videolan.org/pub/videolan/testing/vlc-1.1.0-rc3/vlc-1.1.0-rc3.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt; &lt;br /&gt;
*rename the vlc-1.1.0rc3 dir to vlc&lt;br /&gt;
&lt;br /&gt;
== add missing configure-msys (1.1.x only)==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-msys.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\msys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== add missing configure-common (1.1.x only) ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-common.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\msys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-common.sh&lt;br /&gt;
&lt;br /&gt;
= Last change&amp;amp;nbsp;: whoami and hostname  =&lt;br /&gt;
&lt;br /&gt;
Whoami is not available on Windows, and hostname doesn&#039;t support the -f option used by the build process. These utilities are used to show the name and computer of the person who compiled VLC in the &#039;About&#039; box. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: the steps below are file changes so that compile works, but an alternative is to download and install GNU whoami and hostname functionality. This can be achieved by doing the following steps:&lt;br /&gt;
# &#039;&#039;download coreutils from http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/coreutils, selecting any version (latter is normally better) then the file named like coreutils-5.97-2-msys-1.0.11-ext.tar.lzma (note &#039;-ext&#039; in file name) and extracting who.exe, whoami.exe, hostname.exe to C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
# &#039;&#039;download libintl dll from http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/libiconv, selecting any version (latter is normally better) then the file named like libiconv-1.13.1-2-msys-1.0.13-dll-2.tar.lzma (note &#039;-dll&#039; in file name) and extracting dll in C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
# &#039;&#039;download libiconv dll from http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/gettext, selecting any version (latter is normally better) then the file named like libintl-0.17-2-msys-dll-8.tar.lzma (note &#039;-dll&#039; in file name) and extracting dll in C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Whoami  ==&lt;br /&gt;
&lt;br /&gt;
Create a new file containing the single line: &lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;amp;lt;username&amp;amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
and save it as C:\MSys\1.0\bin\whoami (without any extension) &lt;br /&gt;
&lt;br /&gt;
== Hostname  ==&lt;br /&gt;
&lt;br /&gt;
Modify configure.ac so that it doesn&#039;t call &#039;hostname -f&#039; as follows: &lt;br /&gt;
&lt;br /&gt;
*open C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\vlc\configure.ac &lt;br /&gt;
*goto search button:&lt;br /&gt;
*change it as follows:&lt;br /&gt;
&lt;br /&gt;
 old: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
 new: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
&lt;br /&gt;
= Build VLC  =&lt;br /&gt;
&lt;br /&gt;
The build is made exclusively from the command line, so if you closed the prompt at the LUA step, re-execute C:\MSys\1.0\msys.bat, then type the commands as mentioned &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Any of these paths that mention &#039;&#039;&#039;/usr/win32&#039;&#039;&#039; are assuming you&#039;re using the OLD contribs method. If you&#039;re using the new method, the appropriate path will be more like /path/to/vlc/source/contrib/i686-pc-mingw32/...&lt;br /&gt;
&lt;br /&gt;
== Bootstrap  ==&lt;br /&gt;
&lt;br /&gt;
 cd vlc&lt;br /&gt;
 cp -v /usr/win32/share/aclocal/* m4/&lt;br /&gt;
 cp -v /usr/share/aclocal/* m4/&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH ./bootstrap&lt;br /&gt;
&lt;br /&gt;
== Configure  ==&lt;br /&gt;
&lt;br /&gt;
 sh extras/package/win32/configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: for version 2.1.0 at least this file is called configure.sh&lt;br /&gt;
&lt;br /&gt;
If you want any custom options, like &amp;quot;--disable-lua&amp;quot; or anything of that nature, you&#039;ll need to edit that file directly instead of passing them in as parameters (at least currently that is required).&lt;br /&gt;
&lt;br /&gt;
== Make (compile) ==&lt;br /&gt;
&lt;br /&gt;
Note&amp;amp;nbsp;: If your &amp;amp;lt;username&amp;amp;gt; starts with the &amp;quot;u&amp;quot; or &amp;quot;x&amp;quot; character, change C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\config.h and double all backslashes in VLC_COMPILED_BY constant. &lt;br /&gt;
&lt;br /&gt;
Type the following command&amp;amp;nbsp;: &lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH make&lt;br /&gt;
&lt;br /&gt;
If this step fails, try the following&lt;br /&gt;
* Go back to &amp;quot;Precompiled contribs&amp;quot; section, and obtain the latest compiled contrib (under &amp;quot;Note for the brave&amp;quot;)&lt;br /&gt;
* In the configure script section (configure-msys.sh), open that file and add --disable-upnp&lt;br /&gt;
&lt;br /&gt;
== Create self-contained packages  ==&lt;br /&gt;
&lt;br /&gt;
Once the compilation is done, build self-contained VLC packages with one of the following &amp;quot;make&amp;quot; commands: &lt;br /&gt;
&lt;br /&gt;
 make package-win32-base&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries &amp;quot;stripped&amp;quot; without any debugging symbols). &lt;br /&gt;
&lt;br /&gt;
 make package-win32-zip&lt;br /&gt;
&lt;br /&gt;
(Same as above but will package the directory in a zip file). &lt;br /&gt;
&lt;br /&gt;
 make package-win32&lt;br /&gt;
&lt;br /&gt;
(Same as above but will also create an auto-installer package. You will need to have NSIS installed in its default location for this to work).&lt;br /&gt;
&lt;br /&gt;
 make package-win32-base-debug&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries containing debug info usable by gdb).&lt;br /&gt;
&lt;br /&gt;
Note that with the 1.2 branch these names have changed slightly.  Run &#039;&lt;br /&gt;
 grep &#039;:&#039; Makefile | grep package-win32&lt;br /&gt;
to see what they are now.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
See [[Win32CompileMSYSTroubleShooting]].&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
*[[Win32CompileMSYSOld]] - deprecated documentation&lt;/div&gt;</summary>
		<author><name>Smowton</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=22159</id>
		<title>Win32CompileMSYSNew</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=22159"/>
		<updated>2012-02-28T07:07:33Z</updated>

		<summary type="html">&lt;p&gt;Smowton: /* New contrib system */  Note more MSYS install errata&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction  =&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
&lt;br /&gt;
MSys is a helper environment for MinGW, the compiler chain for Windows based on GCC. It can build VLC natively on Windows.  Note that you could also [[Win32Compile|cross compile]] VLC from Linux, if desired (it is faster, and feels easier).&lt;br /&gt;
&lt;br /&gt;
VLC is a complex program with many dependencies, so minimal command-line experience is required. Also, don&#039;t be in a hurry (2 hours is a minimum for the whole process) and don&#039;t despair if it doesn&#039;t work first time.&lt;br /&gt;
&lt;br /&gt;
== On the edge vs Conservative ==&lt;br /&gt;
&lt;br /&gt;
This update aims at building versions from the 1.1.0 branch natively in the most straightforward way. &lt;br /&gt;
&lt;br /&gt;
Of course, if you want to live on the edge, feel free to select more recent versions of the proposed tools, contribs or sources, but the build has only been thoroughly validated with the versions indicated in the main text flow. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Such alternative ways are indented, italicized and marked &amp;quot;Note for the brave&amp;quot;&amp;amp;nbsp;:-). Your mileage may vary&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
This howto was re-created by [[User:J-b|Jean-Baptiste Kempf]] and updated in June 2009, September 2009, December 2009 and March 2010. &lt;br /&gt;
&lt;br /&gt;
It was updated in June 2010 by Vicne with the help of J-b, gnosygnu and MichaelMc &lt;br /&gt;
&lt;br /&gt;
= Windows tools needed  =&lt;br /&gt;
&lt;br /&gt;
== Text editor  ==&lt;br /&gt;
&lt;br /&gt;
To edit unix-style text documents you need a suitable editor. &lt;br /&gt;
&lt;br /&gt;
You can look at [http://sourceforge.net/projects/notepad2/ notepad2]. You can set File - Line endings - Default to &amp;quot;Unix (LF)&amp;quot;, but it always saves opened files in the ending style they have.&lt;br /&gt;
&lt;br /&gt;
Or you can look at [http://notepad-plus-plus.org/ notepad++].&lt;br /&gt;
&lt;br /&gt;
== Unzip Utility (7-zip) ==&lt;br /&gt;
&lt;br /&gt;
Many files to downloaded will have to be uncompressed. As most of them use Linux-originated formats (.tar.gz, .tar.bz2, .tar.lzma), you will need a versatile unzipping utility. A recent version of [http://www.7-zip.org/ 7-zip] is therefore strongly advised. &lt;br /&gt;
&lt;br /&gt;
Please note that most archives contain directory structures. Unless otherwise stated, you have to merge the contents with the existing dirs&lt;br /&gt;
&lt;br /&gt;
= GNU Windows Environment  =&lt;br /&gt;
&lt;br /&gt;
Before installing, ensure your Windows user name does not contain spaces (VLC will not build in a folder with spaces in it). If it does, please create another user on your system. &lt;br /&gt;
&lt;br /&gt;
In the following text, we&#039;ll refer to this user name as &amp;quot;&amp;amp;lt;username&amp;amp;gt;&amp;quot;. Replace it appropriately where needed of course. &lt;br /&gt;
&lt;br /&gt;
== MinGW  ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;the old version of mingw GCC (3.4.5) worked with VLC, because it uses SjLj exception unwinding.  Any &amp;quot;vanilla&amp;quot; version 4.0+ by default uses dwarf2 exception unwinding, so isn&#039;t compatible with the contribs.  So recommend installing TDM, below.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== TDM/MinGW Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-4.5.2.exe/download &lt;br /&gt;
&lt;br /&gt;
Go through the wizard: &lt;br /&gt;
&lt;br /&gt;
*uncheck &amp;quot;Check for updated files...&amp;quot; &lt;br /&gt;
*Select &amp;quot;Create&amp;quot; &lt;br /&gt;
*install to C:\MinGW &lt;br /&gt;
*keep default settings &lt;br /&gt;
&lt;br /&gt;
*afterwards check that C:\MinGW\bin is added to windows PATH (http://www.computerhope.com/issues/ch000549.htm)&lt;br /&gt;
&lt;br /&gt;
=== MinGW utils&amp;lt;br&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz &lt;br /&gt;
&lt;br /&gt;
Extract contents to c:\MinGW&lt;br /&gt;
&lt;br /&gt;
== MSys  ==&lt;br /&gt;
&lt;br /&gt;
=== MSys Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/project/downloading.php?group_id=2435&amp;amp;amp;filename=MSYS-1.0.11.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard and install to to default C:\Msys\1.0 &lt;br /&gt;
&lt;br /&gt;
In the command window that opens, answer questions as follows: &lt;br /&gt;
&lt;br /&gt;
 Accept Post Install: [y]&lt;br /&gt;
 MinGW Installed?&amp;amp;nbsp;:   [y]&lt;br /&gt;
 path to MinGW:       [c:/MinGW]&lt;br /&gt;
&lt;br /&gt;
=== MSys Developer Toolkit  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard, keeping default values &lt;br /&gt;
&lt;br /&gt;
=== AutoTools and libcrypt  ===&lt;br /&gt;
&lt;br /&gt;
Update autoconf, automake, libtool as well as libcrypt by downloading the following files and extracting them to C:\Msys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS/msysdev/autoconf/autoconf-2.68-1/autoconf-2.68-1-msys-1.0.17-bin.tar.lzma/download&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS/msysdev/automake/automake-1.11.1-1/automake-1.11.1-1-msys-1.0.13-bin.tar.lzma/download&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS/msysdev/libtool/libtool-2.4-1/libtool-2.4-1-msys-1.0.15-bin.tar.lzma/download&lt;br /&gt;
*http://prdownloads.sourceforge.net/mingw/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS/Extension/perl/perl-5.8.8-1/perl-5.8.8-1-msys-1.0.17-bin.tar.lzma/download&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS/Extension/m4/m4-1.4.14-1/m4-1.4.14-1-msys-1.0.13-bin.tar.lzma/download&lt;br /&gt;
&lt;br /&gt;
=== Glib and PKG-CONFIG  ===&lt;br /&gt;
&lt;br /&gt;
Similarly, download the following files and extract them to C:\MSys\1.0: &lt;br /&gt;
&lt;br /&gt;
Note* Download the latest version inside this folders (Last tested to be OK is glib 2.28, non-dev version)):&lt;br /&gt;
&lt;br /&gt;
*http://ftp.gnome.org/pub/GNOME/binaries/win32/glib &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip&lt;br /&gt;
*http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip&lt;br /&gt;
&lt;br /&gt;
=== Add pkg config path variable  ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to the *top* of C:\MSys\1.0\msys.bat: &lt;br /&gt;
&lt;br /&gt;
 set PKG_CONFIG_PATH=/win32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
=== Fix libtool search dirs  ===&lt;br /&gt;
&lt;br /&gt;
Open C:\MSys\1.0\bin\libtool and change line 9926 by appending &#039; /mingw/lib&#039; to the end of &#039;compiler_lib_search_dirs&#039;. The line should then read&amp;amp;nbsp;: &lt;br /&gt;
&lt;br /&gt;
 compiler_lib_search_dirs=&amp;quot;/usr/lib /usr/lib /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /mingw/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== LUA tools  ==&lt;br /&gt;
&lt;br /&gt;
VLC uses the LUA scripting language (See [http://www.lua.org lua.org]). Unfortunately, no binaries are provided so you need to compile them. &lt;br /&gt;
&lt;br /&gt;
*Download the lua tools package from http://www.lua.org/ftp/lua-5.1.4.tar.gz &lt;br /&gt;
*Uncompress it in your home folder (C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;) &lt;br /&gt;
*run MSys&lt;br /&gt;
*type the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd /home/&amp;lt;username&amp;gt;/lua-5.1.4 &lt;br /&gt;
 make mingw&lt;br /&gt;
&lt;br /&gt;
This should produce lua.exe, luac.exe and lua51.dll in the src directory. Put these in your /bin with the commands: &lt;br /&gt;
&lt;br /&gt;
 cd src &lt;br /&gt;
 cp *.exe *.dll /bin&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
Alternatively you could download some &amp;quot;full lua&amp;quot; package, as long as it puts a luac.exe in your path you are good to go, for instance http://code.google.com/p/luaforwindows binaries.&lt;br /&gt;
&lt;br /&gt;
= Precompiled contribs  =&lt;br /&gt;
&lt;br /&gt;
== New contrib system ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is the preferred way, especially if using a source version &amp;gt;= 2.1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Go into vlc_dir/contrib&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Important note here&#039;&#039;&#039;: i586-mingw32msvc is just an example, the actual name must match your target system triplet, as printed by /vlc/source/root/autotools/config.guess. For example, I needed to name this &#039;i686-pc-mingw32&#039;. You can also see this test near the top of config.log: if your contrib/ directory is wrongly named, configure will not find any of your prebuilt contrib libraries (the first failure will be Lua, in my case).&lt;br /&gt;
&lt;br /&gt;
 $ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
 $ ../bootstrap --build=i586-mingw32msvc&lt;br /&gt;
 $ make prebuilt&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: it used to say &amp;quot;if tar complains, just ignore it&amp;quot; here. For me tar didn&#039;t just complain but died, because it was trying to unpack symlinks to non-existent absolute paths. I had to manually execute the rest of the prebuilt target, which consists of&lt;br /&gt;
&lt;br /&gt;
 $ mv i586-pc-something ..&lt;br /&gt;
 $ cd ../i586-pc-something&lt;br /&gt;
 $ change_prefix.sh&lt;br /&gt;
&lt;br /&gt;
I also found that change_prefix.sh, which rewrites .pc files to deal with their chosen location, used the -i option which is not supported by MSYS-shipped sed. I rewrote the sed script to write changes $file.new then mv $file.new $file.&lt;br /&gt;
&lt;br /&gt;
== Old precompiled contribs ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: Alternatively, you can get the latest contrib from&amp;amp;nbsp;:http://people.videolan.org/~jb/Contribs/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*download the file http://people.videolan.org/~jb/Contribs/contrib-20100608-win32-bin-gcc-4.4.4-runtime-3.17-only.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0 &#039;&#039;&#039;but without the /usr path&#039;&#039;&#039;. For example, one of the resulting files should be:&lt;br /&gt;
&lt;br /&gt;
 C:\MSys\1.0\win32\lib\libdvdnav.a&lt;br /&gt;
&lt;br /&gt;
Contribs are basically some precompiled 3rd party library (Here&#039;s a [[Contrib_Status|list]] of what they all are).&lt;br /&gt;
&lt;br /&gt;
= VLC sources  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: This section lists the steps for VLC version 1.1.0rc3. Alternatively, you could get the latest sources from the development tree using GIT. It&#039;s not as difficult as it looks to do so. If you want chose that route, please follow instructions on the [[Git Windows]] page (just download the VLC repository--you don&#039;t need the x264 one) then skip the next section &amp;quot;Last Change&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Base: VLC version 1.1.0rc3  ==&lt;br /&gt;
&lt;br /&gt;
*download the file http://download.videolan.org/pub/videolan/testing/vlc-1.1.0-rc3/vlc-1.1.0-rc3.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt; &lt;br /&gt;
*rename the vlc-1.1.0rc3 dir to vlc&lt;br /&gt;
&lt;br /&gt;
== add missing configure-msys (1.1.x only)==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-msys.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\msys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== add missing configure-common (1.1.x only) ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-common.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\msys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-common.sh&lt;br /&gt;
&lt;br /&gt;
= Last change&amp;amp;nbsp;: whoami and hostname  =&lt;br /&gt;
&lt;br /&gt;
Whoami is not available on Windows, and hostname doesn&#039;t support the -f option used by the build process. These utilities are used to show the name and computer of the person who compiled VLC in the &#039;About&#039; box. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: the steps below are file changes so that compile works, but an alternative is to download and install GNU whoami and hostname functionality. This can be achieved by doing the following steps:&lt;br /&gt;
# &#039;&#039;download coreutils from http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/coreutils, selecting any version (latter is normally better) then the file named like coreutils-5.97-2-msys-1.0.11-ext.tar.lzma (note &#039;-ext&#039; in file name) and extracting who.exe, whoami.exe, hostname.exe to C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
# &#039;&#039;download libintl dll from http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/libiconv, selecting any version (latter is normally better) then the file named like libiconv-1.13.1-2-msys-1.0.13-dll-2.tar.lzma (note &#039;-dll&#039; in file name) and extracting dll in C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
# &#039;&#039;download libiconv dll from http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/gettext, selecting any version (latter is normally better) then the file named like libintl-0.17-2-msys-dll-8.tar.lzma (note &#039;-dll&#039; in file name) and extracting dll in C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Whoami  ==&lt;br /&gt;
&lt;br /&gt;
Create a new file containing the single line: &lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;amp;lt;username&amp;amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
and save it as C:\MSys\1.0\bin\whoami (without any extension) &lt;br /&gt;
&lt;br /&gt;
== Hostname  ==&lt;br /&gt;
&lt;br /&gt;
Modify configure.ac so that it doesn&#039;t call &#039;hostname -f&#039; as follows: &lt;br /&gt;
&lt;br /&gt;
*open C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\vlc\configure.ac &lt;br /&gt;
*goto search button:&lt;br /&gt;
*change it as follows:&lt;br /&gt;
&lt;br /&gt;
 old: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
 new: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
&lt;br /&gt;
= Build VLC  =&lt;br /&gt;
&lt;br /&gt;
The build is made exclusively from the command line, so if you closed the prompt at the LUA step, re-execute C:\MSys\1.0\msys.bat, then type the commands as mentioned &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Any of these paths that mention &#039;&#039;&#039;/usr/win32&#039;&#039;&#039; are assuming you&#039;re using the OLD contribs method. If you&#039;re using the new method, the appropriate path will be more like /path/to/vlc/source/contrib/i686-pc-mingw32/...&lt;br /&gt;
&lt;br /&gt;
== Bootstrap  ==&lt;br /&gt;
&lt;br /&gt;
 cd vlc&lt;br /&gt;
 cp -v /usr/win32/share/aclocal/* m4/&lt;br /&gt;
 cp -v /usr/share/aclocal/* m4/&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH ./bootstrap&lt;br /&gt;
&lt;br /&gt;
== Configure  ==&lt;br /&gt;
&lt;br /&gt;
 sh extras/package/win32/configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: for version 2.1.0 at least this file is called configure.sh&lt;br /&gt;
&lt;br /&gt;
If you want any custom options, like &amp;quot;--disable-lua&amp;quot; or anything of that nature, you&#039;ll need to edit that file directly instead of passing them in as parameters (at least currently that is required).&lt;br /&gt;
&lt;br /&gt;
== Make (compile) ==&lt;br /&gt;
&lt;br /&gt;
Note&amp;amp;nbsp;: If your &amp;amp;lt;username&amp;amp;gt; starts with the &amp;quot;u&amp;quot; or &amp;quot;x&amp;quot; character, change C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\config.h and double all backslashes in VLC_COMPILED_BY constant. &lt;br /&gt;
&lt;br /&gt;
Type the following command&amp;amp;nbsp;: &lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH make&lt;br /&gt;
&lt;br /&gt;
If this step fails, try the following&lt;br /&gt;
* Go back to &amp;quot;Precompiled contribs&amp;quot; section, and obtain the latest compiled contrib (under &amp;quot;Note for the brave&amp;quot;)&lt;br /&gt;
* In the configure script section (configure-msys.sh), open that file and add --disable-upnp&lt;br /&gt;
&lt;br /&gt;
== Create self-contained packages  ==&lt;br /&gt;
&lt;br /&gt;
Once the compilation is done, build self-contained VLC packages with one of the following &amp;quot;make&amp;quot; commands: &lt;br /&gt;
&lt;br /&gt;
 make package-win32-base&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries &amp;quot;stripped&amp;quot; without any debugging symbols). &lt;br /&gt;
&lt;br /&gt;
 make package-win32-zip&lt;br /&gt;
&lt;br /&gt;
(Same as above but will package the directory in a zip file). &lt;br /&gt;
&lt;br /&gt;
 make package-win32&lt;br /&gt;
&lt;br /&gt;
(Same as above but will also create an auto-installer package. You will need to have NSIS installed in its default location for this to work).&lt;br /&gt;
&lt;br /&gt;
 make package-win32-base-debug&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries containing debug info usable by gdb).&lt;br /&gt;
&lt;br /&gt;
Note that with the 1.2 branch these names have changed slightly.  Run &#039;&lt;br /&gt;
 grep &#039;:&#039; Makefile | grep package-win32&lt;br /&gt;
to see what they are now.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
See [[Win32CompileMSYSTroubleShooting]].&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
*[[Win32CompileMSYSOld]] - deprecated documentation&lt;/div&gt;</summary>
		<author><name>Smowton</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=22158</id>
		<title>Win32CompileMSYSNew</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Win32CompileMSYSNew&amp;diff=22158"/>
		<updated>2012-02-28T06:51:46Z</updated>

		<summary type="html">&lt;p&gt;Smowton: /* Build VLC */  Note MSYS install errata&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction  =&lt;br /&gt;
&lt;br /&gt;
== About ==&lt;br /&gt;
&lt;br /&gt;
MSys is a helper environment for MinGW, the compiler chain for Windows based on GCC. It can build VLC natively on Windows.  Note that you could also [[Win32Compile|cross compile]] VLC from Linux, if desired (it is faster, and feels easier).&lt;br /&gt;
&lt;br /&gt;
VLC is a complex program with many dependencies, so minimal command-line experience is required. Also, don&#039;t be in a hurry (2 hours is a minimum for the whole process) and don&#039;t despair if it doesn&#039;t work first time.&lt;br /&gt;
&lt;br /&gt;
== On the edge vs Conservative ==&lt;br /&gt;
&lt;br /&gt;
This update aims at building versions from the 1.1.0 branch natively in the most straightforward way. &lt;br /&gt;
&lt;br /&gt;
Of course, if you want to live on the edge, feel free to select more recent versions of the proposed tools, contribs or sources, but the build has only been thoroughly validated with the versions indicated in the main text flow. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Such alternative ways are indented, italicized and marked &amp;quot;Note for the brave&amp;quot;&amp;amp;nbsp;:-). Your mileage may vary&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
&lt;br /&gt;
This howto was re-created by [[User:J-b|Jean-Baptiste Kempf]] and updated in June 2009, September 2009, December 2009 and March 2010. &lt;br /&gt;
&lt;br /&gt;
It was updated in June 2010 by Vicne with the help of J-b, gnosygnu and MichaelMc &lt;br /&gt;
&lt;br /&gt;
= Windows tools needed  =&lt;br /&gt;
&lt;br /&gt;
== Text editor  ==&lt;br /&gt;
&lt;br /&gt;
To edit unix-style text documents you need a suitable editor. &lt;br /&gt;
&lt;br /&gt;
You can look at [http://sourceforge.net/projects/notepad2/ notepad2]. You can set File - Line endings - Default to &amp;quot;Unix (LF)&amp;quot;, but it always saves opened files in the ending style they have.&lt;br /&gt;
&lt;br /&gt;
Or you can look at [http://notepad-plus-plus.org/ notepad++].&lt;br /&gt;
&lt;br /&gt;
== Unzip Utility (7-zip) ==&lt;br /&gt;
&lt;br /&gt;
Many files to downloaded will have to be uncompressed. As most of them use Linux-originated formats (.tar.gz, .tar.bz2, .tar.lzma), you will need a versatile unzipping utility. A recent version of [http://www.7-zip.org/ 7-zip] is therefore strongly advised. &lt;br /&gt;
&lt;br /&gt;
Please note that most archives contain directory structures. Unless otherwise stated, you have to merge the contents with the existing dirs&lt;br /&gt;
&lt;br /&gt;
= GNU Windows Environment  =&lt;br /&gt;
&lt;br /&gt;
Before installing, ensure your Windows user name does not contain spaces (VLC will not build in a folder with spaces in it). If it does, please create another user on your system. &lt;br /&gt;
&lt;br /&gt;
In the following text, we&#039;ll refer to this user name as &amp;quot;&amp;amp;lt;username&amp;amp;gt;&amp;quot;. Replace it appropriately where needed of course. &lt;br /&gt;
&lt;br /&gt;
== MinGW  ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;the old version of mingw GCC (3.4.5) worked with VLC, because it uses SjLj exception unwinding.  Any &amp;quot;vanilla&amp;quot; version 4.0+ by default uses dwarf2 exception unwinding, so isn&#039;t compatible with the contribs.  So recommend installing TDM, below.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== TDM/MinGW Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm-gcc-4.5.2.exe/download &lt;br /&gt;
&lt;br /&gt;
Go through the wizard: &lt;br /&gt;
&lt;br /&gt;
*uncheck &amp;quot;Check for updated files...&amp;quot; &lt;br /&gt;
*Select &amp;quot;Create&amp;quot; &lt;br /&gt;
*install to C:\MinGW &lt;br /&gt;
*keep default settings &lt;br /&gt;
&lt;br /&gt;
*afterwards check that C:\MinGW\bin is added to windows PATH (http://www.computerhope.com/issues/ch000549.htm)&lt;br /&gt;
&lt;br /&gt;
=== MinGW utils&amp;lt;br&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Installing mingw-utils is recommended: http://prdownloads.sourceforge.net/mingw/mingw-utils-0.3.tar.gz &lt;br /&gt;
&lt;br /&gt;
Extract contents to c:\MinGW&lt;br /&gt;
&lt;br /&gt;
== MSys  ==&lt;br /&gt;
&lt;br /&gt;
=== MSys Setup  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://sourceforge.net/project/downloading.php?group_id=2435&amp;amp;amp;filename=MSYS-1.0.11.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard and install to to default C:\Msys\1.0 &lt;br /&gt;
&lt;br /&gt;
In the command window that opens, answer questions as follows: &lt;br /&gt;
&lt;br /&gt;
 Accept Post Install: [y]&lt;br /&gt;
 MinGW Installed?&amp;amp;nbsp;:   [y]&lt;br /&gt;
 path to MinGW:       [c:/MinGW]&lt;br /&gt;
&lt;br /&gt;
=== MSys Developer Toolkit  ===&lt;br /&gt;
&lt;br /&gt;
Use the installer found at http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe &lt;br /&gt;
&lt;br /&gt;
Go through the wizard, keeping default values &lt;br /&gt;
&lt;br /&gt;
=== AutoTools and libcrypt  ===&lt;br /&gt;
&lt;br /&gt;
Update autoconf, automake, libtool as well as libcrypt by downloading the following files and extracting them to C:\Msys\1.0: &lt;br /&gt;
&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS/msysdev/autoconf/autoconf-2.68-1/autoconf-2.68-1-msys-1.0.17-bin.tar.lzma/download&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS/msysdev/automake/automake-1.11.1-1/automake-1.11.1-1-msys-1.0.13-bin.tar.lzma/download&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS/msysdev/libtool/libtool-2.4-1/libtool-2.4-1-msys-1.0.15-bin.tar.lzma/download&lt;br /&gt;
*http://prdownloads.sourceforge.net/mingw/libcrypt-1.1_1-2-msys-1.0.11-dll-0.tar.lzma&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS/Extension/perl/perl-5.8.8-1/perl-5.8.8-1-msys-1.0.17-bin.tar.lzma/download&lt;br /&gt;
*http://sourceforge.net/projects/mingw/files/MSYS/Extension/m4/m4-1.4.14-1/m4-1.4.14-1-msys-1.0.13-bin.tar.lzma/download&lt;br /&gt;
&lt;br /&gt;
=== Glib and PKG-CONFIG  ===&lt;br /&gt;
&lt;br /&gt;
Similarly, download the following files and extract them to C:\MSys\1.0: &lt;br /&gt;
&lt;br /&gt;
Note* Download the latest version inside this folders (Last tested to be OK is glib 2.28, non-dev version)):&lt;br /&gt;
&lt;br /&gt;
*http://ftp.gnome.org/pub/GNOME/binaries/win32/glib &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.23-3_win32.zip &lt;br /&gt;
*ftp://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config-dev_0.23-3_win32.zip&lt;br /&gt;
*http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip&lt;br /&gt;
&lt;br /&gt;
=== Add pkg config path variable  ===&lt;br /&gt;
&lt;br /&gt;
Add the following line to the *top* of C:\MSys\1.0\msys.bat: &lt;br /&gt;
&lt;br /&gt;
 set PKG_CONFIG_PATH=/win32/lib/pkgconfig&lt;br /&gt;
&lt;br /&gt;
=== Fix libtool search dirs  ===&lt;br /&gt;
&lt;br /&gt;
Open C:\MSys\1.0\bin\libtool and change line 9926 by appending &#039; /mingw/lib&#039; to the end of &#039;compiler_lib_search_dirs&#039;. The line should then read&amp;amp;nbsp;: &lt;br /&gt;
&lt;br /&gt;
 compiler_lib_search_dirs=&amp;quot;/usr/lib /usr/lib /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1 /bin/../lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /usr/lib/gcc-lib/i686-pc-msys/2.95.3-1/../../../../i686-pc-msys/lib /mingw/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== LUA tools  ==&lt;br /&gt;
&lt;br /&gt;
VLC uses the LUA scripting language (See [http://www.lua.org lua.org]). Unfortunately, no binaries are provided so you need to compile them. &lt;br /&gt;
&lt;br /&gt;
*Download the lua tools package from http://www.lua.org/ftp/lua-5.1.4.tar.gz &lt;br /&gt;
*Uncompress it in your home folder (C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;) &lt;br /&gt;
*run MSys&lt;br /&gt;
*type the following commands:&lt;br /&gt;
&lt;br /&gt;
 cd /home/&amp;lt;username&amp;gt;/lua-5.1.4 &lt;br /&gt;
 make mingw&lt;br /&gt;
&lt;br /&gt;
This should produce lua.exe, luac.exe and lua51.dll in the src directory. Put these in your /bin with the commands: &lt;br /&gt;
&lt;br /&gt;
 cd src &lt;br /&gt;
 cp *.exe *.dll /bin&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
Alternatively you could download some &amp;quot;full lua&amp;quot; package, as long as it puts a luac.exe in your path you are good to go, for instance http://code.google.com/p/luaforwindows binaries.&lt;br /&gt;
&lt;br /&gt;
= Precompiled contribs  =&lt;br /&gt;
&lt;br /&gt;
== New contrib system ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This is the preferred way, especially if using a source version &amp;gt;= 2.1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Go into vlc_dir/contrib&lt;br /&gt;
&lt;br /&gt;
 $ mkdir win32 &amp;amp;&amp;amp; cd win32&lt;br /&gt;
 $ ../bootstrap --build=i586-mingw32msvc&lt;br /&gt;
 $ make prebuilt&lt;br /&gt;
&lt;br /&gt;
If tar complains, just ignore it.&lt;br /&gt;
&lt;br /&gt;
Now wait...&lt;br /&gt;
&lt;br /&gt;
== Old precompiled contribs ==&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: Alternatively, you can get the latest contrib from&amp;amp;nbsp;:http://people.videolan.org/~jb/Contribs/&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*download the file http://people.videolan.org/~jb/Contribs/contrib-20100608-win32-bin-gcc-4.4.4-runtime-3.17-only.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0 &#039;&#039;&#039;but without the /usr path&#039;&#039;&#039;. For example, one of the resulting files should be:&lt;br /&gt;
&lt;br /&gt;
 C:\MSys\1.0\win32\lib\libdvdnav.a&lt;br /&gt;
&lt;br /&gt;
Contribs are basically some precompiled 3rd party library (Here&#039;s a [[Contrib_Status|list]] of what they all are).&lt;br /&gt;
&lt;br /&gt;
= VLC sources  =&lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: This section lists the steps for VLC version 1.1.0rc3. Alternatively, you could get the latest sources from the development tree using GIT. It&#039;s not as difficult as it looks to do so. If you want chose that route, please follow instructions on the [[Git Windows]] page (just download the VLC repository--you don&#039;t need the x264 one) then skip the next section &amp;quot;Last Change&amp;quot;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Base: VLC version 1.1.0rc3  ==&lt;br /&gt;
&lt;br /&gt;
*download the file http://download.videolan.org/pub/videolan/testing/vlc-1.1.0-rc3/vlc-1.1.0-rc3.tar.bz2 &lt;br /&gt;
*extract it to C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt; &lt;br /&gt;
*rename the vlc-1.1.0rc3 dir to vlc&lt;br /&gt;
&lt;br /&gt;
== add missing configure-msys (1.1.x only)==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-msys.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\msys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
== add missing configure-common (1.1.x only) ==&lt;br /&gt;
* Download http://git.videolan.org/?p=vlc.git;a=blob_plain;f=extras/package/win32/configure-common.sh;hb=HEAD&lt;br /&gt;
* Save it (not using proposed name) as C:\msys\1.0\home\&amp;lt;username&amp;gt;\vlc\extras\package\win32\configure-common.sh&lt;br /&gt;
&lt;br /&gt;
= Last change&amp;amp;nbsp;: whoami and hostname  =&lt;br /&gt;
&lt;br /&gt;
Whoami is not available on Windows, and hostname doesn&#039;t support the -f option used by the build process. These utilities are used to show the name and computer of the person who compiled VLC in the &#039;About&#039; box. &lt;br /&gt;
&lt;br /&gt;
:&#039;&#039;Note for the brave&amp;amp;nbsp;: the steps below are file changes so that compile works, but an alternative is to download and install GNU whoami and hostname functionality. This can be achieved by doing the following steps:&lt;br /&gt;
# &#039;&#039;download coreutils from http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/coreutils, selecting any version (latter is normally better) then the file named like coreutils-5.97-2-msys-1.0.11-ext.tar.lzma (note &#039;-ext&#039; in file name) and extracting who.exe, whoami.exe, hostname.exe to C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
# &#039;&#039;download libintl dll from http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/libiconv, selecting any version (latter is normally better) then the file named like libiconv-1.13.1-2-msys-1.0.13-dll-2.tar.lzma (note &#039;-dll&#039; in file name) and extracting dll in C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
# &#039;&#039;download libiconv dll from http://sourceforge.net/projects/mingw/files/MSYS/BaseSystem/gettext, selecting any version (latter is normally better) then the file named like libintl-0.17-2-msys-dll-8.tar.lzma (note &#039;-dll&#039; in file name) and extracting dll in C:/MSys/1.0/bin&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Whoami  ==&lt;br /&gt;
&lt;br /&gt;
Create a new file containing the single line: &lt;br /&gt;
&lt;br /&gt;
 echo &#039;&amp;amp;lt;username&amp;amp;gt;&#039;&lt;br /&gt;
&lt;br /&gt;
and save it as C:\MSys\1.0\bin\whoami (without any extension) &lt;br /&gt;
&lt;br /&gt;
== Hostname  ==&lt;br /&gt;
&lt;br /&gt;
Modify configure.ac so that it doesn&#039;t call &#039;hostname -f&#039; as follows: &lt;br /&gt;
&lt;br /&gt;
*open C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\vlc\configure.ac &lt;br /&gt;
*goto search button:&lt;br /&gt;
*change it as follows:&lt;br /&gt;
&lt;br /&gt;
 old: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname -f 2&amp;amp;gt; /dev/null || hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
 new: AC_DEFINE_UNQUOTED(VLC_COMPILE_HOST, &amp;quot;`hostname`&amp;quot;, [host which ran configure])&lt;br /&gt;
&lt;br /&gt;
= Build VLC  =&lt;br /&gt;
&lt;br /&gt;
The build is made exclusively from the command line, so if you closed the prompt at the LUA step, re-execute C:\MSys\1.0\msys.bat, then type the commands as mentioned &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: Any of these paths that mention &#039;&#039;&#039;/usr/win32&#039;&#039;&#039; are assuming you&#039;re using the OLD contribs method. If you&#039;re using the new method, the appropriate path will be more like /path/to/vlc/source/contrib/i686-pc-mingw32/...&lt;br /&gt;
&lt;br /&gt;
== Bootstrap  ==&lt;br /&gt;
&lt;br /&gt;
 cd vlc&lt;br /&gt;
 cp -v /usr/win32/share/aclocal/* m4/&lt;br /&gt;
 cp -v /usr/share/aclocal/* m4/&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH ./bootstrap&lt;br /&gt;
&lt;br /&gt;
== Configure  ==&lt;br /&gt;
&lt;br /&gt;
 sh extras/package/win32/configure-msys.sh&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039;: for version 2.1.0 at least this file is called configure.sh&lt;br /&gt;
&lt;br /&gt;
If you want any custom options, like &amp;quot;--disable-lua&amp;quot; or anything of that nature, you&#039;ll need to edit that file directly instead of passing them in as parameters (at least currently that is required).&lt;br /&gt;
&lt;br /&gt;
== Make (compile) ==&lt;br /&gt;
&lt;br /&gt;
Note&amp;amp;nbsp;: If your &amp;amp;lt;username&amp;amp;gt; starts with the &amp;quot;u&amp;quot; or &amp;quot;x&amp;quot; character, change C:\MSys\1.0\home\&amp;amp;lt;username&amp;amp;gt;\config.h and double all backslashes in VLC_COMPILED_BY constant. &lt;br /&gt;
&lt;br /&gt;
Type the following command&amp;amp;nbsp;: &lt;br /&gt;
&lt;br /&gt;
 PATH=/usr/win32/bin:$PATH make&lt;br /&gt;
&lt;br /&gt;
If this step fails, try the following&lt;br /&gt;
* Go back to &amp;quot;Precompiled contribs&amp;quot; section, and obtain the latest compiled contrib (under &amp;quot;Note for the brave&amp;quot;)&lt;br /&gt;
* In the configure script section (configure-msys.sh), open that file and add --disable-upnp&lt;br /&gt;
&lt;br /&gt;
== Create self-contained packages  ==&lt;br /&gt;
&lt;br /&gt;
Once the compilation is done, build self-contained VLC packages with one of the following &amp;quot;make&amp;quot; commands: &lt;br /&gt;
&lt;br /&gt;
 make package-win32-base&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries &amp;quot;stripped&amp;quot; without any debugging symbols). &lt;br /&gt;
&lt;br /&gt;
 make package-win32-zip&lt;br /&gt;
&lt;br /&gt;
(Same as above but will package the directory in a zip file). &lt;br /&gt;
&lt;br /&gt;
 make package-win32&lt;br /&gt;
&lt;br /&gt;
(Same as above but will also create an auto-installer package. You will need to have NSIS installed in its default location for this to work).&lt;br /&gt;
&lt;br /&gt;
 make package-win32-base-debug&lt;br /&gt;
&lt;br /&gt;
(This will create a subdirectory named vlc-x.x.x with all the binaries containing debug info usable by gdb).&lt;br /&gt;
&lt;br /&gt;
Note that with the 1.2 branch these names have changed slightly.  Run &#039;&lt;br /&gt;
 grep &#039;:&#039; Makefile | grep package-win32&lt;br /&gt;
to see what they are now.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&lt;br /&gt;
See [[Win32CompileMSYSTroubleShooting]].&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
*[[Win32CompileMSYSOld]] - deprecated documentation&lt;/div&gt;</summary>
		<author><name>Smowton</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Documentation:Streaming_HowTo/Streaming_for_the_iPhone&amp;diff=22154</id>
		<title>Documentation:Streaming HowTo/Streaming for the iPhone</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Documentation:Streaming_HowTo/Streaming_for_the_iPhone&amp;diff=22154"/>
		<updated>2012-02-27T02:31:18Z</updated>

		<summary type="html">&lt;p&gt;Smowton: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightMenu|documentation streaming howto toc}}&lt;br /&gt;
&lt;br /&gt;
Note: this functionality is intended to be part of the 1.2 release, so at the time of writing it is only available in nightly builds.&lt;br /&gt;
&lt;br /&gt;
== Streaming for the iPhone ==&lt;br /&gt;
&lt;br /&gt;
This functionality allows you to link VLC&#039;s transcoding capability with a segmenter which will in turn create the series of files needed for http live streaming to the iPhone. &lt;br /&gt;
&lt;br /&gt;
Unlike most of VLC&#039;s streaming, it doesn&#039;t actually stream the files, but assumes that you have your own webserver which will do that job.&lt;br /&gt;
&lt;br /&gt;
Notes from the developer:&lt;br /&gt;
*This has only been tested using H.264 w/MP3 or AAC audio using mux=ts, and raw MP3 using mux=raw&lt;br /&gt;
*I&#039;ve been mostly an FFMPEG guy till now, so forgive me if my VLC understanding/terminology is somewhat off. &lt;br /&gt;
*This plug-in should support both Live and non-live HTTP Live streaming feeds, depending on the options passed to the module.&lt;br /&gt;
&lt;br /&gt;
Notes from the community:&lt;br /&gt;
*The user running vlc needs to have read/write/delete permissions on the directory where the .m3u8 playlist and .ts file segments will be created and deleted on the webserver.&lt;br /&gt;
&lt;br /&gt;
=== Instructions ===&lt;br /&gt;
&lt;br /&gt;
The name of the module is livehttp, and is specified by specifying &amp;quot;access=livehttp&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Options ===&lt;br /&gt;
&lt;br /&gt;
splitanywhere= (default: false) &lt;br /&gt;
*Tells livehttp to split the stream anywhere, not just on video keyframes.  Currently required to be set to true for audio-only streams and not recommended (probably won&#039;t work) for video streams. &lt;br /&gt;
&lt;br /&gt;
seglen= (default: 10)  &lt;br /&gt;
*How many seconds of audio/video each segment should contain.  Apple recommends 10, I have been using 5. &lt;br /&gt;
&lt;br /&gt;
numsegs=(default: 0)&lt;br /&gt;
*The number of segments to keep in the index file.  The default of 0 keeps all segments in the index (which you would want for non-live streaming).  For live streaming the specification require at least 3. &lt;br /&gt;
&lt;br /&gt;
delsegs= (default: true)&lt;br /&gt;
*Delete segments as they are no longer needed.   If numsegs=0 this parameter is ignored (as all segments are assumed to be needed) &lt;br /&gt;
&lt;br /&gt;
dst=&lt;br /&gt;
*This is actually an option to the access std module.  The path of the segment files to write.  The # characters get replaced with the segment number.  So a path of &amp;quot;seg-###.ts&amp;quot; will end up with files called &amp;quot;seg-001.ts, seg-002.ts, seg-003.ts&amp;quot; etc. &lt;br /&gt;
&lt;br /&gt;
index=&lt;br /&gt;
*The path of the index file to write, which will contain the &amp;quot;playlist&amp;quot; of video/audio segments to stream.  Recommended to end in .m3u8 by specifications.  This is the file the &amp;lt;video&amp;gt; tag should be pointed to. &lt;br /&gt;
&lt;br /&gt;
index-url=&lt;br /&gt;
*This is the URL that corresponds to the dst above (how a browser would access the dst file).  The # characters get replaced same as in the dst parameter.  Note:  The filename portion of this URL will most likely need to be in the exact same format as the dst parameter.  So for example if dst=/www/seg-##.ts then the index-url should be something like index-url=http://mydomain.com/streams/seg-##.ts  (Note the same number of # characters)&lt;br /&gt;
&lt;br /&gt;
ratecontrol=(default: false)&lt;br /&gt;
*If set to false the there is no rate control (the muxer sends the data as fast/slow as it can to the streamer).  If set to true the muxer should do rate-control to control the speed to muxed audio/video is sent to the streamer.  Recommended setting is false in most cases.  The only time I&#039;ve needed this set to true is while doing a live sliding window stream of a local media file.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
All examples assume the following:&lt;br /&gt;
*The Web Server root directory is /var/www&lt;br /&gt;
*The domain name of the web server is mydomain.com&lt;br /&gt;
*The stream segments &amp;amp;amp; index files will be written into /var/www/streaming/ and will be accessed via http://mydomain.com/streaming/...&lt;br /&gt;
*The destination stream name index file will be called &amp;quot;mystream.m3u8&amp;quot;&lt;br /&gt;
*The following HTML will allow you to view the video based on the above on an iPhone:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Re-stream a live video feed:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -I dummy --mms-caching 0 http://www.nasa.gov/55644main_NASATV_Windows.asx vlc://quit --sout=&#039;#transcode{width=320,height=240,fps=25,vcodec=h264,vb=256,venc=x264{aud,profile=baseline,level=30,keyint=30,ref=1},acodec=mp3,ab=96}:std{access=livehttp{seglen=10,delsegs=true,numsegs=5,index=/var/www/streaming/mystream.m3u8,index-url=http://mydomain.com/streaming/mystream-########.ts},mux=ts{use-key-frames},dst=/var/www/streaming/mystream-########.ts}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a VOD stream:&lt;br /&gt;
(Non-live.  When this command finishes, all the segments should have been created and the index file contain pointers to all of them)&lt;br /&gt;
 % &#039;&#039;&#039;vlc -I dummy /var/myvideos/video.mpg vlc://quit --sout=&#039;#transcode{width=320,height=240,fps=25,vcodec=h264,vb=256,venc=x264{aud,profile=baseline,level=30,keyint=30,ref=1},acodec=mp3,ab=96}:std{access=livehttp{seglen=10,delsegs=false,numsegs=0,index=/var/www/streaming/mystream.m3u8,index-url=http://mydomain.com/streaming/mystream-########.ts},mux=ts{use-key-frames},dst=/var/www/streaming/mystream-########.ts}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Re-stream a live audio feed:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -I dummy --mms-caching 0 http://www.nasa.gov/55644main_NASATV_Windows.asx vlc://quit --sout=&#039;#transcode{acodec=mp3,ab=96}:duplicate{dst=std{access=livehttp{seglen=10,delsegs=true,numsegs=5,index=/var/www/streaming/mystream.m3u8,index-url=http://mydomain.com/streaming/mystream-########.mp3},mux=raw,dst=/var/www/streaming/mystream-########.mp3},select=audio}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; I found that these example don&#039;t work as written here; I won&#039;t edit them in place as they might work in different circumstances. I found two problems using the released version of VLC 2.0.0 on WinXP:&lt;br /&gt;
&lt;br /&gt;
1. All examples need to have the single quotes surrounding the --sout parameter removed. Otherwise VLC complains &amp;quot;stream_out_standard stream out error: no mux specified or found by extension&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
2. The final example is audio-only, but does not specify the splitanywhere=true flag. As a result it writes one massive chunk waiting for a keyframe that never comes.&lt;br /&gt;
&lt;br /&gt;
Example commandline that did work for me: &lt;br /&gt;
 % vlc -I dummy x:\some\audio\here.ogg vlc://quit --sout=#transcode{acodec=mp3,ab=96}:duplicate{dst=std{access=livehttp{seglen=10,splitanywhere=true,delsegs=true,numsegs=5,index=c:\temp\mystream.m3u8,index-url=http://mydomain.com/streaming/mystream-########.mp3},mux=raw,dst=c:\temp\mystream-########.mp3},select=audio}&lt;br /&gt;
&lt;br /&gt;
[[User:Smowton|Smowton]] 03:23, 27 February 2012 (CET)&lt;br /&gt;
&lt;br /&gt;
===Formats supported by the iOS===&lt;br /&gt;
See the [[iPhone]] article for a list of supported codecs as well as [http://developer.apple.com/iphone/library/documentation/networkinginternet/conceptual/streamingmediaguide/FrequentlyAskedQuestions/FrequentlyAskedQuestions.html Apple&#039;s HTTP Live Streaming FAQ].&lt;br /&gt;
&lt;br /&gt;
===Possible improvements/fixes===&lt;br /&gt;
&lt;br /&gt;
from the developer:&lt;br /&gt;
*Have the module auto-detect audio only streams, so the splitanywhere option is not required.&lt;br /&gt;
*I&#039;m not sure I am doing the right thing with the Win32 rename function.  Linux (I believe) allows me to rename a file over an existing file, even if the existing file is in use.  Win32 is not so friendly.  This ability is useful for updating the index file at same time it may be currently being read by the HTTP server serving the files.&lt;br /&gt;
*Break the dst= and index= parameter into seperate filename/directory entries, so you only need to specify the filename format once. (instead of once for the dst= parameter, and once for the index-url= parameter)&lt;br /&gt;
&lt;br /&gt;
from the community:&lt;br /&gt;
*Have the module detect the codecs used and warn the end user if they are not compatible with the iPhone/iPod Touch/iPad.&lt;br /&gt;
*Possible multibitrate implementation that meets the iPhone SDK specs so app developers can use VLC to host streams for their apps.&lt;br /&gt;
&lt;br /&gt;
fixes:&lt;br /&gt;
*Audio only streams do not validate with Apple&#039;s mediastreamvalidator. Audio streams are missing id3tags and timestamps. Check with command, &amp;quot;mediastreamvalidator validate --timeout=60 [url]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{{Documentation}}&lt;/div&gt;</summary>
		<author><name>Smowton</name></author>
	</entry>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=Documentation:Streaming_HowTo/Streaming_for_the_iPhone&amp;diff=22153</id>
		<title>Documentation:Streaming HowTo/Streaming for the iPhone</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=Documentation:Streaming_HowTo/Streaming_for_the_iPhone&amp;diff=22153"/>
		<updated>2012-02-27T02:23:28Z</updated>

		<summary type="html">&lt;p&gt;Smowton: Note possible error in documented command-line&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{RightMenu|documentation streaming howto toc}}&lt;br /&gt;
&lt;br /&gt;
Note: this functionality is intended to be part of the 1.2 release, so at the time of writing it is only available in nightly builds.&lt;br /&gt;
&lt;br /&gt;
== Streaming for the iPhone ==&lt;br /&gt;
&lt;br /&gt;
This functionality allows you to link VLC&#039;s transcoding capability with a segmenter which will in turn create the series of files needed for http live streaming to the iPhone. &lt;br /&gt;
&lt;br /&gt;
Unlike most of VLC&#039;s streaming, it doesn&#039;t actually stream the files, but assumes that you have your own webserver which will do that job.&lt;br /&gt;
&lt;br /&gt;
Notes from the developer:&lt;br /&gt;
*This has only been tested using H.264 w/MP3 or AAC audio using mux=ts, and raw MP3 using mux=raw&lt;br /&gt;
*I&#039;ve been mostly an FFMPEG guy till now, so forgive me if my VLC understanding/terminology is somewhat off. &lt;br /&gt;
*This plug-in should support both Live and non-live HTTP Live streaming feeds, depending on the options passed to the module.&lt;br /&gt;
&lt;br /&gt;
Notes from the community:&lt;br /&gt;
*The user running vlc needs to have read/write/delete permissions on the directory where the .m3u8 playlist and .ts file segments will be created and deleted on the webserver.&lt;br /&gt;
&lt;br /&gt;
=== Instructions ===&lt;br /&gt;
&lt;br /&gt;
The name of the module is livehttp, and is specified by specifying &amp;quot;access=livehttp&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Options ===&lt;br /&gt;
&lt;br /&gt;
splitanywhere= (default: false) &lt;br /&gt;
*Tells livehttp to split the stream anywhere, not just on video keyframes.  Currently required to be set to true for audio-only streams and not recommended (probably won&#039;t work) for video streams. &lt;br /&gt;
&lt;br /&gt;
seglen= (default: 10)  &lt;br /&gt;
*How many seconds of audio/video each segment should contain.  Apple recommends 10, I have been using 5. &lt;br /&gt;
&lt;br /&gt;
numsegs=(default: 0)&lt;br /&gt;
*The number of segments to keep in the index file.  The default of 0 keeps all segments in the index (which you would want for non-live streaming).  For live streaming the specification require at least 3. &lt;br /&gt;
&lt;br /&gt;
delsegs= (default: true)&lt;br /&gt;
*Delete segments as they are no longer needed.   If numsegs=0 this parameter is ignored (as all segments are assumed to be needed) &lt;br /&gt;
&lt;br /&gt;
dst=&lt;br /&gt;
*This is actually an option to the access std module.  The path of the segment files to write.  The # characters get replaced with the segment number.  So a path of &amp;quot;seg-###.ts&amp;quot; will end up with files called &amp;quot;seg-001.ts, seg-002.ts, seg-003.ts&amp;quot; etc. &lt;br /&gt;
&lt;br /&gt;
index=&lt;br /&gt;
*The path of the index file to write, which will contain the &amp;quot;playlist&amp;quot; of video/audio segments to stream.  Recommended to end in .m3u8 by specifications.  This is the file the &amp;lt;video&amp;gt; tag should be pointed to. &lt;br /&gt;
&lt;br /&gt;
index-url=&lt;br /&gt;
*This is the URL that corresponds to the dst above (how a browser would access the dst file).  The # characters get replaced same as in the dst parameter.  Note:  The filename portion of this URL will most likely need to be in the exact same format as the dst parameter.  So for example if dst=/www/seg-##.ts then the index-url should be something like index-url=http://mydomain.com/streams/seg-##.ts  (Note the same number of # characters)&lt;br /&gt;
&lt;br /&gt;
ratecontrol=(default: false)&lt;br /&gt;
*If set to false the there is no rate control (the muxer sends the data as fast/slow as it can to the streamer).  If set to true the muxer should do rate-control to control the speed to muxed audio/video is sent to the streamer.  Recommended setting is false in most cases.  The only time I&#039;ve needed this set to true is while doing a live sliding window stream of a local media file.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
All examples assume the following:&lt;br /&gt;
*The Web Server root directory is /var/www&lt;br /&gt;
*The domain name of the web server is mydomain.com&lt;br /&gt;
*The stream segments &amp;amp;amp; index files will be written into /var/www/streaming/ and will be accessed via http://mydomain.com/streaming/...&lt;br /&gt;
*The destination stream name index file will be called &amp;quot;mystream.m3u8&amp;quot;&lt;br /&gt;
*The following HTML will allow you to view the video based on the above on an iPhone:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Re-stream a live video feed:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -I dummy --mms-caching 0 http://www.nasa.gov/55644main_NASATV_Windows.asx vlc://quit --sout=&#039;#transcode{width=320,height=240,fps=25,vcodec=h264,vb=256,venc=x264{aud,profile=baseline,level=30,keyint=30,ref=1},acodec=mp3,ab=96}:std{access=livehttp{seglen=10,delsegs=true,numsegs=5,index=/var/www/streaming/mystream.m3u8,index-url=http://mydomain.com/streaming/mystream-########.ts},mux=ts{use-key-frames},dst=/var/www/streaming/mystream-########.ts}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Create a VOD stream:&lt;br /&gt;
(Non-live.  When this command finishes, all the segments should have been created and the index file contain pointers to all of them)&lt;br /&gt;
 % &#039;&#039;&#039;vlc -I dummy /var/myvideos/video.mpg vlc://quit --sout=&#039;#transcode{width=320,height=240,fps=25,vcodec=h264,vb=256,venc=x264{aud,profile=baseline,level=30,keyint=30,ref=1},acodec=mp3,ab=96}:std{access=livehttp{seglen=10,delsegs=false,numsegs=0,index=/var/www/streaming/mystream.m3u8,index-url=http://mydomain.com/streaming/mystream-########.ts},mux=ts{use-key-frames},dst=/var/www/streaming/mystream-########.ts}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Re-stream a live audio feed:&lt;br /&gt;
 % &#039;&#039;&#039;vlc -I dummy --mms-caching 0 http://www.nasa.gov/55644main_NASATV_Windows.asx vlc://quit --sout=&#039;#transcode{acodec=mp3,ab=96}:duplicate{dst=std{access=livehttp{seglen=10,delsegs=true,numsegs=5,index=/var/www/streaming/mystream.m3u8,index-url=http://mydomain.com/streaming/mystream-########.mp3},mux=raw,dst=/var/www/streaming/mystream-########.mp3},select=audio}&#039; &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; I found that these example don&#039;t work as written here, but need to have the single quotes surrounding the --sout parameter removed. Otherwise VLC complains &amp;quot;stream_out_standard stream out error: no mux specified or found by extension&amp;quot;. This was using the released version of VLC 2.0.0 on WinXP.&lt;br /&gt;
&lt;br /&gt;
Example commandline that did work for me: &lt;br /&gt;
 % vlc -I dummy x:\some\audio\here.ogg vlc://quit --sout=#transcode{acodec=mp3,ab=96}:duplicate{dst=std{access=livehttp{seglen=10,delsegs=true,numsegs=5,index=c:\temp\mystream.m3u8,index-url=http://mydomain.com/streaming/mystream-########.mp3},mux=raw,dst=c:\temp\mystream-########.mp3},select=audio}&lt;br /&gt;
&lt;br /&gt;
[[User:Smowton|Smowton]] 03:23, 27 February 2012 (CET)&lt;br /&gt;
&lt;br /&gt;
===Formats supported by the iOS===&lt;br /&gt;
See the [[iPhone]] article for a list of supported codecs as well as [http://developer.apple.com/iphone/library/documentation/networkinginternet/conceptual/streamingmediaguide/FrequentlyAskedQuestions/FrequentlyAskedQuestions.html Apple&#039;s HTTP Live Streaming FAQ].&lt;br /&gt;
&lt;br /&gt;
===Possible improvements/fixes===&lt;br /&gt;
&lt;br /&gt;
from the developer:&lt;br /&gt;
*Have the module auto-detect audio only streams, so the splitanywhere option is not required.&lt;br /&gt;
*I&#039;m not sure I am doing the right thing with the Win32 rename function.  Linux (I believe) allows me to rename a file over an existing file, even if the existing file is in use.  Win32 is not so friendly.  This ability is useful for updating the index file at same time it may be currently being read by the HTTP server serving the files.&lt;br /&gt;
*Break the dst= and index= parameter into seperate filename/directory entries, so you only need to specify the filename format once. (instead of once for the dst= parameter, and once for the index-url= parameter)&lt;br /&gt;
&lt;br /&gt;
from the community:&lt;br /&gt;
*Have the module detect the codecs used and warn the end user if they are not compatible with the iPhone/iPod Touch/iPad.&lt;br /&gt;
*Possible multibitrate implementation that meets the iPhone SDK specs so app developers can use VLC to host streams for their apps.&lt;br /&gt;
&lt;br /&gt;
fixes:&lt;br /&gt;
*Audio only streams do not validate with Apple&#039;s mediastreamvalidator. Audio streams are missing id3tags and timestamps. Check with command, &amp;quot;mediastreamvalidator validate --timeout=60 [url]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{{Documentation}}&lt;/div&gt;</summary>
		<author><name>Smowton</name></author>
	</entry>
</feed>