gpt4 book ai didi

java - 如何为android studio安装ffmpeg?

转载 作者:行者123 更新时间:2023-12-01 18:41:30 27 4
gpt4 key购买 nike

嗨,我正在尝试做一个视频处理项目。我想对 mp4 容器中的视频进行解复用和复用。我用 MediaMuxer 做到了这一点,但现在每当我搜索时,每个人都推荐 ffmpeg 会容易得多。所以我想尝试一下这个库。但我一生都不知道如何使用这个库。我想将它与我当前用 java 编写的 android studio 项目集成。给出了一些关于如何在 linux 中安装它的示例,还有一些是 android ndk。谁能指导我如何使用这个库。如何使用等等。我已经阅读了几乎所有的教程,但仍然不清楚。请。任何帮助将不胜感激。

最佳答案

终于找到答案了。对于那些在同一条船上但还没有弄清楚的人,

First include this line into your build.grade module file:

 implementation 'com.arthenica:mobile-ffmpeg-full:4.3.1'

Then import these methods:

import com.arthenica.mobileffmpeg.Config;
import com.arthenica.mobileffmpeg.FFmpeg;
import com.arthenica.mobileffmpeg.FFprobe;

此后,当您尝试执行代码时,请使用不带“ffmpeg”的命令。如果您仍有疑问,请回复。

关于java - 如何为android studio安装ffmpeg?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59924794/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com