FFMPEG error showing runtime for Android

I am trying to add ffmpeg to my android project. I am using ubuntu 14.04 OS.

I follow this link. Link

But I get an error while executing this line.

$ANDROID_NDK/build/tools/make-standalone-toolchain.sh --toolchain=x86-4.8 --arch=x86 --system=linux-x86_64 --platform=android-14 --install-dir=/tmp/vplayer 

I get the following error.

 HOST_OS=linux HOST_EXE= HOST_ARCH=x86_64 HOST_TAG=linux-x86_64 HOST_NUM_CPUS=1 BUILD_NUM_CPUS=2 ERROR: Unknown option '--system'. See --help for usage. 

Please help me solve this problem and add ffmpeg to my project.

+2
source share
2 answers

It seems that the system is not required as a command line parameter.

try it -

$ ANDROID_NDK / build / tools / make-standalone-toolchain.sh --help

It will show you the actual use of --system

Or you can try running the command without providing system information, here's what you can do -

$ ANDROID_NDK / build / tools / make-standalone-toolchain.sh --toolchain = x86-4.8 --arch = x86 --platform = android-14 --install-dir = / tmp / vplayer

+2
source

You can use FFmpeg android with the FFmpeg Android Java implementation library in your project. see below

use gradle

  compile 'com.writingminds:FFmpegAndroid:0.3.2' 

and implement the code in your project below.

Download binary

You must download the binary.

  FFmpeg ffmpeg = FFmpeg.getInstance(context); try { ffmpeg.loadBinary(new LoadBinaryResponseHandler() { @Override public void onStart() {} @Override public void onFailure() {} @Override public void onSuccess() {} @Override public void onFinish() {} }); } catch (FFmpegNotSupportedException e) { // Handle if FFmpeg is not supported by device } 

Run binary

Here you have the ffmpeg command for your task.

  FFmpeg ffmpeg = FFmpeg.getInstance(context); try { // to execute "ffmpeg -version" command you just need to pass "-version" ffmpeg.execute(cmd, new ExecuteBinaryResponseHandler() { @Override public void onStart() {} @Override public void onProgress(String message) {} @Override public void onFailure(String message) {} @Override public void onSuccess(String message) {} @Override public void onFinish() {} }); } catch (FFmpegCommandAlreadyRunningException e) { // Handle if FFmpeg is already running } 

More reffer this link.

+1
source

Source: https://habr.com/ru/post/1243295/


All Articles