android-gpuimage-plus icon indicating copy to clipboard operation
android-gpuimage-plus copied to clipboard

FFmpeg

Open iigacon opened this issue 8 years ago • 7 comments

How can i use ffmpeg in the library. For example, I want to join the file

iigacon avatar Apr 02 '17 08:04 iigacon

It's open source now.

wysaid avatar Jul 03 '17 02:07 wysaid

How to use it? I want to execute some ffmpeg commands @wysaid

Sp4Rx avatar Feb 11 '19 08:02 Sp4Rx

@Sp4Rx @iigacon You can compile the jni module with ffmpeg, and add the ffmpeg-command feature: https://github.com/wysaid/android-gpuimage-plus/issues/269

I can do that later, but you can do it yourself if you really need it for now.

wysaid avatar Feb 11 '19 13:02 wysaid

What I want is to execute ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 this.

ffmpeg.so is already there in your library. For the filter you are calling the native c++ method from java in CGEFFmpegNativeLibrary class

private static native boolean nativeGenerateVideoWithFilter(String outputFilename, String inputFilename, String filterConfig, float filterIntensity, Bitmap blendImage, int blendMode, float blendIntensity, boolean mute);

So to execute the command I guess I need to call some native method in ffmpeg.so and I don't know which method to call. Correct me If I'm wrong.

I know how to execute that command using a ffmpeg binary. I'm no familiar with .so files. Please help me @wysaid

Sp4Rx avatar Feb 12 '19 07:02 Sp4Rx

Any updates on this yet?

assassinshadow0 avatar Jun 20 '20 13:06 assassinshadow0

I was finally able to achieve this but then realized, there are not many codecs in the ffmpeg version used. as a result you can't transcode many videos.

assassinshadow0 avatar Jun 22 '20 03:06 assassinshadow0

Please elaborate your method @assassinshadow0

Sp4Rx avatar Jun 22 '20 06:06 Sp4Rx