Skip to content Skip to sidebar Skip to footer

Documentation On Guardian Project Ffmpeg Android

I got the Gaurdian Project FFMPEG android java from the following link https://github.com/guardianproject/android-ffmpeg-java Is there any good documents available to use the libra

Solution 1:

I managed to get it work.

First, download the guardian project ffmpeg library project:

Then import it in eclipse. (no need to follow their Build Procedure, with the NDK just import their project in eclipse directly)

Then right click on your Main project (not the library project) -> Properties -> Android -> Library -> Add

Then, use it this way :

FilefileTmp= context.getActivity().getCacheDir();
  FilefileAppRoot=newFile(context.getActivity().getApplicationInfo().dataDir);

  FfmpegControllerfc=newFfmpegController(fileTmp, fileAppRoot);


  finalClipout=newClip("compiled.mp4");


  fc.concatAndTrimFilesMP4Stream(videos, out, true, false,  newShellUtils.ShellCallback() {

        @OverridepublicvoidshellOut(String shellLine) {
            System.out.println("MIX> " + shellLine);
        }

        @OverridepublicvoidprocessComplete(int exitValue) {

            if (exitValue != 0) {
                System.err.println("concat non-zero exit: " + exitValue);
                Log.d("ffmpeg","Compilation error. FFmpeg failed");
            } else {
                if(newFile(out.path).exists()) {
                    Log.d("ffmpeg","Success file:"+out.path);
                }
            }
        }
    });

With an ArrayList<Clip> of videos you want to concatenate.

Post a Comment for "Documentation On Guardian Project Ffmpeg Android"