为Raspberry Pi编译Xuggler的指南 [英] Guide to compile Xuggler for Raspberry Pi

查看:128
本文介绍了为Raspberry Pi编译Xuggler的指南的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以发表有关如何为Raspberry Pi编译Xuggler的详细文章吗?

Can someone post a detailed write up, on how to compile Xuggler for Raspberry Pi?

推荐答案

工作大约5天后,我将使用以下指南为Raspberry Pi编译xuggler(所需时间:8小时):

After working on for about 5 days , I am putting the following guide to compile xuggler for Raspberry Pi (Time required : 8 hrs):

先决条件:

  1. 具有512 MB RAM的Raspberry Pi Model B +(任何小于该型号的模型都不会为您提供已编译的二进制文件,并且在编译过程中会卡住)
  2. 安装在SD卡上的Raspbian(可以使用超过4GB的SD卡)

步骤:

  1. 切换为"root"用户.

  1. Switch to 'root' user.

从基本xuggler构建"页面安装依赖项( http://www.xuggle. com/xuggler/build )标记为必需"

From the Basic xuggler build page install the dependencies (http://www.xuggle.com/xuggler/build) labeled as 'Required'

按如下所示创建和导出变量(创建相关目录)

Create and export variables as follows (Make the relevant directories)

export XUGGLE_HOME=/home/pi/Downloads/xuggler    
export PATH=$XUGGLE_HOME/bin:$PATH    
export LD_LIBRARY_PATH=$XUGGLE_HOME/lib:$LD_LIBRARY_PATH

  • 创建以下链接:

  • Create the following link:

    sudo ln -s /usr/bin/make /usr/bin/gmake
    

  • 如果您落后于任何类型的Web代理,也请设置以下变量:

  • If you are behind any kind of web proxy then set the following variables too:

    export http_proxy='proxy-url:port'    
    export https_proxy='proxy-url:port'    
    export ftp_proxy='proxy-url:port'
    

  • 现在移至以下目录:

  • Now move to the following directory:

    cd /home/pi/Downloads/
    

  • 从此处下载xuggler代码( https://github.com/artclarke/xuggle -xuggler ):

    git clone https://github.com/artclarke/xuggle-xuggler.git
    

  • 该代码将下载到名为"xuggle-xuggler"的目录中

  • The code would be downloaded in the directory named 'xuggle-xuggler'

    移动到目录'xuggle-xuggler'

    Move inside the directory 'xuggle-xuggler'

    如果您在代理后面,则在文件"build.xml"中的以下行中添加以下行,即文件中"property" xml标记的正下方:

    If you are behind a proxy add the following line in the file 'build.xml', just below the 'property' xml tags in the file:

    <setproxy proxyhost="proxy-url" proxyport="port"/>
    

  • 现在按如下所示编辑文件'captive/libspeex/csrc/configure':

  • Now edit the file 'captive/libspeex/csrc/configure' as follows:

    发件人:

    CFLAGS="$CFLAGS -O3 -msse"
    

    收件人:

    CFLAGS="$CFLAGS -O3"
    

    还有

    发件人:

    if test "$has_sse" = yes; then
    $as_echo "#define _USE_SSE /**/" >>confdefs.h
    fi
    

    收件人:

    #if test "$has_sse" = yes; then
    #$as_echo "#define _USE_SSE /**/" >>confdefs.h
    #fi
    

    有关更多信息,请参考.

    Refer this for more info.

    现在按如下所示编辑文件'captive/libspeex/csrc/configure.ac':

    Now edit the file ' captive/libspeex/csrc/configure.ac' as follows:

    发件人:

    CFLAGS="$CFLAGS -O3 -msse"
    

    收件人:

    CFLAGS="$CFLAGS -O3"
    

    还有

    发件人:

    if test "$has_sse" = yes; then
     AC_DEFINE([_USE_SSE], , [Enable SSE support])
    fi
    

    收件人:

    #if test "$has_sse" = yes; then
    # AC_DEFINE([_USE_SSE], , [Enable SSE support])
    #fi
    

    有关详细信息,请参考.

    Refer this for more info.

    现在在xuggler预先构建链接中列出( http://www.xuggle. com/xuggler/advbuild ),启动命令:

    Now as listed in the xuggler advance build link (http://www.xuggle.com/xuggler/advbuild), launch the command:

    ant stage
    

  • 在libX264编译过程中或编译过程中,该过程将失败,为了规避它,请在现在生成的文件中添加以下编译开关,即编辑文件'captive/libx264/incarcerate.in':

  • The process will fail at or during the compilation of libX264, to circumvent it, add the following compile switches in the now generated file i.e edit file 'captive/libx264/incarcerate.in' :

    发件人:

    X264_OPTIONS="$X264_OPTIONS --enable-static"
    X264_OPTIONS="$X264_OPTIONS --enable-pic"
    

    收件人:

    X264_OPTIONS="$X264_OPTIONS --disable-asm"
    X264_OPTIONS="$X264_OPTIONS --enable-shared"
    X264_OPTIONS="$X264_OPTIONS --enable-static"
    X264_OPTIONS="$X264_OPTIONS --enable-pic"
    

  • 现在运行以下命令(仅一个接一个):

  • Now run following command(one by one only):

    ant clobber
    ant clean
    ant stage
    

  • 这一次将完成所有编译步骤.

  • This time all the compile steps will go through.

    运行安装命令:

    ant install
    

  • xuggler二进制文件将安装在步骤#3中定义的"XUGGLE_HOME"位置.

  • The xuggler binaries would be installed at the location 'XUGGLE_HOME' as defined in step #3.

    用于Java二进制文件的xuggler maven存储库位于'/root/.m2/repository/xuggle/xuggle-xuggler'

    The xuggler maven repository for java binaries would be located at '/root/.m2/repository/xuggle/xuggle-xuggler'

    此外,您还可以检出'../xuggle-xuggler/dist'目录,以检查所有本机和Java二进制文件,以进行非Maven的使用.

    Also you can check out the '../xuggle-xuggler/dist' directory to check all the native and java binaries for your non-maven kind of use.

    编译后的二进制文件在Raspberry PI(Arch Linux,Raspbian)上运行良好.

    The compiled binaries ran fine on Raspberry PI (Arch Linux, Raspbian).

    如果您没有时间进行编译,请从

    If you don't have the time to compile, get the binaries from here.

    在使用我编译的Java二进制文件之前,请确保在Java类路径或Shell终端中添加步骤3中定义的变量.

    Make sure to add the variables as defined in step #3 in java class path or shell terminal before using the java binaries compiled by me.

    特别感谢 11101101b 的指导和帮助.

    Special thanks to 11101101b for guidance and helping.

    参考文献:

    1. https://github.com/ed/xuggle-xuggler/commit/035c676e6e289fbb4b27c75134a
    2. 在为Raspberry pi编译Xuggler时的问题1与libspeex
    3. 如何我可以构建Xuggle Xuggler的GPL和LGPL版本吗?
    4. 在为Raspberry pi编译Xuggler时的问题2使用libx264
    5. http://blog.oneiroi.co. uk/linux/ffmpeg-install-with-libx264-h264/
    6. http ://www.unix.com/unix-for-dummies-questions-and-answers/53319-change-target-symbolic-link.html
    7. http://www.raspberrypi.org/arch- linux-arm-available-for-download/
    8. 特别感谢: https ://groups.google.com/forum/#!topic/xuggler-users/F-fSSm46ZaI
    9. 对于x86_64 Arch,这有帮助:使git与代理服务器一起使用
    10. Xuggler代码: https://github.com/artclarke/xuggle-xuggler
    11. 用于Raspberry Pi的Xuggler: https://github.com/ed/xuggle- xuggler/tree/pi
    1. https://github.com/e-d/xuggle-xuggler/commit/035c676e6e289fbb4b27dc75134a4470a5bab28a
    2. Issue #1 when compiling Xuggler for Raspberry pi with libspeex
    3. How can I build the GPL and LGPL version of Xuggle Xuggler?
    4. Issue #2 when compiling Xuggler for Raspberry pi with libx264
    5. http://blog.oneiroi.co.uk/linux/ffmpeg-install-with-libx264-h264/
    6. http://www.unix.com/unix-for-dummies-questions-and-answers/53319-change-target-symbolic-link.html
    7. http://www.raspberrypi.org/arch-linux-arm-available-for-download/
    8. Special Thanks : https://groups.google.com/forum/#!topic/xuggler-users/F-fSSm46ZaI
    9. For x86_64 Arch, this helped : while installing xuggler in ubuntu 11.10 getting error message
    10. Getting git to work with a proxy server
    11. Xuggler code : https://github.com/artclarke/xuggle-xuggler
    12. Xuggler for Raspberry Pi: https://github.com/e-d/xuggle-xuggler/tree/pi

    这篇关于为Raspberry Pi编译Xuggler的指南的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆