Created
December 13, 2016 06:29
-
-
Save lhjnano/c8ca2d5389915d183ccd96cb2f52f4b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JNIEXPORT jint JNICALL Java_com_gluesys_util_NDKAdapter_run_1ffmpeg(JNIEnv *env, jobject obj) | |
{ | |
// /sdcard/input.mp4 가 있다는 가정하에 작성된 코드 입니다. | |
// 아래의 명령어를 수행하는 코드입니다. | |
// ffmpeg -i /sdcard/input.mp4 -filter:v crop=300:400:10:20 /sdcard/output.mp4 | |
char* a0 = "ffmpeg"; | |
char* a1 = "-i"; | |
char* a2 = "/storage/emulated/0/Download/demo.mp4"; | |
char* a3 = "-filter:v"; | |
char* a4 = "crop=300:400:10:20"; | |
char* a5 = "/storage/emulated/0/Download/output.mp4"; | |
char* argv[6]; | |
argv[0] = a0; | |
argv[1] = a1; | |
argv[2] = a2; | |
argv[3] = a3; | |
argv[4] = a4; | |
argv[5] = a5; | |
LOGI("call run_ffmpeg"); | |
run_ffmpeg(6, &argv); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment