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

查看:14
本文介绍了为 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. Raspbian 安装在 SD 卡上(超过 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
    

  • 如果您支持任何类型的网络代理,那么也设置以下变量:

  • 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).

    如果您没有时间编译,请从 此处.

    在使用我编译的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/68c84b4b4b4b4b4b4b4b8c70370303
    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,这有帮助:在 ubuntu 11.10 中安装 xuggler 时收到错误消息
    10. 让 git 与代理服务器一起工作
    11. Xuggler 代码:https://github.com/artclarke/xuggle-xuggler
    12. 树莓派的 Xuggler:https://github.com/ed/xuggle-xuggler/tree/pi

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

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