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等文件;

  • 相关阅读:
    ML与NLP的2019年度总结与展望
    python在文本开头插入一行的实例
    Git Notes
    warmup 预热学习率
    python error整理
    python 中字符串处理
    集成学习voting Classifier在sklearn中的实现
    机器学习 评价指标整理
    PaddlePaddle Notes
    linux 常用指令 文件操作trick等
  • 原文地址:https://www.cnblogs.com/y4247464/p/13559046.html
Copyright © 2011-2022 走看看