精华内容
下载资源
问答
  • Mac OS上编译Mobile VLC for ios

    千次阅读 2013-08-22 13:27:25
    这篇文章是对这两天工作的一个总结,在MacOS上编译target版本Mobile VLC for ios成功,其实这本来是个很简单的事情,不过中间还是出现了不少问题,由于自己本身从来没有接触过MacoS,更没有做过ios上的开发,所以...

    这篇文章是对这两天工作的一个总结,在MacOS上编译target版本Mobile VLC for ios成功,其实这本来是个很简单的事情,不过中间还是出现了不少问题,由于自己本身从来没有接触过MacoS,更没有做过ios上的开发,所以还是折腾了几天,不过最后终归是折腾出来了,呵呵,只要功夫深,贴车磨成针,^_^,好了,不废话了。


    开发平台:

    MacOS X Lion 10.7.5, Xcode4.4 , SDK(IphoneOS.5.1)

    一:

    在开始编译工作之前需要保证自己有开发者权限和license,这一步很重要,我当时就是由于没有开发者权限导致编译出错,而这个错误没有接触过apple产品的童鞋很难解决。

    二:

    到该网站上http://www.videolan.org/vlc/download-ios.html下载 vlc for ios的三个源代码文件,并解压到某个工作目录,比如分别命名为MediaLibraryKit MobileVLC vlc

    三:
    替换vlc/extras/package/build_ios.sh位下面的脚本文件, 根据自己的平台做相应的修改,主要是修改两个地方
    1. SDK 的路径 ,5.0之前的SDK是/Developer/......., 我们下载的代码中的就是针对5.0以前的SDK,而我们现在使用的SDK大多说都是5.1以后的,5.1以后的SDK的路径是
    /Applications/Xcode.app/......,
    2. SDK的版本 将其中的5.1换成自己使用的SDK的版本号

    点击(此处)折叠或打开

    1. #!/bin/sh
    2. set -e

    3. echo "Building libvlc for the iOS"

    4. if [ "$1" = "Simulator" ]; then
    5.     PLATFORM="Simulator"
    6.     TARGET="i686-apple-darwin10"
    7.     ARCH="i386"
    8. else
    9.     PLATFORM="OS"
    10.     TARGET="arm-apple-darwin10"
    11.     ARCH="armv7"
    12.     OPTIM="-mno-thumb"
    13. fi

    14. THIS_SCRIPT_PATH=`pwd`/$0

    15. pushd `dirname $0`/../../..
    16. VLCROOT=`pwd` # Let's make sure VLCROOT is an absolute path
    17. popd
    18. DEVROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhone${PLATFORM}.platform/Developer"
    19. IOS_SDK_ROOT="${DEVROOT}/SDKs/iPhone${PLATFORM}5.1.sdk"

    20. BUILDDIR=${VLCROOT}/build-ios-${PLATFORM}

    21. PREFIX=${VLCROOT}/install-ios-${PLATFORM}

    22. IOS_GAS_PREPROCESSOR="${VLCROOT}/extras/package/ios/resources/gas-preprocessor.pl"

    23. export AR="${DEVROOT}/usr/bin/ar"
    24. export RANLIB="${DEVROOT}/usr/bin/ranlib"
    25. export CFLAGS="-isysroot ${IOS_SDK_ROOT} -arch ${ARCH} -miphoneos-version-min=5.0 ${OPTIM}"
    26. export OBJCFLAGS="${CFLAGS}"
    27. if [ "$PLATFORM" = "Simulator" ]; then
    28.     # Use the new ABI on simulator, else we can't build
    29.     export OBJCFLAGS="-fobjc-abi-version=2 -fobjc-legacy-dispatch ${OBJCFLAGS}"
    30. fi
    31. export CPPFLAGS="${CFLAGS}"
    32. export CXXFLAGS="${CFLAGS}"
    33. export CPP="${DEVROOT}/usr/bin/llvm-cpp-4.2"
    34. export CXXCPP="${DEVROOT}/usr/bin/llvm-cpp-4.2"

    35. export CC="${DEVROOT}/usr/bin/llvm-gcc-4.2"
    36. export OBJC="${DEVROOT}/usr/bin/llvm-gcc-4.2"
    37. export CXX="${DEVROOT}/usr/bin/llvm-g++-4.2"
    38. export LD="${DEVROOT}/usr/bin/ld"
    39. export STRIP="${DEVROOT}/usr/bin/strip"

    40. if [ "$PLATFORM" = "OS" ]; then
    41.   export LDFLAGS="-L${IOS_SDK_ROOT}/usr/lib -L${IOS_SDK_ROOT}/usr/lib/system -arch ${ARCH}"
    42. else
    43.   export LDFLAGS="-syslibroot=${IOS_SDK_ROOT}/ -arch ${ARCH}"
    44. fi

    45. export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:${VLCROOT}/extras/contrib/build/bin:${VLCROOT}/extras/package/ios/resources"

    46. echo "Boostraping contribs"
    47. pushd ${VLCROOT}/extras/contrib

    48. # contains gas-processor.pl
    49. export PATH=$PATH:${VLCROOT}/extras/package/ios/resources

    50. # The contrib will read the following
    51. export IOS_SDK_ROOT

    52. echo "Building contrib for iOS"
    53. ./bootstrap ${TARGET} ios
    54. make src

    55. echo "Building contrib for current host"
    56. ./bootstrap
    57. make

    58. popd

    59. if [ "$PLATFORM" = "OS" ]; then
    60.   export AS="${IOS_GAS_PREPROCESSOR} ${CC}"
    61.   export ASCPP="${IOS_GAS_PREPROCESSOR} ${CC}"
    62. else
    63.   export AS="${DEVROOT}/usr/bin/as"
    64.   export ASCPP="${DEVROOT}/usr/bin/as"
    65. fi


    66. echo "Bootstraping vlc"
    67. if ! [ -e ${VLCROOT}/configure ]; then
    68.     ${VLCROOT}/bootstrap
    69. fi

    70. if [ ".$PLATFORM" != ".Simulator" ]; then
    71.     # FIXME - Do we still need this?
    72.     export AVCODEC_CFLAGS="-I${PREFIX}include"
    73.     export AVCODEC_LIBS="-L${PREFIX}lib -lavcodec -lavutil -lz"
    74.     export AVFORMAT_CFLAGS="-I${PREFIX}include"
    75.     export AVFORMAT_LIBS="-L${PREFIX}lib -lavcodec -lz -lavutil -lavformat"
    76. fi

    77. mkdir -p ${BUILDDIR}
    78. pushd ${BUILDDIR}

    79. # Run configure only upon changes.
    80. if [ "${VLCROOT}/configure" -nt config.log -o 
    81.      "${THIS_SCRIPT_PATH}" -nt config.log ]; then
    82. CONTRIB_DIR=${VLCROOT}/extras/contrib/hosts/${TARGET}/ios 
    83. ${VLCROOT}/configure 
    84.     --prefix="$PREFIX" 
    85.     --host="${TARGET}" 
    86.     --enable-debug 
    87.     --disable-shared 
    88.     --enable-static 
    89.     --disable-macosx 
    90.     --disable-macosx-defaults 
    91.     --disable-macosx-vout 
    92.     --disable-macosx-dialog-provider 
    93.     --disable-macosx-qtcapture 
    94.     --disable-macosx-eyetv 
    95.     --disable-macosx-vlc-app 
    96.     --with-macosx-sdk=${IO_SDK_ROOT} 
    97.     --enable-audioqueue 
    98.     --enable-ios-vout 
    99.     --enable-avcodec 
    100.     --enable-avformat 
    101.     --enable-swscale 
    102.     --enable-faad 
    103.     --disable-mad 
    104.     --disable-a52 
    105.     --disable-fribidi 
    106.     --disable-macosx-audio 
    107.     --disable-qt4 --disable-skins2 
    108.     --disable-libgcrypt 
    109.     --disable-remoteosd 
    110.     --disable-vcd 
    111.     --disable-postproc 
    112.     --disable-vlc 
    113.     --disable-vlm 
    114.     --disable-httpd 
    115.     --disable-nls 
    116.     --disable-glx 
    117.     --disable-visual 
    118.     --disable-lua 
    119.     --disable-sse 
    120.     --disable-neon 
    121.     --disable-mmx # MMX and SSE support requires llvm which is broken on Simulator
    122. fi

    123. CORE_COUNT=`sysctl -n machdep.cpu.core_count`
    124. let MAKE_JOBS=$CORE_COUNT+1

    125. echo "Running make -j$MAKE_JOBS"

    126. make -j$MAKE_JOBS
    127. make install
    128. popd

    三:

    替换MobileVLC/buildMobileVLC.sh为下面的代码, 同样需要根据自己SDK的版本号加以修改。这个是编译执行的总脚本,这个脚本会调用刚才修改的vlc/extras/package/build_ios.sh,然后build_ios.sh会去调用vlc/extras/contrib/bootstrap脚本,这样最终实现整个工程的编译

    点击(此处)折叠或打开

    1. #!/bin/bash


    2. rm -rf ./MediaLibraryKit/External/MobileVLCKit
    3. rm -rf ./MobileVLC/External/MobileVLCKit
    4. rm -rf ./MobileVLC/External/MediaLibraryKit

    5. if [ "$1" = "Simulator" ]; then
    6.     pushd vlc
    7.         echo "--==-- Build for vlc (simulator version) --==--"
    8.         pushd extras/package/ios
    9.             ./build_for_iOS.sh Simulator
    10.         popd

    11.         echo "--==-- Build for vlc-MobileVLCKit (simulator version) --==--"
    12.         pushd projects/macosx/framework
    13.             xcodebuild -project MobileVLCKit.xcodeproj -target "Aggregate static plugins" -configuration "Release" -sdk iphonesimulator5.1 SDKROOT=iphonesimulator5.1 VALID_ARCHS=i386 ARCHS=i386 
    14.             xcodebuild -project MobileVLCKit.xcodeproj -target "MobileVLCKit" -configuration "Release" -sdk iphonesimulator5.1 SDKROOT=iphonesimulator5.1 VALID_ARCHS=i386 ARCHS=i386
    15.         popd
    16.     popd

    17.     echo "--==-- Build for MediaLibraryKit (simulator version) --==--"
    18.     pushd MediaLibraryKit
    19.         ln -s ../../vlc/projects/macosx/framework/build/Release-iphonesimulator External/MobileVLCKit
    20.         xcodebuild -project MobileMediaLibraryKit.xcodeproj -configuration "Release" -sdk iphonesimulator5.1 SDKROOT=iphonesimulator5.1 VALID_ARCHS=i386 ARCHS=i386
    21.     popd

    22.     echo "--==-- Build for MobileVLC (simulator version) --==--"
    23.     pushd MobileVLC
    24.         ln -s ../../vlc/projects/macosx/framework/build/Release-iphonesimulator External/MobileVLCKit
    25.         ln -s ../../MediaLibraryKit/build/Release-iphonesimulator External/MediaLibraryKit
    26.         xcodebuild -project MobileVLC.xcodeproj -configuration "Release" -sdk iphonesimulator5.1 SDKROOT=iphonesimulator5.1 VALID_ARCHS=i386 ARCHS=i386
    27.     popd
    28. else
    29.     pushd vlc
    30.         echo "--==-- Build for vlc (os version) --==--"
    31.         pushd extras/package/ios
    32.             ./build_for_iOS.sh
    33.         popd

    34.         echo "--==-- Build for vlc-MobileVLCKit (os version) --==--"
    35.         pushd projects/macosx/framework
    36.             xcodebuild -project MobileVLCKit.xcodeproj -target "Aggregate static plugins" -configuration "Release" -sdk iphoneos5.1 SDKROOT=iphoneos5.1 VALID_ARCHS=armv7 ARCHS=armv7
    37.             xcodebuild -project MobileVLCKit.xcodeproj -target "MobileVLCKit" -configuration "Release" -sdk iphoneos5.1 SDKROOT=iphoneos5.1 VALID_ARCHS=armv7 ARCHS=armv7 
    38.         popd
    39.     popd

    40.     echo "--==-- Build for MediaLibraryKit (os version) --==--"
    41.     pushd MediaLibraryKit
    42.         ln -s ../../vlc/projects/macosx/framework/build/Release-iphoneos External/MobileVLCKit
    43.         xcodebuild -project MobileMediaLibraryKit.xcodeproj -configuration "Release" -sdk iphoneos5.1 SDKROOT=iphoneos5.1 VALID_ARCHS=armv7 ARCHS=armv7 
    44.     popd

    45.     echo "--==-- Build for MobileVLC (os version) --==--"
    46.     pushd MobileVLC
    47.         ln -s ../../vlc/projects/macosx/framework/build/Release-iphoneos External/MobileVLCKit
    48.         ln -s ../../MediaLibraryKit/build/Release-iphoneos External/MediaLibraryKit
    49.         xcodebuild -project MobileVLC.xcodeproj -configuration "Release" -sdk iphoneos5.1 SDKROOT=iphoneos5.1 VALID_ARCHS=armv7 ARCHS=armv7 
    50.     popd

    51. fi

    四:
    刚才说了build_ios.sh会去调用  vlc/extras/contrib里的bootstrap,所以bootstrap的内容要修改如下,其中mac版本需要根据自己系统mac版本加以修改,如为10.8的请把其中10.7的文本都替换为10.8

    点击(此处)折叠或打开

    1. #!/bin/sh 
    2. *************************************************************************** 
    3. # bootstrap : Set up config.mak 
    4. *************************************************************************** 
    5. # Copyright (C) 2003-2009 the VideoLAN team 
    6. # $Id$ 

    7. # Authors: Christophe Massiot <massiot@via.ecp.fr> 
    8. # Derk-Jan Hartman <hartman at videolan dot org> 
    9. # Felix Paul Kühne <fkuehne at videolan dot org> 

    10. # This program is free software; you can redistribute it and/or modify 
    11. # it under the terms of the GNU General Public License as published by 
    12. # the Free Software Foundation; either version 2 of the License, or 
    13. (at your option) any later version. 

    14. # This program is distributed in the hope that it will be useful, 
    15. # but WITHOUT ANY WARRANTY; without even the implied warranty of 
    16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
    17. # GNU General Public License for more details. 

    18. # You should have received a copy of the GNU General Public License 
    19. # along with this program; if not, write to the Free Software 
    20. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 
    21. *************************************************************************** 
    22.   
    23. if test "$#" -gt "2" -o "$1" = "-h" -o "$1" = "--help" ; then 
    24.     echo "Usage: $0 [host [distro]]" >&
    25.     echo " Prepare config.mak file." >&
    26.     exit 1 
    27. fi 
    28.   
    29. LANG=
    30. export LANG 
    31. set -e 
    32. set +
    33.   
    34. BUILD=`gcc -dumpmachine` 
    35. if test "$#" -ge "1"; then 
    36.     HOST="$1" 
    37. else 
    38.     HOST="$BUILD" 
    39. fi 
    40.   
    41. DISTRO= 
    42. if test "$#" = "2"; then 
    43.     echo "Forcing distro.mak to use $2.mak" 
    44.     DISTRO="$2" 
    45.     HOST="$1" 
    46. fi 
    47.   
    48. rm -f config.mak 
    49. { 
    50.     echo "# Automatically generated by bootstrap." 
    51.     echo "# Make changes if you know what you're doing." 
    52. } > config.mak 
    53.   
    54. rm -f distro.mak 
    55. { 
    56.     echo "# Automatically generated by bootstrap" 
    57.     echo "# Make changes if you know what you're doing." 
    58. } > distro.mak 
    59.   
    60. if test "$HOST" != "$BUILD"; then 
    61.     if test -z "$CC"; then 
    62.         CC="${HOST}-gcc" 
    63.     fi 
    64.     if test -z "$CXX"; then 
    65.         CXX="${HOST}-g++" 
    66.     fi 
    67.     if test -z "$LD"; then 
    68.         LD="${HOST}-ld" 
    69.     fi 
    70.     if test -z "$RANLIB"; then 
    71.         RANLIB="${HOST}-ranlib" 
    72.     fi 
    73.     if test -z "$AR"; then 
    74.         AR="${HOST}-ar" 
    75.     fi 
    76.     if test -z "$STRIP"; then 
    77.         STRIP="${HOST}-strip" 
    78.     fi 
    79. fi 
    80.   
    81. case $HOST in 
    82.     *powerpc*|*ppc*) 
    83.          ARCH="ppc" 
    84.      ;; 
    85.     *86_64*) 
    86.           ARCH="x86_64" 
    87.      ;; 
    88.     *86*) 
    89.           ARCH="i386" 
    90.      ;; 
    91.     arm*eabi) 
    92.           ARCH="armel" 
    93.      ;; 
    94.     arm*) 
    95.           ARCH="arm" 
    96.      ;; 
    97. esac 
    98. echo "ARCH = $ARCH" >> config.mak 
    99.   
    100. # Check the HAVE_{OS} 
    101. case $HOST in 
    102.     *darwin*) 
    103.         echo "HAVE_DARWIN_OS = 1" >> config.mak 
    104.         echo "HAVE_BSD = 1" >> config.mak 
    105.     ;; 
    106.     *linux*) 
    107.         echo "HAVE_LINUX = 1" >> config.mak 
    108.     ;; 
    109.     *bsd*) 
    110.         echo "HAVE_BSD = 1" >> config.mak 
    111.     ;; 
    112.     *wince*) 
    113.         echo "HAVE_WINCE = 1" >> config.mak 
    114.     ;; 
    115. esac 
    116.   
    117. case $DISTRO$HOST in 
    118.     ppc-darwin) 
    119.         # Mac OS X < 10.
    120.         echo "Your version of Mac OS X is too old!" >&
    121.         echo "Compiling VLC requires 10.5.x or later" >&
    122.         exit 1 
    123.     ;; 
    124.     *-apple-darwin8) 
    125.         echo "Your version of Mac OS X is too old!" >&
    126.         echo "Compiling and running VLC requires 10.5.x or later" >&
    127.         exit 1 
    128.     ;; 
    129.     powerpc-apple-darwin9) 
    130.         SDK_TARGET=10.
    131.         echo "SDK_TARGET = ${SDK_TARGET}" >> config.mak 
    132.         echo "ENVP = MACOSX_DEPLOYMENT_TARGET=${SDK_TARGET}" >> config.mak 
    133.         echo "MACOSX_SDK = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" >> config.mak 
    134.         echo "HAVE_DARWIN_9 = 1" >> config.mak 
    135.         HAVE_DARWIN_9=
    136.         HAVE_DARWIN_32=
    137.         CFLAGS_TUNING=" -arch ppc -mtune=G4" 
    138.         EXTRA_CFLAGS=" -D${ENVP} -isysroot ${MACOSX_SDK} -mmacosx-version-min=${SDK_TARGET}" 
    139.         EXTRA_LDFLAGS=" -arch ppc -isysroot ${MACOSX_SDK} -mmacosx-version-min=${SDK_TARGET} -Wl,-syslibroot,${MACOSX_SDK}" 
    140.         CC="/Applications/Xcode.app/Contents/Developer/usr/bin/gcc-4.2" 
    141.         CXX="/Applications/Xcode.app/Contents/Developer/usr/bin/g++-4.2" 
    142.         LD="ld -arch ppc -syslibroot ${MACOSX_SDK} -mmacosx-version-min=${SDK_TARGET}" 
    143.         echo "PATH = /bin:/usr/bin:/usr/local/bin:" >> config.mak 
    144.         DISTRO=darwin 
    145.         if test -e /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs; then 
    146.             echo "SDKs found. Everything is fine." >&
    147.         else 
    148.             echo "ERROR:nYour Developer Tools' SDKs were not found.nYou need to add extra symbolic links to /Developer to achieve correctlynbuilt contribs.nHave a look at the OSX-Compile-HOWTO for details." >&
    149.             exit 1 
    150.         fi 
    151.     ;; 
    152.     i686-apple-darwin*) 
    153.         echo "Building for $DISTRO" 
    154.         SDK_TARGET=10.
    155.         MIN_LD_VERSION_WITH_TEXT_RELOCATION=81 
    156.         echo "SDK_TARGET = ${SDK_TARGET}" >> config.mak 
    157.         echo "HAVE_DARWIN_OS_ON_INTEL = 1" >> config.mak 
    158.         echo "HAVE_DARWIN_9 = 1" >> config.mak 
    159.         HAVE_DARWIN_9=
    160.         if test `ld -v 2> /dev/stdout | sed -E 's/.*ld64-([0-9]+).*/1/'` -lt ${MIN_LD_VERSION_WITH_TEXT_RELOCATION}; then 
    161.             echo "ERROR: Your ld version is unable to compile VLC.nUpdate to Xcode 3.1 or higher." >&
    162.             exit 1 
    163.         fi 
    164.         echo "ENVP = MACOSX_DEPLOYMENT_TARGET=${SDK_TARGET}" >> config.mak 
    165.         echo "MACOSX_SDK = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" >> config.mak 
    166.         HAVE_DARWIN_32=
    167.         CFLAGS_TUNING=" -march=prescott -mtune=generic -arch i386 -m32" 
    168.         EXTRA_CFLAGS=" -D${ENVP} -isysroot ${MACOSX_SDK} -mmacosx-version-min=${SDK_TARGET}" 
    169.         EXTRA_LDFLAGS=" -arch i386 -isysroot ${MACOSX_SDK} -Wl,-syslibroot,${MACOSX_SDK} -mmacosx-version-min=${SDK_TARGET}" 
    170.         CC="/Applications/Xcode.app/Contents/Developer/usr/bin/gcc-4.2" 
    171.         CXX="/Applications/Xcode.app/Contents/Developer/usr/bin/g++-4.2" 
    172.         echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak 
    173.         DISTRO=darwin 
    174.         if test -e /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs; then 
    175.             echo "SDKs found. Everything is fine." >&
    176.         else 
    177.             echo "ERROR:nYour Developer Tools' SDKs were not found.nYou need to add extra symbolic links to /Developer to achieve correctlynbuilt contribs.nHave a look at the OSX-Compile-HOWTO for details." >&
    178.             exit 1 
    179.         fi 
    180.         if test $HOST = "i686-apple-darwin10"; then 
    181.             echo "HAVE_DARWIN_10 = 1" >> config.mak 
    182.         fi 
    183.     ;; 
    184.     x86_64-apple-darwin*) 
    185.         SDK_TARGET=10.
    186.         echo "SDK_TARGET = ${SDK_TARGET}" >> config.mak 
    187.         echo "HAVE_DARWIN_OS_ON_INTEL = 1" >> config.mak 
    188.         echo "HAVE_DARWIN_9 = 1" >> config.mak 
    189.         echo "ENVP = MACOSX_DEPLOYMENT_TARGET=${SDK_TARGET}" >> config.mak 
    190.         echo "MACOSX_SDK = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX${SDK_TARGET}.sdk" >> config.mak 
    191.         HAVE_DARWIN_64=
    192.         CFLAGS_TUNING=" -march=core2 -mtune=core2 -m64 -arch x86_64" 
    193.         echo "HAVE_DARWIN_64 = 1" >> config.mak 
    194.         EXTRA_CFLAGS=" -D${ENVP} -isysroot ${MACOSX_SDK} -mmacosx-version-min=${SDK_TARGET}" 
    195.         EXTRA_LDFLAGS=" -arch x86_64 -isysroot ${MACOSX_SDK} -Wl,-syslibroot,${MACOSX_SDK} -mmacosx-version-min=${SDK_TARGET}" 
    196.         echo "PATH = /bin:/usr/bin:/usr/local/bin" >> config.mak 
    197.         CC="/Applications/Xcode.app/Contents/Developer/usr/bin/gcc-4.2" 
    198.         CXX="/Applications/Xcode.app/Contents/Developer/usr/bin/g++-4.2" 
    199.         LD="ld" 
    200.         RANLIB="ranlib" 
    201.         AR="ar" 
    202.         STRIP="strip" 
    203.         DISTRO=darwin64 
    204.         if test -e /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs; then 
    205.             echo "SDKs found. Everything is fine." >&
    206.         else 
    207.             echo "ERROR:nYour Developer Tools' SDKs were not found.nYou need to add extra symbolic links to /Developer to achieve correctlynbuilt contribs.nHave a look at the OSX-Compile-HOWTO for details." >&
    208.             exit 1 
    209.         fi 
    210.         if test $HOST = "x86_64-apple-darwin10"; then 
    211.             echo "HAVE_DARWIN_10 = 1" >> config.mak 
    212.         fi 
    213.     ;; 
    214.     *mingw32ce) 
    215.         echo "HAVE_WINCE = 1" >> config.mak 
    216.         echo "PKG_CONFIG_PATH = $(PREFIX)/lib/pkgconfig" >> config.mak 
    217.         EXTRA_CPPFLAGS=" -D_WIN32_WCE=0x0500" 
    218.         DISTRO=wince 
    219.     ;; 
    220.     *64-*mingw*) 
    221.         echo "HAVE_WIN64 = 1" >> config.mak 
    222.         echo "HAVE_WIN32 = 1" >> config.mak 
    223.         echo "PKG_CONFIG_PATH = $(PREFIX)/lib/pkgconfig" >> config.mak 
    224.            EXTRA_CFLAGS="-O3" 
    225.         DISTRO=win64 
    226.     ;; 
    227.     *mingw32*) 
    228.         echo "HAVE_WIN32 = 1" >> config.mak 
    229.         echo "PKG_CONFIG_PATH = $(PREFIX)/lib/pkgconfig" >> config.mak 
    230.         EXTRA_CFLAGS=" -O3 -march=i686 -mtune=generic" 
    231.         DISTRO=win32 
    232.     ;; 
    233.     i686-pc-cygwin) 
    234.         echo "HAVE_WIN32 = 1" >> config.mak 
    235.         echo "HAVE_CYGWIN = 1" >> config.mak 
    236.         CC="gcc -mno-cygwin -isystem /usr/include/mingw" 
    237.         CXX="g++ -mno-cygwin -isystem /usr/include/mingw" 
    238.         HOST=`$CC -dumpmachine` 
    239.         EXTRA_CFLAGS=" -mno-cygwin -isystem /usr/include/mingw" 
    240.         EXTRA_CPPFLAGS=" -mno-cygwin -isystem /usr/include/mingw" 
    241.         EXTRA_LDFLAGS=" -mno-cygwin" 
    242.         echo "PKG_CONFIG_PATH = $(PREFIX)/lib/pkgconfig" >> config.mak 
    243.         DISTRO=win32 
    244.     ;; 
    245.     arm-wince-pe) 
    246.         echo "PKG_CONFIG_PATH = $(PREFIX)/lib/pkgconfig" >> config.mak 
    247.         EXTRA_CPPFLAGS=" -D_WIN32_WCE" 
    248.         DISTRO=wince 
    249.     ;; 
    250.     armeb-linux-uclibc) 
    251.         echo "HAVE_UCLIBC = 1" >> config.mak 
    252.         echo "HAVE_BIGENDIAN = 1" >> config.mak 
    253.         EXTRA_CFLAGS="-Os -march=armv5 -msoft-float" 
    254.     ;; 
    255.     arm-none-linux-gnueabi) 
    256.         if test -f /etc/maemo_version; then 
    257.             DISTRO=maemo 
    258.             echo 'HAVE_MAEMO = 1' >> config.mak 
    259.             EXTRA_CFLAGS=" -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a" 
    260.             EXTRA_CFLAGS="$EXTRA_CFLAGS -mfpu=neon -mfloat-abi=softfp" 
    261.             EXTRA_CFLAGS="$EXTRA_CFLAGS -O3 -fno-tree-vectorize" 
    262.         else 
    263.             EXTRA_CFLAGS="-msoft-float" 
    264.         fi 
    265.     ;; 
    266.     *86_64*linux*) 
    267.         EXTRA_CFLAGS=" -fPIC" 
    268.         EXTRA_CPPFLAGS=" -fPIC" 
    269.         EXTRA_LDFLAGS=" -L/usr/lib64" 
    270.         echo "LIBRARY_PATH = /usr/lib64" >> config.mak 
    271.         echo "PKG_CONFIG_PATH = /usr/lib64/pkgconfig" >> config.mak 
    272.         echo "PKG_CONFIG_LIBDIR = /usr/lib64/pkgconfig" >> config.mak 
    273.     ;; 
    274.     *arm-apple-darwin*) 
    275.         EXTRA_CFLAGS=" -arch armv7" 
    276.         EXTRA_LDFLAGS=" -arch armv7" 
    277.         DISTRO="ios" 
    278.     ;; 
    279. esac 
    280. case "$DISTRO" in 
    281.   ios) 
    282.    echo 'HAVE_IOS = 1' >> config.mak 
    283.    if test -z "$IOS_SDK_ROOT"; then 
    284.      echo "ERROR:nThe bootstrap script requires the IOS_SDK_ROOT environment variable to be set when building for iOS !" 
    285.      exit 1 
    286.    fi 
    287.    EXTRA_CFLAGS+=" $CFLAGS" 
    288.    EXTRA_LDFLAGS+=" $LDFLAGS" 
    289.    EXTRA_CPPFLAGS+=" $CPPFLAGS" 
    290.    EXTRA_CXXFLAGS+=" $CXXFLAGS" 
    291.    echo "IOS_SDK_ROOT = ${IOS_SDK_ROOT}" >> config.mak 
    292.   ;; 
    293. esac 
    294.   
    295. if test -z "${DISTRO}" -a "$HOST" = "$BUILD"; then 
    296.     if test -d "/usr/lib/pkgconfig"; then 
    297.         if test -z "$PKG_CONFIG_PATH"; then 
    298.             echo "PKG_CONFIG_PATH = /usr/lib/pkgconfig" >> config.mak 
    299.         fi 
    300.         if test -z "$PKG_CONFIG_LIBDIR"; then 
    301.             echo "PKG_CONFIG_LIBDIR = /usr/lib/pkgconfig" >> config.mak 
    302.         fi 
    303.     fi 
    304.     # Try to match distribution 
    305.     if test -f /etc/fedora-release; then 
    306.         DISTRO=fedora 
    307.     elif test -f /etc/maemo_version; then 
    308.         DISTRO=maemo 
    309.         echo 'HAVE_MAEMO = 1' >> config.mak 
    310.     elif test -f /etc/debian_version; then 
    311.         # NOTE: check for Debian *after* its derivatives 
    312.         DISTRO=debian 
    313.     fi 
    314. fi 
    315.   
    316. # Default Unix-like systems 
    317. test -z "${DISTRO}" && DISTRO=unix 
    318.   
    319. echo "BUILD = $BUILD" >> config.mak 
    320. echo "HOST = $HOST" >> config.mak 
    321.   
    322. echo "PREFIX = `pwd`/hosts/$HOST/$DISTRO" >> config.mak 
    323.   
    324. mkdir -p hosts/$HOST 
    325. ln -sfn $DISTRO hosts/$HOST/default_distro 
    326.   
    327. if [ "$HOST" = "$BUILD" ]; then 
    328.    ln -sfn hosts/$HOST/$DISTRO build 
    329. fi 
    330.   
    331. echo "CC = ${CC}" >> config.mak 
    332. echo "CXX = ${CXX}" >> config.mak 
    333. echo "LD = ${LD}" >> config.mak 
    334. echo "RANLIB = ${RANLIB}" >> config.mak 
    335. echo "AR = ${AR}" >> config.mak 
    336. echo "STRIP = ${STRIP}" >> config.mak 
    337. echo "EXTRA_CFLAGS = ${CFLAGS_TUNING} ${EXTRA_CFLAGS}" >> config.mak 
    338. echo "EXTRA_CPPFLAGS = ${EXTRA_CPPFLAGS} -isystem $(PREFIX)/include" >> config.mak 
    339. echo "EXTRA_LDFLAGS = ${EXTRA_LDFLAGS}" >> config.mak 
    340. echo "EXTRA_PATH = ${EXTRA_PATH}" >> config.mak 
    341. echo "DISTRO = ${DISTRO}" >> config.mak 
    342.   
    343. #CMAKE 
    344. if test "$HOST" != "$BUILD"; then 
    345. if test ${DISTRO} = "win32"; then 
    346. echo "SET(CMAKE_SYSTEM_NAME Windows)" >> toolchain.cmake 
    347. fi 
    348. echo "SET(CMAKE_C_COMPILER ${CC})" >> toolchain.cmake 
    349. echo "SET(CMAKE_CXX_COMPILER ${CXX})" >> toolchain.cmake 
    350. echo "SET(CMAKE_FIND_ROOT_PATH `pwd` )" >> toolchain.cmake 
    351. echo "set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> toolchain.cmake 
    352. echo "set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> toolchain.cmake 
    353. echo "set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> toolchain.cmake 
    354. fi 
    355.   
    356. if wget --version >/dev/null 2>&1; then 
    357.     echo "WGET = "`which wget`" -c --passive" >> config.mak 
    358. elif test -z `curl --version >/dev/null 2>&1`; then 
    359.     echo "WGET = "`which curl`" -L -O" >> config.mak 
    360. else 
    361.     echo "You need at least wget or curl to fetch the packages." >&
    362.     exit 1 
    363. fi 
    364.   
    365. if svn --version >/dev/null 2>&1; then 
    366.     echo "SVN = "`which svn`"" >> config.mak 
    367. else 
    368.     echo "You do not have a subversion client in your PATH." >&
    369. fi 
    370.   
    371. if git --version>/dev/null 2>&1; then 
    372.     echo "GIT = "`which git`"" >> config.mak 
    373. else 
    374.     echo "You do not have a Git client in your PATH." >&
    375. fi 
    376.   
    377. if test -z "$CONTRIBS_RELEASE"; then 
    378.     echo "EXTRA_CFLAGS += -DNDEBUG" >> config.mak 
    379.     set +
    380.     echo 
    381.     echo "*****************************************************************" 
    382.     echo "* If you need contribs with all debug information, run this *" 
    383.     echo "* line and compile the libraries on your own. *" 
    384.     echo "* CONTRIBS_RELEASE=no ./bootstrap *" 
    385.     echo "*****************************************************************" 
    386. fi 
    387.   
    388. if test $HAVE_DARWIN_9; then 
    389.     set +
    390.     echo 
    391.     echo "*****************************************************************" 
    392.     echo "* We are using GCC-4.2 on OS X, so compilation WILL FAIL if it *" 
    393.     echo "* is NOT installed. *" 
    394.     echo "*****************************************************************" 
    395. fi 
    396.   
    397. if test $HAVE_DARWIN_32; then 
    398.     set +
    399.     echo 
    400.     echo "*****************************************************************" 
    401.     echo "* VLC will be compiled in 32bit mode. *" 
    402.     echo "* *" 
    403.     echo "* Re-run with the x86_64-apple-darwin* argument to turn on *" 
    404.     echo "* 64bit compilation for Intel-based Macs, whereas * is either *" 
    405.     echo "* 9 or 10 depending on your Darwin version. *" 
    406.     echo "* There is NO PPC64 support right now. *" 
    407.     echo "*****************************************************************" 
    408. fi 
    409.   
    410. if test $HAVE_DARWIN_64; then 
    411.     set +
    412.     echo 
    413.     echo "*****************************************************************" 
    414.     echo "* VLC will be compiled in 64bit mode using the 10.5 SDK. *" 
    415.     echo "*****************************************************************" 
    416.     set -x 
    417. fi 
    418.   
    419. case `uname` in 
    420.     Linux) 
    421.         CPUS=`grep -c ^processor /proc/cpuinfo` 
    422.      ;; 
    423.     *) 
    424.         CPUS=1 # default 
    425.      ;; 
    426. esac 
    427. echo "MAKEJOBS = -j$CPUS" >> config.mak 
    428.   
    429. echo 
    430. echo "Using $CPUS processors"
    五:

    修改vlc/extras/contrib/src目录下的Makefile, 禁用汇编,否则会编译出错。 搜寻关键字“FFMPEGCONF”,使其加入"--disable-asm"参数。如果用vim编辑Makefile文件,在底行模式下输入“:/FFMPEGCON”,这样会搜索到FFMPEGCONF,然后修改为FFMPEGCONF=--disable-asm

    六:
    至于网上有的文章说的下面的一步,我发现下面的i386目录和其中的limits.h和_limits.h两个文件时存在的,所以不需要创建,如果你发现你的没有这个目录,那么请做下一步

    为了编译libdvbpsi库,稍稍修改iOS SDK的源文件。这是因为编译时会报错说找不到"i386/limits.h",所以需要把这个文件拷贝到他的搜寻目录中去。具体原因见后面的纠错Troubleshotting章节。

     - a) 找到目录:/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/include

     - b) 在其中新建目录:i386

     - c) 全局搜索某个i386目录下的limits.h和_limits.h文件,并将搜索到的这两个文件拷贝入刚才创建的目录中

    七:
    Ok,到现在为止,准备工作已经就绪,可以开始编译工作了,到工作目录下,也就是刚开始解压三个源文件所在的目录执行
    总的编译脚本文件 ./MobileVLC/buildMobileVLC.sh,这个过程一般会出现错误,一般是下载文件出现错误,因为这个脚本会首先去下载ffmpeg的库,和faad2的音频库,还有live555库(用来支持RTSP协议栈的),还有contrib-macosx-i386-34.tar.bz2,这个文件下载几乎必然出错,可以到网上手动下载这个包放到相应目录加以替换。一切顺利的话,最后会都出现BUILD SUCCESSFUL

    八: 编译过程中遇到的问题总结

    1. ffmpeg打 patch的时候出错,这个错误无关紧要,可以忽略,再次执行脚本的时候会继续执行,跳过这个错误
    2. 下载其他包的时候出错
     "/usr/bin/curl" -L -O http://live555.com/liveMedia/public/live555-latest.tar.gz
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  565k  100  565k    0     0   9522      0  0:01:00  0:01:00 --:--:-- 39832
    要检查一下下载是不是像上面一样是100%,因为这个源码给出的下载地址是很久以前的了,很多会出错,一定要检查每一个包都下载完全,后面出现的错误大多数都与这个有关,比如我之前编译一直出现下面这样一个错误
    sr/kevin/VLC_IOS/vlc/projects/macosx/framework/build/Release-iphoneos/libMobileVLCKit.a
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC 
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /usr/kevin/VLC_IOS/vlc/projects/macosx/framework/../../../extras/contrib/hosts/arm-apple-darwin10/ios/lib/libBasicUsageEnvironment.a (No such file or directory)
    我找了很久最后发现就是因为前面的一些包没有下载完全,或者下载的仅仅是个html文件,这点一定要去相关的目录下用file命令确认。这样类似的错误就是因为前面的包没有完全下载而导致libMobileVLCKit.a静态库生成不了,才会出现。最后再强调一下,一定要保证所有的
    包都下载完全,可以到log里详细的查看,编译的log可以重定向到一个文件来保存,以方便查看。
    比如:./buildMobileVLC.sh > log.txt

    3.编译之前一定要确定自己的网络不受限制,我之前折腾了很久就是因为公司的网络限制了很多网页不能访问,就因为这个我调试了一两天,实在是太郁闷了,最后拿了个3G上网卡才解决的。如果你在公司里面编译,那么请确认你的网络是不是受限,也可以将需要下载的包在别的网络下载下来放到相应的目录下。

    4.一定要有开法者权限和apple的授权
    Code Sign error: The identity 'iPhone Developer' doesn't match any valid, non-expired certificate/private key pair in your keychains

    这个错误就是没有apple的授权和证书,由于之前没有接触过apple的开发,所以这个错误让我一头雾水。这个需要购买apple的license或者破解,此刻又让我对Linux即开源软件多了一分敬意,还有video lan组织,向你们致以崇高的敬意。

    展开全文
  • Practical VLC (Visible Light Communication) systems are expected to leverage the lighting infrastructure in order to deliver data to devices in a lighting field. These devices can be static or ...
  • VLC includes a web interface, which you can enable to access your VLC player from a web browser, controlling playback from another device – particularly useful for a media center PC. VLC also offers ...
    image

    VLC includes a web interface, which you can enable to access your VLC player from a web browser, controlling playback from another device – particularly useful for a media center PC. VLC also offers a mobile web interface for smartphones.

    VLC包括一个Web界面,您可以通过该界面从Web浏览器访问VLC播放器,控制另一台设备的播放,这对于Media Center PC尤其有用。 VLC还为智能手机提供了一个移动Web界面。

    The web interface is turned off and locked down by default – you have to edit the web server’s .hosts file or VLC will disallow all incoming connections from other devices.

    默认情况下,Web界面处于关闭和锁定状态–您必须编辑Web服务器的.hosts文件,否则VLC将禁止来自其他设备的所有传入连接。

    激活Web界面 (Activating the Web Interface)

    To activate the web interface, click the Tools menu in VLC and select Preferences.

    要激活Web界面,请在VLC中单击“工具”菜单,然后选择“首选项”。

    image

    Click the All option under Show settings to view VLC’s advanced settings. Scroll down in the list of advanced settings and select Main interfaces under the Interface header.

    单击显示设置下的全部选项,以查看VLC的高级设置。 在高级设置列表中向下滚动,然后在“接口”标题下选择“ 主要接口 ”。

    image

    Click the Web check box to enable the HTTP interface.

    单击Web复选框以启用HTTP界面。

    image

    Save your settings and restart VLC. Each time you start VLC, the web server will be started in the background – Windows will prompt you to allow VLC firewall access when you restart it, indicating that the web server is running.

    保存设置并重新启动VLC。 每次启动VLC时,Web服务器都会在后台启动– Windows将在重新启动时提示您允许VLC防火墙访问,表明Web服务器正在运行。

    image

    Click the following link or plug its address into your browser to access the VLC web interface on your local computer: http://localhost:8080/

    单击以下链接或将其地址插入浏览器以访问本地计算机上的VLC Web界面: http:// localhost:8080 /

    If you’re using VLC 2.0.1, certain elements of the web interface – the seek bar in particular — may not work properly. This is a bug in version 2.0.1  that isn’t present in 2.0.0 and has been fixed for version 2.0.2. VLC 2.0.0 includes a new web interface that replaces the old one – hopefully it will see more polish in future versions.

    如果您使用的是VLC 2.0.1,则Web界面的某些元素(尤其是搜索栏)可能无法正常工作。 这是2.0.1版中的错误,该错误在2.0.0版中不存在,并且已在2.0.2版中修复。 VLC 2.0.0包含一个新的Web界面,该界面将替代旧的Web界面-希望它将在将来的版本中得到更多完善。

    image

    允许远程访问 (Allowing Remote Access)

    By default, the web interface is completely locked down – it’s restricted to localhost, which means you can only access it from the machine VLC is running on. You’ll see a 403 Forbidden error page if you try to access VLC’s HTTP server from any other device.

    默认情况下,Web界面是完全锁定的–仅限于localhost,这意味着您只能从运行VLC的计算机上访问它。 如果尝试从任何其他设备访问VLC的HTTP服务器,则会看到403禁止错误页面。

    image

    To allow access from other computers, you’ll have to edit the web interface’s .hosts file. You’ll find this file in different directories on different operating systems:

    要允许其他计算机进行访问,您必须编辑Web界面的.hosts文件。 您将在不同操作系统上的不同目录中找到此文件:

    • Windows – C:\Program Files (x86)\VideoLAN\VLC\lua\http (use “Program Files” instead of “Program Files (x86)” on 32-bit versions of Windows.)

      Windows – C:\ Program Files(x86)\ VideoLAN \ VLC \ lua \ http(在Windows 32位版本上使用“ Program Files”而不是“ Program Files(x86)”。)

    • Mac OS X – /Applications/VLC.app/Contents/MacOS/share/lua/http/.hosts

      Mac OS X – /Applications/VLC.app/Contents/MacOS/share/lua/http/.hosts

    • Linux – /usr/share/vlc/lua/http/.hosts

      Linux – /usr/share/vlc/lua/http/.hosts

    image

    To edit this file on Windows, you’ll have to open Notepad – or another text editor – as Administrator. Browse to the folder mentioned above and select “All Files” in Notepad’s open dialog to view the .hosts file.

    要在Windows上编辑此文件,您必须以管理员身份打开记事本或其他文本编辑器。 浏览到上述文件夹,然后在记事本的打开对话框中选择“所有文件”以查看.hosts文件。

    image

    You can uncomment the last two lines (to uncomment a line, remove the # at the beginning of the line) to allow access from all IP addresses, but the file notes this isn’t completely safe. You could also allow a range of IP addresses – or specify the IP address of each other device you want to allow here (add each IP address on a separate line).

    您可以取消对最后两行的注释(要取消注释,请删除该行开头的#)以允许从所有IP地址进行访问,但是该文件指出这并不完全安全。 您还可以允许一系列IP地址-或在此处指定要允许的其他每个设备的IP地址(在单独的行上添加每个IP地址)。

    image

    Save the file and restart VLC after making the change.

    保存文件并在进行更改后重新启动VLC。

    使用网络界面 (Using the Web Interface)

    Plug http://123.456.7.89:8080 into a web browser on an allowed computer or smartphone to view VLC’s web interface. Replace the “123.456.7.89” in the address with the IP address of the computer running VLC.

    将http://123.456.7.89:8080插入允许的计算机或智能手机上的Web浏览器中,以查看VLC的Web界面。 用运行VLC的计算机的IP地址替换地址中的“ 123.456.7.89”。

    If you need to find your computer’s IP address, you can use the ipconfig command in a Command Prompt window. Look for the IPv4 Address row under the name of your connection.

    如果需要查找计算机的IP地址,则可以在“命令提示符”窗口中使用ipconfig命令。 在连接名称下查找“ IPv4地址”行。

    image


    If you also want to access VLC’s web interface over the Internet instead of your local network, you’ll have to forward ports on your router.

    如果您还想通过Internet而不是本地网络访问VLC的Web界面,则必须转发路由器上的端口

    翻译自: https://www.howtogeek.com/117261/how-to-activate-vlcs-web-interface-control-vlc-from-a-browser-use-any-smartphone-as-a-remote/

    展开全文
  • vlc 添加字幕VLC for iPhone has been released back onto the App store and has some nice new features, one of which is a small webserver you can use to send files directly to your iPhone through a web ...
    vlc 添加字幕

    vlc 添加字幕

    image

    VLC for iPhone has been released back onto the App store and has some nice new features, one of which is a small webserver you can use to send files directly to your iPhone through a web browser.

    适用于iPhone的VLC已发布回App Store,并具有一些不错的新功能,其中之一是小型网络服务器,您可以使用它通过网络浏览器将文件直接发送到iPhone。

    Note: The computer and iPhone must be connected to the same network in order for this to work.

    注意:计算机和iPhone必须连接到同一网络才能正常工作。

    如何在没有iTunes的iPhone上将文件添加到VLC (How To Add Files To VLC on your iPhone Without iTunes)

    Open the VLC for iPhone app and click on the button in the top left hand corner of the app.

    打开适用于iPhone的VLC应用程序,然后单击该应用程序左上角的按钮。

    IMG_0023

    Here you will see a neat option to enable WiFi Uploads. Turn them on and take note of the IP address and port combination the app assigns you.

    在这里,您将看到一个启用WiFi上传的简洁选项。 打开它们,并记下该应用程序为您分配的IP地址和端口组合。

    IMG_0025

    Now open a web browser on one of your computers and type in the IP address that the app gave you in the step above.

    现在,在您的其中一台计算机上打开网络浏览器,然后输入应用在上述步骤中为您提供的IP地址。

    image

    Then just take your media file and drop it onto the Window; the file will then be uploaded to your device automatically.

    然后,只需将您的媒体文件拖放到窗口中即可; 该文件将自动上传到您的设备。

    image

    That is really all there is to it. They couldn’t have made it any easier for us.

    这就是全部。 他们对我们来说再简单不过了。

    IMG_0026

    翻译自: https://www.howtogeek.com/169251/how-to-add-files-to-vlc-on-your-iphone-without-itunes/

    vlc 添加字幕

    展开全文
  • vlc tv版 记住网络流When it comes to video playback, the cross-platform application VLC is a veritable Swiss Army knife. It’s been popular on Windows, Mac, and Linux for a long time, but now you can ...
    vlc tv版 记住网络流

    vlc tv版 记住网络流

    When it comes to video playback, the cross-platform application VLC is a veritable Swiss Army knife. It’s been popular on Windows, Mac, and Linux for a long time, but now you can get that same great plays-anything-under-the-sun power on your Apple TV.

    在视频播放方面,跨平台应用程序VLC是名副其实的瑞士军刀。 它已经在Windows,Mac和Linux上流行了很长时间了,但是现在您可以在Apple TV上获得相同的出色播放-阳光下的一切。

    Like most set-top media players, the Apple TV is super good at playing content provided by its parent company (Apple), but requires a little bit of finesse to play content from other sources (like your personal media collection, the web, or other streaming sources).

    与大多数机顶盒媒体播放器一样,Apple TV在播放其母公司(Apple)提供的内容方面也非常出色,但是要播放其他来源(例如您的个人媒体收藏,网络或其他流媒体来源)。

    Instead of repurchasing your favorite movies through iTunes, or converting your entire collection, you can play them with VLC. It can play video streams from both the local network and from the internet.

    您可以使用VLC播放电影,而无需通过iTunes购买您喜欢的电影或转换整个收藏集。 它可以播放来自本地网络和Internet的视频流。

    Not only does VLC for tvOS give you all the benefits of VLC desktop and mobile users are accustomed to (like the ability to increase playback speed to power watch documentaries and the like), but the tvOS version includes new features like direct integration with OpenSubtitles.org (so you can download subtitles on the fly while watching your media).

    VLC for tvOS不仅为您提供VLC台式机和移动用户已习惯的所有好处(例如提高回放速度以支持观看纪录片等功能),而且tvOS版本还包括新功能,例如与OpenSubtitles直接集成。 org(因此您可以在观看媒体的同时即时下载字幕)。

    To start, just search for “VLC for Mobile” in the app store on your Apple TV and download the app.

    首先,只需在Apple TV的应用商店中搜索“ VLC for Mobile”,然后下载该应用即可。

    您可以玩什么(以及如何玩) (What You Can Play (and How))

    There are three ways you can play media on your Apple TV through VLC: local network playback, remote playback, and network streaming playback. Each one covers a totally different bit of media playback ground, so let’s show you examples of how each works and when you would use it.

    您可以通过三种方式通过VLC在Apple TV上播放媒体:本地网络播放,远程播放和网络流播放。 每个媒体覆盖了完全不同的媒体播放基础,因此让我们为您展示每个媒体如何工作以及何时使用的示例。

    本地网络播放:非常适合文件共享 (Local Network Playback: Great For File Shares)

    If you’ve set up file sharing on your local network, either through Windows network shares or by UPnP file discovery, then you can easily access files in those directories via the “Local Network” tab in VLC for Apple TV.

    如果您已通过Windows网络共享UPnP文件发现在本地网络上设置了文件共享,则可以通过Apple TV的VLC中的“本地网络”选项卡轻松访问那些目录中的文件。

    The local network view is the default view when you launch the VLC app. In the screenshot above, you can see how VLC has automatically discovered a few detectable file shares on our local network, including three machines with Windows (SMB) shares enabled, two machines with UPnP file sharing enabled, and one Plex Media Server (which also uses UPnP).

    启动VLC应用程序时,本地网络视图是默认视图。 在上面的屏幕截图中,您可以看到VLC如何在我们的本地网络上自动发现了一些可检测到的文件共享,包括三台启用Windows(SMB)共享的计算机,两台启用UPnP文件共享的计算机以及一台Plex Media Server(使用UPnP)。

    As an aside, if your primary use for VLC would be accessing your Plex Media Server, you may want to just install the free Plex Apple TV app for a more polished media center experience.

    顺便说一句,如果VLC的主要用途是访问Plex Media Server,则可能只想安装免费的Plex Apple TV应用即可获得更优美的媒体中心体验。

    Although not seen in our screenshot above, VLC’s local network function also supports playback from local FTP servers.

    尽管在上面的屏幕截图中没有看到,但VLC的本地网络功能还支持从本地FTP服务器播放。

    To access the files, simply select any given entry in the local network tab and, if applicable, enter the login credentials for that file share or FTP server. Then you can browse the shared folders just like you would on your computer, albeit with the Apple TV remote.

    要访问文件,只需在本地网络选项卡中选择任何给定的条目,然后(如果适用)输入该文件共享或FTP服务器的登录凭据。 然后,即使使用Apple TV遥控器,也可以像在计算机上一样浏览共享文件夹。

    Select the file from the directory, and it will launch with full screen playback and remote control support just like you’re watching a video from iTunes.

    从目录中选择文件,它将以全屏播放和远程支持的方式启动,就像您从iTunes观看视频一样。

    If you swipe down on the Apple TV remote touchpad, you’ll see the on-screen menu.

    如果在Apple TV远程触摸板上向下滑动,则会看到屏幕上的菜单。

    Here you can change the audio settings as well as download aforementioned subtitles from OpenSubtitles.org and adjust the playback speed.

    您可以在此处更改音频设置以及从OpenSubtitles.org下载上述字幕并调整播放速度。

    远程播放:拖放,欣赏 (Remote Playback: Drag, Drop, and Enjoy)

    Local network playback is great if you already have file servers set up and ready to go, but what if you have a file on your computer your want to play right now but no file share to dump it into? That’s where VLC’s handy remote playback function comes into play.

    如果已经设置好文件服务器并准备就绪,则本地网络播放效果很好,但是如果您的计算机上现在有文件要播放但没有文件共享可将其转储到本地,该怎么办? 这就是VLC方便的远程播放功能发挥作用的地方。

    Fire up VLC, and swipe over to the the “Remote Playback” tab.

    启动VLC,然后滑到“远程播放”选项卡。

    Swipe down to highlight “Enable Remote Playback” and press the touch pad to select it.

    向下滑动以突出显示“启用远程播放”,然后按触摸板将其选中。

    This activates the VLC remote playback server. Next, go to any computer on your local network and open a web browser. Enter the address displayed on your TV screen (your screen will look like ours, in the screenshot above, but will have a different address). Here’s what you’ll see in your browser.

    这将激活VLC远程播放服务器。 接下来,转到本地网络上的任何计算机,然后打开Web浏览器。 输入显示在电视屏幕上的地址(在上面的屏幕快照中,您的屏幕看起来与我们的屏幕相似,但地址不同)。 这就是您在浏览器中看到的内容。

    You can drag and drop any video file onto the browser pane or you can enter a URL of a specific video stream. You can also click the large + symbol in the upper right corner to access the file explorer and browser for your local files.

    您可以将任何视频文件拖放到浏览器窗格中,也可以输入特定视频流的URL。 您也可以单击右上角的大号+来访问文件浏览器和浏览器以查找本地文件。

    While you’ll need to be on a PC in order to drag and drop files, if you load the same remote playback URL on a mobile device (where you can’t drag and drop) you can still tap the + symbol to select media on the device.

    虽然您需要在PC上才能拖放文件,但是如果您在移动设备上加载了相同的远程播放URL(无法拖放),您仍然可以点击+符号来选择媒体在设备上。

    Whether you send the video files from your computer or mobile device the files will play on your Apple TV and have the added bonus of being cached to your Apple TV’s local storage. This is a pretty handy feature if you’re watching kids’ movies or TV shows that will be watched over and over again. The cached files will be automatically deleted by the operating system if additional storage is needed.

    无论您是从计算机还是移动设备发送视频文件,这些文件都将在Apple TV上播放, 具有缓存到Apple TV本地存储的额外好处。 如果您要看一遍又一遍的儿童电影或电视节目,这是一个非常方便的功能。 如果需要其他存储,则操作系统将自动删除缓存的文件。

    网络流:从互联网到电视 (Network Stream: From The Internet to Your TV)

    The final method, which works for both video and audio streams, is to dump the URL of the streaming source into the address box in the “Network Stream” tab. This tab also, rather conveniently, maintains a list of both the previous URLs you’ve entered there as well as the URLs you’ve entered via the remote control web interface we looked at in the previous section.

    适用于视频和音频流的最后一种方法是将流源的URL转储到“网络流”选项卡中的地址框中。 此选项卡还很方便地维护了您在此输入的先前URL以及通过上一节中介绍的通过远程控制Web界面输入的URL的列表。

    Now, to be clear, using this feature is not as simple as plugging in the URL of a YouTube video or Netflix video. The network stream function requires the exact URL of the exact streaming resource (in a format VLC can access). So while the web page you’re looking at might be www.somestreamingsite.com/funnymovie/, the actual URL that points at the streaming video content is most likely a very long, arcane, and hidden URL embedded in the code of the website. Digging that URL out is a skill (and a whole other article) in and of itself.

    现在,要清楚一点,使用此功能并不像插入YouTube视频或Netflix视频的URL那样简单。 网络流功能需要确切的流资源的确切URL(VLC可以访问的格式)。 因此,虽然您正在查看的网页可能是www.somestreamingsite.com/funnymovie/,但指向流媒体视频内容的实际URL很可能是嵌入在网站代码中的非常长且晦涩且隐藏的URL 。 挖掘URL本身就是一项技能(以及其他文章)。

    While URL-based direct streaming is a bit of a fringe use case for most people, it’s really handy for things like streaming live coverage (be it a NASA launch, a press briefing, or a foreign sports match) and streaming from devices like networked security cameras that support URL-based streaming.

    尽管基于URL的直接流媒体对于大多数人来说只是一个附带的用例,但对于流媒体直播报道(例如NASA发射,新闻发布会或外国体育比赛)以及从网络设备等设备进行流媒体传送来说确实非常方便支持基于URL的流的安全摄像机。



    Armed with the free tvOS port of VLC media player you can play just about anything you can serve up from your home network or the greater internet–no transcoding, converting, or fiddling required.

    配备了VLC媒体播放器的免费tvOS端口,您可以播放几乎可以通过家庭网络或更大的互联网提供的任何内容,而无需进行转码,转换或摆弄。

    翻译自: https://www.howtogeek.com/254211/how-to-play-any-video-on-your-apple-tv-with-vlc/

    vlc tv版 记住网络流

    展开全文
  • 上篇文章:《黑苹果,iOS SDK和MobileVLC之逆旅(二) 编译MobileVLC》...近来工作有了阶段性成果,可以放松一下,而且手头上面的东西也和自制VLC有那么点沾边
  • LAN的VLC播放器,更令人惊奇的是这款播放器居然还是完全开源的。在此向那些开源软件的作者和组织致以崇高的敬意,是你们的存在使得计算机软件产业蓬勃发展,你们帮助了很多囊中羞涩的个人和企业,让他们也有机会用上...
  • VLC是一个视频播放软件。 VLC支持rtsp协议来传输视频文件流。 使用VLC插件在浏览器中播放视频。 在浏览器中,加入如下代码,可以实现调用VLC插件来播放视频。 代码如下: 01 ...
  • gstreamer vs VLC

    千次阅读 2015-05-10 15:55:26
    转自:http://gstreamer-devel.966125.n4.nabble.com/Gstreamer-vs-Vlc-td3219107.html This could turn into a debate like vi vs emacs, where people are  strongly opinionated and there is never ...
  • VLC 插件的检测

    千次阅读 2014-06-21 15:35:43
    最近做的一个海底观测网项目,其中流媒体用到了VLC插件。 在网页中实时播放视频,检测用户的浏览器中是否已安装了该插件,代码如下:   Js代码  "UTF-8" contentType="text/html;charset=UTF-8...
  • Ubuntu下firefox浏览器VLC插件使用

    千次阅读 2014-05-16 09:42:40
    The Mozilla/Safari plugin for MacOS X is only available from vlc version 0.8.5.1 and onwards. Quit Safari browser Download the Mozilla/safari plugin package from  MacOS X download page . Run...
  • 之前写过一篇关于在Linux平台上编译android平台上VLC播放器源代码的文章,vlc这款播放器非常优秀而且是开源的,它的核心是开源视频编解码库ffmpeg。而且这款播放器还支持RTSP协议,这个主要是用开源的live555来实现...
  • vlc是通过模块来扩展它的功能,插件一般就是实现一个模块。vlc的模块有很多类型:AccessDemuxAccess_DemuxDecoderInterfaceVideofilterAudiofilterAudiooutputAccess提供输入功能,比如HTTP输入、文件输入Demux提供...
  • 编译环境:Linux 5.0.0-27-generic #28~18.04.1-Ubuntu SMP Thu Aug 22 03:00:32 UTC 2019 x86_64 x86...代码来源:https://github.com/videolan/vlc 主要过程:参考官网WIKI:https://wiki.videolan.org/UnixCompi...
  • How to play RTSP video stream of IP cameras on VLC player, QuickTime player . comefrom:https://www.unifore.net/ip-video-surveillance/how-to-play-rtsp-video-stream-of-ip-cameras-on-vlc-player-quick
  • VLC for iOS 3.hook代码 %hook IASKSettingsStoreUserDefaults - (void)setObject:(id)arg1 forKey:(id)arg2 { if ([arg2 isEqualToString:@"playback-speed"]) { arg1 = @(2.4); } %orig; } %end ...
  • VLC for Android This is the official Android port of VLC. VLC on Android plays all the same files as the classical version of VLC, and features a media database for Audio and Video files and stream. ...
  • screenshot https://www.videolan.org/vlc/download-ios.html Binary You can also get the binary from our servers instead of the App Store:&...[VLC for iOS 3.1.5 binary](http://get.videolan.org/vlc-iOS...
  • VLC 2.0 'Twoflower' 发布

    2012-02-20 17:08:00
    "With faster decoding on multi-core, GPU, and mobile hardware and the ability to open more formats, notably professional, HD and 10bits codecs, 2.0 is a major upgrade for VLC. Twoflower has a new ...
  • HowTo: Live streaming video/audio from VLC to your Android device (self.Android) submitted 1 year ago by Shaper_pmp to Android sorry,
  • Windows Mobile 6.5的DTK终于发布了,其中最吸引人的是两个功能:Widgets和Gesture API。Widgets是近来非常流行的一项技术,用于显示一些常用信息,比如天气、股票、新闻和体育等。Google Android和Symbian上已经有...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 1,576
精华内容 630
关键字:

formobilevlc