Q:

Combine videos using JavaCV for android

I am having difficulties to merge multiple video fragments into 1.
I am using JavaCV and have the current code to combine them:
String newPath = this.initFile().getAbsolutePath();
try
{
    //get files
    File pF = new File(OUTPUT_DIR);
    File files[] = pF.listFiles();

    Log.d("FilesCount", Integer.toString(files.length));

    if(files.length <= 1)
        return;

    List<FrameGrabber> fgs = new ArrayList<FrameGrabber>();
    for(File f : files)
    {
        FrameGrabber grabber = new FFmpegFrameGrabber(f);
        grabber.start();
    }

    FrameRecorder recorder = new FFmpegFrameRecorder(OUTPUT_DIR + File.separator + "VIDEO_COMBINED_TEST.mpg4", fgs.get(0).getImageWidth(), fgs.get(0).getImageHeight());
    recorder.start();
    Frame frame;

    for(FrameGrabber fg : fgs)
    {
        while ((frame = fg.grabFrame()) != null) {
            recorder.record(frame);
        }
        fg.stop();
    }

    recorder.stop();
}
catch(Exception ex)
{
    ex.printStackTrace();
}

Where newPath returns a valid path (already tested this)
It's throwing this error:
Process: com.myapp.myapp, PID: 10216
    java.lang.UnsatisfiedLinkError: Couldn't load jniavcodec from loader dalvik.system.PathClassLoader[dexPath=/data/app/com.myapp.myapp-33.apk,libraryPath=/data/app-lib/com.myapp.myapp-33]: findLibrary returned null
            at java.lang.Runtime.loadLibrary(Runtime.java:358)
            at java.lang.System.loadLibrary(System.java:526)
            at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:524)
            at org.bytedeco.javacpp.Loader.load(Loader.java:399)
            at org.bytedeco.javacpp.Loader.load(Loader.java:353)
            at org.bytedeco.javacpp.avcodec.<clinit>(avcodec.java:12)
            at org.bytedeco.javacv.FFmpegFrameGrabber.<clinit>(FFmpegFrameGrabber.java:103)
            at com.myapp.myapp.CameraActivity.initRecorder(CameraActivity.java:188)
            at com.myapp.myapp.CameraActivity.surfaceCreated(CameraActivity.java:235)
            at android.view.SurfaceView.updateWindow(SurfaceView.java:602)
            at android.view.SurfaceView.access$000(SurfaceView.java:94)
            at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:183)
            at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:888)
            at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2176)
            at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1249)
            at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6585)
            at android.view.Choreographer$CallbackRecord.run(Choreographer.java:803)
            at android.view.Choreographer.doCallbacks(Choreographer.java:603)
            at android.view.Choreographer.doFrame(Choreographer.java:573)
            at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:789)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5579)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.UnsatisfiedLinkError: Couldn't load avcodec from loader dalvik.system.PathClassLoader[dexPath=/data/app/com.myapp.myapp-33.apk,libraryPath=/data/app-lib/com.myapp.myapp-33]: findLibrary returned null
            at java.lang.Runtime.loadLibrary(Runtime.java:358)
            at java.lang.System.loadLibrary(System.java:526)
            at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:524)
            at org.bytedeco.javacpp.Loader.load(Loader.java:390)
            at org.bytedeco.javacpp.Loader.load(Loader.java:353)
            at org.bytedeco.javacpp.avcodec.<clinit>(avcodec.java:12)
            at org.bytedeco.javacv.FFmpegFrameGrabber.<clinit>(FFmpegFrameGrabber.java:103)
            at com.myapp.myapp.CameraActivity.initRecorder(CameraActivity.java:188)
            at com.myapp.myapp.CameraActivity.surfaceCreated(CameraActivity.java:235)
            at android.view.SurfaceView.updateWindow(SurfaceView.java:602)
            at android.view.SurfaceView.access$000(SurfaceView.java:94)
            at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:183)
            at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:888)
            at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2176)
            at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1249)
            at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6585)
            at android.view.Choreographer$CallbackRecord.run(Choreographer.java:803)
            at android.view.Choreographer.doCallbacks(Choreographer.java:603)
            at android.view.Choreographer.doFrame(Choreographer.java:573)
            at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:789)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5579)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
            at dalvik.system.NativeStart.main(Native Method)

I think i did set up JavaCV correctly, but here is my configuration for JavaCV to be sure:

The armeabi directory contains all the .so files that were required according to the documentation found here: https://github.com/bytedeco/javacv
I am using this gradle script to load the libs:

A:

I had to add opencv-android-arm.jar and ffmpeg-android-arm.jar and also make armeabi into a .jar file

