zoukankan      html  css  js  c++  java
  • 移植ffmpeg到H3559a

    1、下载源码

            从https://github.com/FFmpeg/FFmpeg/releases 下载需要的版本;此处下载的是FFmpeg-n4.2.3;

    2、配置选项

      可将编译选项写入到一个文本文件configure_help.txt中以查看编译选项,执行:./configure --help > configure_help.txt

      在build.sh脚本中添加编译选项:

    ./configure 
        --prefix="/home/tianyu/share/ffmpeg 
        --enable-shared 
        --enable-cross-compile 
        --target-os=linux 
        --arch=aarch64 
        --cc=/opt/hisi-linux/x86-arm/aarch64-himix100-linux/bin/aarch64-himix100-linux-gcc 
        --cxx=/opt/hisi-linux/x86-arm/aarch64-himix100-linux/bin/aarch64-himix100-linux-g++ 
        --enable-gpl 
        --extra-libs=-ldl 
        --extra-cflags="-fPIC" 
        --extra-ldflags=-Wl,-Bsymbolic 
    --extra-libs="-lpthread -lm"

    3、编译

      make -j4    

      //-j [N], --jobs[=N] 同时允许 N 个任务;无参数表明允许无限个任务。make 命令参数

      出现错误:

    STRIP   ffprobe
    strip: Unable to recognise the format of the input file `ffprobe_g'
    Makefile:104: recipe for target 'ffprobe' failed
    make: *** [ffprobe] Error 1
    make: *** Waiting for unfinished jobs....

         指定strip:

      make STRIP=aarch64-himix100-linux-strip -j4

      make STRIP=aarch64-himix100-linux-strip install

    4、生成的相关文件在之前指定的目录下

      

       执行完后会在指定目录下生成bin, include, lib, share四个目录,其中bin目录下会包含2个可执行文件ffmpeg和ffprobe,

       执行此两个文件需要LD_LIBRARY_PATH指向动态库;include目录下包含8个ffmpeg模块的头文件;lib目录下包含生成的动态库和静态库;share目录包含了一些examples等文件;

  • 相关阅读:
    zoj 1239 Hanoi Tower Troubles Again!
    zoj 1221 Risk
    uva 10192 Vacation
    uva 10066 The Twin Towers
    uva 531 Compromise
    uva 103 Stacking Boxes
    稳定婚姻模型
    Ants UVA
    Golden Tiger Claw UVA
    关于upper、lower bound 的探讨
  • 原文地址:https://www.cnblogs.com/y4247464/p/13559046.html
Copyright © 2011-2022 走看看