windows平臺下vlc編譯之四:精簡vlc

請移步https://higoge.github.io/,全部下載資料在那個博客都能找到。謝謝。 ios

--------------------------------------------------------------------git

    vlc太大,組件太多,咱們根據業務需求,能用的僅僅是幾個組件而已,其餘不用的咱們就該去掉。這裏Jeremiah根據本身的狀況精簡了vlc,vlc-0.9.4最後獲得的安裝文件3518KB,cab文件3520KB;vlc-0.8.6i的安裝文件3087KB,cab文件3264KB。相對於原來幾十兆來講,小了N多。
github

 

    1. 業務需求。macos

    Jeremiah所用的業務需求是:(1)播放本地avi文件。(2)播放ts封裝的rtp流。(3)播放rtsp流。ide

 

    2. vlc-0.9.4的精簡post

    腳本configure-vlc03.sh(見附件)以下:ui

PATH=/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 \ 
    --disable-gtk \
    --enable-avcodec \
    --enable-avformat \
    --enable-libmpeg2 \
    --enable-live555 --with-live555-tree=/usr/win32/live.com \
    --disable-nls \
    --disable-skins2 \
    --disable-qt4 \
    --disable-macosx-defaults \
    --disable-hal \
    --disable-dbus \
    --disable-dbus-control \
    --disable-telepathy \
    --disable-mmx \
    --disable-sse \
    --disable-altivec \
    --disable-coverage \
    --disable-release \
    --enable-sout \
    --disable-lua \
    --disable-httpd \
    --disable-libproxy \
    --disable-audioscrobbler \
    --disable-taglib \
    --disable-dvdnav \
    --disable-dshow \
    --disable-bda \
    --disable-smb \
    --disable-dvbpsi \
    --disable-v4l2 \
    --disable-libcdio \
    --disable-libcddb \
    --disable-vcdx \
    --disable-cdda \
    --disable-vcd \
    --disable-dvb \
    --disable-screen \
    --disable-ogg \
    --disable-mkv \
    --disable-mod \
    --disable-mpc \
    --disable-gme \
    --disable-mad \
    --disable-id3tag \
    --disable-swscale \
    --disable-imgresample \
    --disable-faad \
    --disable-real \
    --disable-realrtsp \
    --disable-libtar \
    --disable-a52 \
    --disable-dca \
    --disable-flac \
    --disable-vorbis \
    --disable-tremor \
    --disable-speex \
    --disable-tarkin \
    --disable-theora \
    --disable-dirac \
    --disable-schroedinger \
    --disable-png \
    --disable-zvbi \
    --disable-telx \
    --disable-cmml \
    --disable-kate \
    --disable-x11 \
    --disable-xvideo \
    --disable-glx \
    --disable-xinerama \
    --disable-opengl \
    --disable-sdl \
    --disable-sdl-p_w_picpath \
    --disable-freetype \
    --disable-fribidi \
    --disable-fontconfig \
    --disable-libxml2 \
    --disable-pulse \
    --disable-alsa \
    --disable-upnp \
    --disable-ncurses \
    --disable-visual \
    --disable-atmo \
    --disable-bonjour \
    --disable-libgcrypt \
    --disable-gnutls \
    --disable-remoteosd \
    --enable-shared=yes \
    --enable-x264 \
    --enable-vlc \
    --enable-activex \lua

    腳本請參考:url

./configure -hspa

以及:[url]http://www.jbkempf.com/blog/post/2007/12/14/Configure-step-in-VLC-building[/url]

 

    make經過只後,刪除locale文件夾,這個文件夾是用本地語言做界面的。刪除plugins中的200多dll,只保留:

libaccess_file_plugin.dll
libaout_directx_plugin.dll
libasf_plugin.dll
libaudio_format_plugin.dll
libavcodec_plugin.dll
libavformat_plugin.dll
libavi_plugin.dll
libconverter_fixed_plugin.dll
libconverter_float_plugin.dll

libhotkeys_plugin.dll 
liblive555_plugin.dll
libmpeg_audio_plugin.dll
libpacketizer_copy_plugin.dll
libpacketizer_h264_plugin.dll
libpacketizer_vc1_plugin.dll
libplaylist_plugin.dll
librc_plugin.dll
librtp_plugin.dll
libsubtitle_plugin.dll
libtrivial_channel_mixer_plugin.dll
libtrivial_mixer_plugin.dll
libts_plugin.dll
libugly_resampler_plugin.dll
libvout_directx_plugin.dll
libwaveout_plugin.dll

    再用.nsi腳本編譯,修改n個錯誤以後就生成了較小的安裝文件了。

 

    3. 精簡vlc-0.8.6i

腳本configure-vlc02.sh(見附件)以下:

    PKG_CONFIG_PATH=/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 \
         --with-freetype-config-path=/usr/win32/bin \
         --with-fribidi-config-path=/usr/win32/bin \
         --enable-ffmpeg --with-ffmpeg-mp3lame --with-ffmpeg-faac \
         --with-ffmpeg-zlib \
         --enable-live555 --with-live555-tree=/usr/win32/live.com \
         --disable-nls \
         --disable-cddax \
         --disable-vcdx \
         --disable-skins2 \
         --disable-wxwidgets \
         --disable-mozilla \
         --disable-httpd \
         --disable-dvdnav \
         --disable-libcdio \
         --disable-libcddb    \
         --disable-cdda    \
         --disable-sdl \
         --disable-sdl-p_w_picpath \
         --disable-vcd    \
         --disable-dvdread \
         --disable-smb \
         --disable-cmml \
         --disable-alsa \
         --disable-opengl \
         --disable-png \
         --disable-screen    \
         --disable-mkv    \
         --disable-mod    \
         --disable-mpc    \
         --disable-libtar    \
         --disable-speex    \
         --disable-visual    \
         --disable-daap    \
         --disable-bonjour    \
         --disable-gnutls    \
         --disable-vorbis \
         --disable-dts \
         --disable-real    \
         --disable-xml    \
         --disable-x264 \
         --enable-sout \
         --enable-activex \
         --enable-shared-libvlc \
         --enable-release

    make以後刪除http,locale,skins,osdmenu文件夾,plugins保留:

libaccess_file_plugin.dll
libaccess_udp_plugin.dll
libaout_directx_plugin.dll
libasf_plugin.dll
libaudio_format_plugin.dll
libavi_plugin.dll
libffmpeg_plugin.dll
libfloat32tos16_plugin.dll
libfloat32_mixer_plugin.dll
libipv4_plugin.dll
libmpeg_audio_plugin.dll
libmpgatofixed32_plugin.dll
librc_plugin.dll
libs16tofixed32_plugin.dll
libs16tofloat32swab_plugin.dll
libs16tofloat32_plugin.dll
libs8tofloat32_plugin.dll
libsubtitle_plugin.dll
libtrivial_channel_mixer_plugin.dll
libtrivial_mixer_plugin.dll
libts_plugin.dll
libu8tofixed32_plugin.dll
libu8tofloat32_plugin.dll
libugly_resampler_plugin.dll
libvobsub_plugin.dll
libvout_directx_plugin.dll
libwaveout_plugin.dll

    使用.nsi腳原本作安裝文件就ok了。

 

參考網址:

1. [url]http://rogerfd.cn/?p=160[/url]

2. [url]http://www.jbkempf.com/blog/post/2007/12/14/Configure-step-in-VLC-building[/url]

相關文章
相關標籤/搜索