[FFmpeg-user] Guidance with Implemention video filter through FFMpeg in Android

Deepanjan Das deepanjan.das at gmail.com
Tue Oct 2 05:46:57 CEST 2012


Greetings All!
Hope this message of mine finds you in best of health and spirits.

Here is my problem, it would be great if someone may put forward some
guidance.

I have a video file and am trying to scale it using -vf argument for ffmpeg
"Angel" repo version used in an android project. The build through NDK is
going smooth, but when I write this code, the application starts and exits.
If I use any other argument other than -vf it works fine and export the
video.

JNIEXPORT jint JNICALL
Java_com_schemaphic_mirrorapp_jni_NativeHelper_hFlipVideoEffect(
JNIEnv *env, jstring outFile )
{
//ffplay -i INPUT -vf "crop=iw/2:ih:0:0,split[tmp],pad=2*iw[left];
[tmp]hflip[right]; [left][right] overlay=W/2"
//fmpeg -i input -vf scale=iw/2:-1 output
//ffmpeg -i input -vf yadif=0:0:0,scale=iw/2:-1  output

char** arguments;
int count = 6;

arguments = calloc( count, sizeof( char* ) );

arguments[0] = "ffmpeg";

arguments[1] = "-i";
arguments[2] = "/sdcard/mirrorapp/cropVideo.mp4";

arguments[3] = "-vf";
arguments[4] = "scale=120:-1";

//arguments[5] = "-aspect";
//arguments[6] = "3:2";
//arguments[5] = "-vcodec";
//arguments[6] = "mpeg4";
/*arguments[9] = "-r";
arguments[10] = "19";
arguments[5] = "-cropright";
arguments[6] = "240";
arguments[7] = "-padleft";
arguments[8] = "0";
arguments[9] = "-padtop";
arguments[10] = "0";
arguments[11] = "-aspect";
arguments[12] = "3:2";
arguments[13] = "-an";
arguments[5] = "-vcodec";
arguments[6] = "mpeg4";*/
//arguments[7] = "-sameq";
arguments[5] = "/sdcard/mirrorapp/cropFlipVideo.mp4";

ffmpeg_main( count, arguments );
//free(arguments);

return 1;
}


This gives me an impression that the set up is correct. the argument -vf is
somehow not working or am not sure of the newer syntax. Kindly help.

..
Warm Regards
Deepanjan Das
+91.9836582808
http://deepanjandas.wordpress.com

|| Om Manasamarthadata Shri Aniruddhaya Namah
||<http://www.manasamarthyadata.com/>
*Think of the environment before printing this email
__________________________________________________________________________
*


More information about the ffmpeg-user mailing list