();
-
- cmd.add(mFfmpegBin);
- cmd.add("-y");
- cmd.add("-i");
-
- cmd.add(new File(in.path).getCanonicalPath());
-
- InfoParser ip = new InfoParser(in);
- execFFMPEG(cmd,ip, null);
-
- try{Thread.sleep(200);}
- catch (Exception e){}
-
-
- return in;
-
- }
-
- private class InfoParser implements ShellCallback {
-
- private Clip mMedia;
- private int retValue;
-
- public InfoParser (Clip media)
- {
- mMedia = media;
- }
-
- @Override
- public void shellOut(String shellLine) {
- if (shellLine.contains("Duration:"))
- {
-
-// Duration: 00:01:01.75, start: 0.000000, bitrate: 8184 kb/s
-
- String[] timecode = shellLine.split(",")[0].split(":");
-
-
- double duration = 0;
-
- duration = Double.parseDouble(timecode[1].trim())*60*60; //hours
- duration += Double.parseDouble(timecode[2].trim())*60; //minutes
- duration += Double.parseDouble(timecode[3].trim()); //seconds
-
- mMedia.duration = duration;
-
-
- }
-
- // Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080, 16939 kb/s, 30.02 fps, 30 tbr, 90k tbn, 180k tbc
- else if (shellLine.contains(": Video:"))
- {
- String[] line = shellLine.split(":");
- String[] videoInfo = line[3].split(",");
-
- mMedia.videoCodec = videoInfo[0];
- }
-
- //Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, s16, 121 kb/s
- else if (shellLine.contains(": Audio:"))
- {
- String[] line = shellLine.split(":");
- String[] audioInfo = line[3].split(",");
-
- mMedia.audioCodec = audioInfo[0];
-
- }
-
-
- //
- //Stream #0.0(und): Video: h264 (Baseline), yuv420p, 1280x720, 8052 kb/s, 29.97 fps, 90k tbr, 90k tbn, 180k tbc
- //Stream #0.1(und): Audio: mp2, 22050 Hz, 2 channels, s16, 127 kb/s
-
- }
-
- @Override
- public void processComplete(int exitValue) {
- retValue = exitValue;
-
- }
- }
-
- private class StreamGobbler extends Thread
- {
- InputStream is;
- String type;
- ShellCallback sc;
-
- StreamGobbler(InputStream is, String type, ShellCallback sc)
- {
- this.is = is;
- this.type = type;
- this.sc = sc;
- }
-
- public void run()
- {
- try
- {
- InputStreamReader isr = new InputStreamReader(is);
- BufferedReader br = new BufferedReader(isr);
- String line=null;
- while ( (line = br.readLine()) != null)
- if (sc != null)
- sc.shellOut(line);
-
- } catch (IOException ioe)
- {
- // Log.e(TAG,"error reading shell slog",ioe);
- ioe.printStackTrace();
- }
- }
- }
-
- public static Bitmap getVideoFrame(String videoPath,long frameTime) throws Exception {
- MediaMetadataRetriever retriever = new MediaMetadataRetriever();
-
- try {
- retriever.setDataSource(videoPath);
- return retriever.getFrameAtTime(frameTime, MediaMetadataRetriever.OPTION_CLOSEST);
-
- } finally {
- try {
- retriever.release();
- } catch (RuntimeException ex) {
- }
- }
- }
-}
-
-/*
- * Main options:
--L show license
--h show help
--? show help
--help show help
---help show help
--version show version
--formats show available formats
--codecs show available codecs
--bsfs show available bit stream filters
--protocols show available protocols
--filters show available filters
--pix_fmts show available pixel formats
--sample_fmts show available audio sample formats
--loglevel loglevel set libav* logging level
--v loglevel set libav* logging level
--debug flags set debug flags
--report generate a report
--f fmt force format
--i filename input file name
--y overwrite output files
--n do not overwrite output files
--c codec codec name
--codec codec codec name
--pre preset preset name
--t duration record or transcode "duration" seconds of audio/video
--fs limit_size set the limit file size in bytes
--ss time_off set the start time offset
--itsoffset time_off set the input ts offset
--itsscale scale set the input ts scale
--timestamp time set the recording timestamp ('now' to set the current time)
--metadata string=string add metadata
--dframes number set the number of data frames to record
--timelimit limit set max runtime in seconds
--target type specify target file type ("vcd", "svcd", "dvd", "dv", "dv50", "pal-vcd", "ntsc-svcd", ...)
--xerror exit on error
--frames number set the number of frames to record
--tag fourcc/tag force codec tag/fourcc
--filter filter_list set stream filterchain
--stats print progress report during encoding
--attach filename add an attachment to the output file
--dump_attachment filename extract an attachment into a file
--bsf bitstream_filters A comma-separated list of bitstream filters
--dcodec codec force data codec ('copy' to copy stream)
-
-Advanced options:
--map file.stream[:syncfile.syncstream] set input stream mapping
--map_channel file.stream.channel[:syncfile.syncstream] map an audio channel from one stream to another
--map_meta_data outfile[,metadata]:infile[,metadata] DEPRECATED set meta data information of outfile from infile
--map_metadata outfile[,metadata]:infile[,metadata] set metadata information of outfile from infile
--map_chapters input_file_index set chapters mapping
--benchmark add timings for benchmarking
--dump dump each input packet
--hex when dumping packets, also dump the payload
--re read input at native frame rate
--loop_input deprecated, use -loop
--loop_output deprecated, use -loop
--vsync video sync method
--async audio sync method
--adrift_threshold threshold audio drift threshold
--copyts copy timestamps
--copytb source copy input stream time base when stream copying
--shortest finish encoding within shortest input
--dts_delta_threshold threshold timestamp discontinuity delta threshold
--copyinkf copy initial non-keyframes
--q q use fixed quality scale (VBR)
--qscale q use fixed quality scale (VBR)
--streamid streamIndex:value set the value of an outfile streamid
--muxdelay seconds set the maximum demux-decode delay
--muxpreload seconds set the initial demux-decode delay
--fpre filename set options from indicated preset file
-
-Video options:
--vframes number set the number of video frames to record
--r rate set frame rate (Hz value, fraction or abbreviation)
--s size set frame size (WxH or abbreviation)
--aspect aspect set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
--bits_per_raw_sample number set the number of bits per raw sample
--croptop size Removed, use the crop filter instead
--cropbottom size Removed, use the crop filter instead
--cropleft size Removed, use the crop filter instead
--cropright size Removed, use the crop filter instead
--padtop size Removed, use the pad filter instead
--padbottom size Removed, use the pad filter instead
--padleft size Removed, use the pad filter instead
--padright size Removed, use the pad filter instead
--padcolor color Removed, use the pad filter instead
--vn disable video
--vcodec codec force video codec ('copy' to copy stream)
--sameq use same quantizer as source (implies VBR)
--same_quant use same quantizer as source (implies VBR)
--pass n select the pass number (1 or 2)
--passlogfile prefix select two pass log file name prefix
--vf filter list video filters
--b bitrate video bitrate (please use -b:v)
--dn disable data
-
-Advanced Video options:
--pix_fmt format set pixel format
--intra use only intra frames
--vdt n discard threshold
--rc_override override rate control override for specific intervals
--deinterlace deinterlace pictures
--psnr calculate PSNR of compressed frames
--vstats dump video coding statistics to file
--vstats_file file dump video coding statistics to file
--intra_matrix matrix specify intra matrix coeffs
--inter_matrix matrix specify inter matrix coeffs
--top top=1/bottom=0/auto=-1 field first
--dc precision intra_dc_precision
--vtag fourcc/tag force video tag/fourcc
--qphist show QP histogram
--force_fps force the selected framerate, disable the best supported framerate selection
--force_key_frames timestamps force key frames at specified timestamps
--vbsf video bitstream_filters deprecated
--vpre preset set the video options to the indicated preset
-
-Audio options:
--aframes number set the number of audio frames to record
--aq quality set audio quality (codec-specific)
--ar rate set audio sampling rate (in Hz)
--ac channels set number of audio channels
--an disable audio
--acodec codec force audio codec ('copy' to copy stream)
--vol volume change audio volume (256=normal)
--rmvol volume rematrix volume (as factor)
-
- */
-
-/*
- * //./ffmpeg -y -i test.mp4 -vframes 999999 -vf 'redact=blurbox.txt [out] [d], [d]nullsink' -acodec copy outputa.mp4
-
- //ffmpeg -v 10 -y -i /sdcard/org.witness.sscvideoproto/videocapture1042744151.mp4 -vcodec libx264
- //-b 3000k -s 720x480 -r 30 -acodec copy -f mp4 -vf 'redact=/data/data/org.witness.sscvideoproto/redact_unsort.txt'
- ///sdcard/org.witness.sscvideoproto/new.mp4
-
- //"-vf" , "redact=" + Environment.getExternalStorageDirectory().getPath() + "/" + PACKAGENAME + "/redact_unsort.txt",
-
-
- // Need to make sure this will create a legitimate mp4 file
- //"-acodec", "ac3", "-ac", "1", "-ar", "16000", "-ab", "32k",
-
-
- String[] ffmpegCommand = {"/data/data/"+PACKAGENAME+"/ffmpeg", "-v", "10", "-y", "-i", recordingFile.getPath(),
- "-vcodec", "libx264", "-b", "3000k", "-vpre", "baseline", "-s", "720x480", "-r", "30",
- //"-vf", "drawbox=10:20:200:60:red@0.5",
- "-vf" , "\"movie="+ overlayImage.getPath() +" [logo];[in][logo] overlay=0:0 [out]\"",
- "-acodec", "copy",
- "-f", "mp4", savePath.getPath()+"/output.mp4"};
-
-
-
-
-//ffmpeg -i source-video.avi -s 480x320 -vcodec mpeg4 -acodec aac -ac 1 -ar 16000 -r 13 -ab 32000 -aspect 3:2 output-video.mp4/
-
-
- */
-
-
-/* concat doesn't seem to work
-cmd.add("-i");
-
-StringBuffer concat = new StringBuffer();
-
-for (int i = 0; i < videos.size(); i++)
-{
- if (i > 0)
- concat.append("|");
-
- concat.append(out.path + '.' + i + ".wav");
-
-}
-
-cmd.add("concat:\"" + concat.toString() + "\"");
-*/
diff --git a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/ShellUtils.java b/src/android/android-ffmpeg-java/src/org/ffmpeg/android/ShellUtils.java
deleted file mode 100644
index d4426aa..0000000
--- a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/ShellUtils.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/* Copyright (c) 2009, Nathan Freitas, Orbot / The Guardian Project - http://openideals.com/guardian */
-/* See LICENSE for licensing information */
-package org.ffmpeg.android;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.util.StringTokenizer;
-
-
-import android.util.Log;
-
-public class ShellUtils {
-
- //various console cmds
- public final static String SHELL_CMD_CHMOD = "chmod";
- public final static String SHELL_CMD_KILL = "kill -9";
- public final static String SHELL_CMD_RM = "rm";
- public final static String SHELL_CMD_PS = "ps";
- public final static String SHELL_CMD_PIDOF = "pidof";
-
- public final static String CHMOD_EXE_VALUE = "700";
-
- public static boolean isRootPossible()
- {
-
- StringBuilder log = new StringBuilder();
-
- try {
-
- // Check if Superuser.apk exists
- File fileSU = new File("/system/app/Superuser.apk");
- if (fileSU.exists())
- return true;
-
- fileSU = new File("/system/bin/su");
- if (fileSU.exists())
- return true;
-
- //Check for 'su' binary
- String[] cmd = {"which su"};
- int exitCode = ShellUtils.doShellCommand(null,cmd, new ShellCallback ()
- {
-
- @Override
- public void shellOut(String msg) {
-
- //System.out.print(msg);
-
- }
-
- @Override
- public void processComplete(int exitValue) {
- // TODO Auto-generated method stub
-
- }
-
- }, false, true).exitValue();
-
- if (exitCode == 0) {
- logMessage("Can acquire root permissions");
- return true;
-
- }
-
- } catch (IOException e) {
- //this means that there is no root to be had (normally) so we won't log anything
- logException("Error checking for root access",e);
-
- }
- catch (Exception e) {
- logException("Error checking for root access",e);
- //this means that there is no root to be had (normally)
- }
-
- logMessage("Could not acquire root permissions");
-
-
- return false;
- }
-
-
- public static int findProcessId(String command)
- {
- int procId = -1;
-
- try
- {
- procId = findProcessIdWithPidOf(command);
-
- if (procId == -1)
- procId = findProcessIdWithPS(command);
- }
- catch (Exception e)
- {
- try
- {
- procId = findProcessIdWithPS(command);
- }
- catch (Exception e2)
- {
- logException("Unable to get proc id for: " + command,e2);
- }
- }
-
- return procId;
- }
-
- //use 'pidof' command
- public static int findProcessIdWithPidOf(String command) throws Exception
- {
-
- int procId = -1;
-
- Runtime r = Runtime.getRuntime();
-
- Process procPs = null;
-
- String baseName = new File(command).getName();
- //fix contributed my mikos on 2010.12.10
- procPs = r.exec(new String[] {SHELL_CMD_PIDOF, baseName});
- //procPs = r.exec(SHELL_CMD_PIDOF);
-
- BufferedReader reader = new BufferedReader(new InputStreamReader(procPs.getInputStream()));
- String line = null;
-
- while ((line = reader.readLine())!=null)
- {
-
- try
- {
- //this line should just be the process id
- procId = Integer.parseInt(line.trim());
- break;
- }
- catch (NumberFormatException e)
- {
- logException("unable to parse process pid: " + line,e);
- }
- }
-
-
- return procId;
-
- }
-
- //use 'ps' command
- public static int findProcessIdWithPS(String command) throws Exception
- {
-
- int procId = -1;
-
- Runtime r = Runtime.getRuntime();
-
- Process procPs = null;
-
- procPs = r.exec(SHELL_CMD_PS);
-
- BufferedReader reader = new BufferedReader(new InputStreamReader(procPs.getInputStream()));
- String line = null;
-
- while ((line = reader.readLine())!=null)
- {
- if (line.indexOf(' ' + command)!=-1)
- {
-
- StringTokenizer st = new StringTokenizer(line," ");
- st.nextToken(); //proc owner
-
- procId = Integer.parseInt(st.nextToken().trim());
-
- break;
- }
- }
-
-
-
- return procId;
-
- }
-
- public static int doShellCommand(String[] cmds, ShellCallback sc, boolean runAsRoot, boolean waitFor) throws Exception
- {
- return doShellCommand (null, cmds, sc, runAsRoot, waitFor).exitValue();
-
- }
-
- public static Process doShellCommand(Process proc, String[] cmds, ShellCallback sc, boolean runAsRoot, boolean waitFor) throws Exception
- {
-
-
- if (proc == null)
- {
- if (runAsRoot)
- proc = Runtime.getRuntime().exec("su");
- else
- proc = Runtime.getRuntime().exec("sh");
- }
-
- OutputStreamWriter out = new OutputStreamWriter(proc.getOutputStream());
-
- for (int i = 0; i < cmds.length; i++)
- {
- logMessage("executing shell cmd: " + cmds[i] + "; runAsRoot=" + runAsRoot + ";waitFor=" + waitFor);
-
- out.write(cmds[i]);
- out.write("\n");
- }
-
- out.flush();
- out.write("exit\n");
- out.flush();
-
- if (waitFor)
- {
-
- final char buf[] = new char[20];
-
- // Consume the "stdout"
- InputStreamReader reader = new InputStreamReader(proc.getInputStream());
- int read=0;
- while ((read=reader.read(buf)) != -1) {
- if (sc != null) sc.shellOut(new String(buf));
- }
-
- // Consume the "stderr"
- reader = new InputStreamReader(proc.getErrorStream());
- read=0;
- while ((read=reader.read(buf)) != -1) {
- if (sc != null) sc.shellOut(new String(buf));
- }
-
- proc.waitFor();
-
- }
-
- sc.processComplete(proc.exitValue());
-
- return proc;
-
- }
-
- public static void logMessage (String msg)
- {
-
- }
-
- public static void logException (String msg, Exception e)
- {
-
- }
-
- public interface ShellCallback
- {
- public void shellOut (String shellLine);
-
- public void processComplete (int exitValue);
- }
-}
diff --git a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/CropVideoFilter.java b/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/CropVideoFilter.java
deleted file mode 100644
index ab725cf..0000000
--- a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/CropVideoFilter.java
+++ /dev/null
@@ -1,134 +0,0 @@
-package org.ffmpeg.android.filters;
-
-public class CropVideoFilter extends VideoFilter {
-
- private String mOutWidth;
- private String mOutHeight;
- private String mX;
- private String mY;
-
- public CropVideoFilter (String width, String height, String x, String y)
- {
- mOutWidth = width;
- mOutHeight = height;
- mX = x;
- mY = y;
- }
-
- @Override
- public String getFilterString() {
-
- StringBuffer result = new StringBuffer();
-
- result.append("crop=");
-
- if (mOutWidth != null)
- result.append(mOutWidth).append(":");
-
- if (mOutHeight != null)
- result.append(mOutHeight).append(":");
-
- if (mX != null)
- result.append(mX).append(":");
-
- if (mY != null)
- result.append(mY).append(":");
-
- result.deleteCharAt(result.length()-1); //remove the last semicolon!
-
- return result.toString();
- }
-
-}
-
-/*
-Crop the input video to out_w:out_h:x:y:keep_aspect
-
-The keep_aspect parameter is optional, if specified and set to a non-zero value will force the output display aspect ratio to be the same of the input, by changing the output sample aspect ratio.
-
-The out_w, out_h, x, y parameters are expressions containing the following constants:
-
-‘x, y’
-the computed values for x and y. They are evaluated for each new frame.
-
-‘in_w, in_h’
-the input width and height
-
-‘iw, ih’
-same as in_w and in_h
-
-‘out_w, out_h’
-the output (cropped) width and height
-
-‘ow, oh’
-same as out_w and out_h
-
-‘a’
-same as iw / ih
-
-‘sar’
-input sample aspect ratio
-
-‘dar’
-input display aspect ratio, it is the same as (iw / ih) * sar
-
-‘hsub, vsub’
-horizontal and vertical chroma subsample values. For example for the pixel format "yuv422p" hsub is 2 and vsub is 1.
-
-‘n’
-the number of input frame, starting from 0
-
-‘pos’
-the position in the file of the input frame, NAN if unknown
-
-‘t’
-timestamp expressed in seconds, NAN if the input timestamp is unknown
-
-The out_w and out_h parameters specify the expressions for the width and height of the output (cropped) video. They are evaluated just at the configuration of the filter.
-
-The default value of out_w is "in_w", and the default value of out_h is "in_h".
-
-The expression for out_w may depend on the value of out_h, and the expression for out_h may depend on out_w, but they cannot depend on x and y, as x and y are evaluated after out_w and out_h.
-
-The x and y parameters specify the expressions for the position of the top-left corner of the output (non-cropped) area. They are evaluated for each frame. If the evaluated value is not valid, it is approximated to the nearest valid value.
-
-The default value of x is "(in_w-out_w)/2", and the default value for y is "(in_h-out_h)/2", which set the cropped area at the center of the input image.
-
-The expression for x may depend on y, and the expression for y may depend on x.
-
-Follow some examples:
-
-
-# crop the central input area with size 100x100
-crop=100:100
-
-# crop the central input area with size 2/3 of the input video
-"crop=2/3*in_w:2/3*in_h"
-
-# crop the input video central square
-crop=in_h
-
-# delimit the rectangle with the top-left corner placed at position
-# 100:100 and the right-bottom corner corresponding to the right-bottom
-# corner of the input image.
-crop=in_w-100:in_h-100:100:100
-
-# crop 10 pixels from the left and right borders, and 20 pixels from
-# the top and bottom borders
-"crop=in_w-2*10:in_h-2*20"
-
-# keep only the bottom right quarter of the input image
-"crop=in_w/2:in_h/2:in_w/2:in_h/2"
-
-# crop height for getting Greek harmony
-"crop=in_w:1/PHI*in_w"
-
-# trembling effect
-"crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(n/10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(n/7)"
-
-# erratic camera effect depending on timestamp
-"crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(t*10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(t*13)"
-
-# set x depending on the value of y
-"crop=in_w/2:in_h/2:y:10+10*sin(n/10)"
-*/
\ No newline at end of file
diff --git a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/DrawBoxVideoFilter.java b/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/DrawBoxVideoFilter.java
deleted file mode 100644
index 5d74a0a..0000000
--- a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/DrawBoxVideoFilter.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package org.ffmpeg.android.filters;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-
-import android.content.Context;
-import android.graphics.Bitmap;
-import android.graphics.Bitmap.Config;
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-
-public class DrawBoxVideoFilter extends OverlayVideoFilter {
-
- public int x;
- public int y;
- public int width;
- public int height;
- public String color;
-
- public DrawBoxVideoFilter (int x, int y, int width, int height, int alpha, String color, File tmpDir) throws Exception
- {
- this.x = x;
- this.y = y;
- this.width = width;
- this.height = height;
- this.color = color;
-
- if( alpha < 0 || alpha > 255 ) {
- throw new IllegalArgumentException("Alpha must be an integer betweeen 0 and 255");
- }
- Paint paint = new Paint();
- paint.setAlpha(alpha);
-
-
- Bitmap bitmap = Bitmap.createBitmap(width, height, Config.ARGB_8888);
- bitmap.eraseColor(Color.parseColor(color));
-
- Bitmap temp_box = Bitmap.createBitmap(width, height, Config.ARGB_8888);
- Canvas canvas = new Canvas(temp_box);
- canvas.drawBitmap(bitmap, 0, 0, paint);
-
- File outputFile;
- outputFile = File.createTempFile("box_"+width+height+color, ".png", tmpDir);
- FileOutputStream os = new FileOutputStream(outputFile);
- temp_box.compress(Bitmap.CompressFormat.PNG, 100, os);
- overlayFile = outputFile;
- xParam = Integer.toString(x);
- yParam = Integer.toString(y);
-
- }
-}
diff --git a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/DrawTextVideoFilter.java b/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/DrawTextVideoFilter.java
deleted file mode 100644
index 550d5d6..0000000
--- a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/DrawTextVideoFilter.java
+++ /dev/null
@@ -1,128 +0,0 @@
-package org.ffmpeg.android.filters;
-
-import java.io.File;
-
-public class DrawTextVideoFilter extends VideoFilter {
-
- private String mX;
- private String mY;
- private String mText;
- private String mFontColor;
- private int mFontSize;
- private File mFileFont;
- private int mBox;
- private String mBoxColor;
-
- public final static String X_CENTERED = "(w-text_w)/2";
- public final static String Y_CENTERED = "(h-text_h-line_h)/2";
-
- public final static String X_LEFT = "0";
- public final static String Y_BOTTOM = "(h-text_h-line_h)";
-
- public DrawTextVideoFilter (String text)
- {
- mX = X_CENTERED;
- mY = Y_CENTERED;
-
- mText = text;
- mFontColor = "white";
- mFontSize = 36;
- mFileFont = new File("/system/fonts/Roboto-Regular.ttf");
- if (!mFileFont.exists())
- mFileFont = new File("/system/fonts/DroidSerif-Regular.ttf");
-
- mBox = 1;
- mBoxColor = "black@0.5";//0x00000000@1
-
- }
-
- public DrawTextVideoFilter (String text, String x, String y, String fontColor, int fontSize, File fontFile, boolean showBox, String boxColor, String boxOpacity)
- {
- mX = x;
- mY = y;
-
- mText = text;
- mFontColor = fontColor;
- mFontSize = fontSize;
-
- mFileFont = fontFile;
-
- mBox = showBox? 1 : 0;
- mBoxColor = boxColor + '@' + boxOpacity;
-
- }
-
- @Override
- public String getFilterString() {
-
- StringBuffer result = new StringBuffer ();
- result.append("drawtext=");
- result.append("fontfile='").append(mFileFont.getAbsolutePath()).append("':");
- result.append("text='").append(mText).append("':");
- result.append("x=").append(mX).append(":");
- result.append("y=").append(mY).append(":");
- result.append("fontcolor=").append(mFontColor).append(":");
- result.append("fontsize=").append(mFontSize).append(":");
- result.append("box=").append(mBox).append(":");
- result.append("boxcolor=").append(mBoxColor);
-
- return result.toString();
- }
-
-}
-
-/*
- * //mdout.videoFilter = "drawtext=fontfile=/system/fonts/DroidSans.ttf: text='this is awesome':x=(w-text_w)/2:y=H-60 :fontcolor=white :box=1:boxcolor=0x00000000@1";
-
- File fontFile = new File("/system/fonts/Roboto-Regular.ttf");
- if (!fontFile.exists())
- fontFile = new File("/system/fonts/DroidSans.ttf");
-
- mdout.videoFilter = "drawtext=fontfile='" + fontFile.getAbsolutePath() + "':text='this is awesome':x=(main_w-text_w)/2:y=50:fontsize=24:fontcolor=white";
- */
-
-/**
-
-
- /system/fonts
-
-AndroidClock.ttf
-AndroidClock_Highlight.ttf
-AndroidClock_Solid.ttf
-AndroidEmoji.ttf
-AnjaliNewLipi-light.ttf
-Clockopia.ttf
-DroidNaskh-Regular-SystemUI.ttf
-DroidNaskh-Regular.ttf
-DroidSans-Bold.ttf
-DroidSans.ttf
-DroidSansArmenian.ttf
-DroidSansDevanagari-Regular.ttf
-DroidSansEthiopic-Regular.ttf
-DroidSansFallback.ttf
-DroidSansGeorgian.ttf
-DroidSansHebrew-Bold.ttf
-DroidSansHebrew-Regular.ttf
-DroidSansMono.ttf
-DroidSansTamil-Bold.ttf
-DroidSansTamil-Regular.ttf
-DroidSansThai.ttf
-DroidSerif-Bold.ttf
-DroidSerif-BoldItalic.ttf
-DroidSerif-Italic.ttf
-DroidSerif-Regular.ttf
-Lohit-Bengali.ttf
-Lohit-Kannada.ttf
-Lohit-Telugu.ttf
-MTLmr3m.ttf
-Roboto-Bold.ttf
-Roboto-BoldItalic.ttf
-Roboto-Italic.ttf
-Roboto-Light.ttf
-Roboto-LightItalic.ttf
-Roboto-Regular.ttf
-RobotoCondensed-Bold.ttf
-RobotoCondensed-BoldItalic.ttf
-RobotoCondensed-Italic.ttf
-RobotoCondensed-Regular.ttf
-*/
\ No newline at end of file
diff --git a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/FadeVideoFilter.java b/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/FadeVideoFilter.java
deleted file mode 100644
index 055f4e5..0000000
--- a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/FadeVideoFilter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.ffmpeg.android.filters;
-
-public class FadeVideoFilter extends VideoFilter {
-
- private String mAction; //in our out
- private int mStart;
- private int mLength;
-
- public FadeVideoFilter (String action, int start, int length)
- {
- mAction = action;
- mStart = start;
- mLength = length;
- }
-
- @Override
- public String getFilterString() {
-
- StringBuffer result = new StringBuffer ();
- result.append("fade=");
- result.append(mAction).append(':').append(mStart).append(':').append(mLength);
-
- return result.toString();
- }
-
-}
-
-///fade=in:0:25, fade=out:975:25
-
diff --git a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/OverlayVideoFilter.java b/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/OverlayVideoFilter.java
deleted file mode 100644
index 7a38291..0000000
--- a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/OverlayVideoFilter.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.ffmpeg.android.filters;
-
-import java.io.File;
-
-/**
- * @class overlay overlay one image or video on top of another
- *
- * @desc x is the x coordinate of the overlayed video on the main video,
- * y is the y coordinate. The parameters are expressions containing
- * the following parameters:
- *
- * main_w, main_h
- * main input width and height
- *
- * W, H
- * same as main_w and main_h
- *
- * overlay_w, overlay_h
- * overlay input width and height
- *
- * w, h
- * same as overlay_w and overlay_h
- *
- * @examples
- * draw the overlay at 10 pixels from the bottom right
- * corner of the main video.
- * main_w-overlay_w-10
- * main_h-overlay_h-10
- * draw the overlay in the bottom left corner of the input
- * 10
- * main_h-overlay_h-10 [out]
- *
- */
-public class OverlayVideoFilter extends VideoFilter {
-
- public File overlayFile;
- public String xParam, yParam;
-
- public OverlayVideoFilter() {
-
- }
-
- public OverlayVideoFilter (File fileMovieOverlay, int x, int y)
- {
- this.overlayFile = fileMovieOverlay;
- this.xParam = Integer.toString(x);
- this.yParam = Integer.toString(y);
- }
-
- public OverlayVideoFilter (File fileMovieOverlay, String xExpression, String yExpression)
- {
- this.overlayFile = fileMovieOverlay;
- this.xParam = xExpression;
- this.yParam = yExpression;
- }
-
- public String getFilterString ()
- {
- if (overlayFile != null)
- return "movie="
- + overlayFile.getAbsolutePath()
- + " [logo];[in][logo] "
- + "overlay=" + xParam + ":" + yParam
- + " [out]";
- else
- return "";
-
- }
-}
-
-//"\"movie="+ overlayImage.getPath() +" [logo];[in][logo] overlay=0:0 [out]\"",
\ No newline at end of file
diff --git a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/RedactVideoFilter.java b/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/RedactVideoFilter.java
deleted file mode 100644
index de94077..0000000
--- a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/RedactVideoFilter.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package org.ffmpeg.android.filters;
-
-import java.io.File;
-
-public class RedactVideoFilter extends VideoFilter {
-
- private File fileRedactList;
-
- public RedactVideoFilter (File fileRedactList)
- {
- this.fileRedactList = fileRedactList;
- }
-
- public String getFilterString ()
- {
- if (fileRedactList != null)
- return "redact=" + fileRedactList.getAbsolutePath();
- else
- return "";
-
- }
-}
-
-//redact=blurbox.txt [out] [d], [d]nullsink
-//"redact=" + Environment.getExternalStorageDirectory().getPath() + "/" + PACKAGENAME + "/redact_unsort.txt",
\ No newline at end of file
diff --git a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/TransposeVideoFilter.java b/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/TransposeVideoFilter.java
deleted file mode 100644
index d69012a..0000000
--- a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/TransposeVideoFilter.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package org.ffmpeg.android.filters;
-
-/*
- * works for video and images
- * 0 = 90CounterCLockwise and Vertical Flip (default)
-1 = 90Clockwise
-2 = 90CounterClockwise
-3 = 90Clockwise and Vertical Flip
- */
-public class TransposeVideoFilter extends VideoFilter {
-
- private int mTranspose = -1;
-
- public final static int NINETY_COUNTER_CLOCKWISE_AND_VERTICAL_FLIP = 0;
- public final static int NINETY_CLOCKWISE = 1;
- public final static int NINETY_COUNTER_CLOCKWISE = 2;
- public final static int NINETY_CLOCKWISE_AND_VERTICAL_FLIP = 3;
-
- public TransposeVideoFilter (int transpose)
- {
- mTranspose = transpose;
- }
-
- @Override
- public String getFilterString() {
-
- return "transpose=" + mTranspose;
- }
-
-}
diff --git a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/VideoFilter.java b/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/VideoFilter.java
deleted file mode 100644
index 20581f1..0000000
--- a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/filters/VideoFilter.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package org.ffmpeg.android.filters;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-public abstract class VideoFilter {
-
- public abstract String getFilterString ();
-
- public static String format (ArrayList listFilters)
- {
- StringBuffer result = new StringBuffer();
-
- Iterator it = listFilters.iterator();
- VideoFilter vf;
-
- while (it.hasNext())
- {
- vf = it.next();
- result.append(vf.getFilterString());
-
- if (it.hasNext())
- result.append(",");
- }
- return result.toString();
- }
-}
diff --git a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/ConcatTest.java b/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/ConcatTest.java
deleted file mode 100644
index 6b69962..0000000
--- a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/ConcatTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.ffmpeg.android.test;
-
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Locale;
-
-import net.sourceforge.sox.SoxController;
-
-import org.ffmpeg.android.Clip;
-import org.ffmpeg.android.FfmpegController;
-import org.ffmpeg.android.ShellUtils;
-
-public class ConcatTest {
-
- public static void test (String videoRoot, String fileTmpPath, String fileOut, double fadeLen) throws Exception
- {
- File fileTmp = new File(fileTmpPath);
- File fileAppRoot = new File("");
- File fileVideoRoot = new File(videoRoot);
-
- FfmpegController fc = new FfmpegController(null, fileTmp);
- SoxController sxCon = new SoxController(null, fileAppRoot, null);
-
- ArrayList listVideos = new ArrayList();
-
- String[] fileList = fileVideoRoot.list();
- for (String fileVideo : fileList)
- {
- if (fileVideo.endsWith("mp4"))
- {
- Clip clip = new Clip();
- clip.path = new File(fileVideoRoot,fileVideo).getCanonicalPath();
-
- fc.getInfo(clip);
-
- clip.duration = clip.duration-fadeLen;
- listVideos.add(clip);
-
-
- }
- }
-
- Clip clipOut = new Clip ();
- clipOut.path = new File(fileOut).getCanonicalPath();
-
- fc.concatAndTrimFilesMP4Stream(listVideos, clipOut, false, false, new ShellUtils.ShellCallback() {
-
- @Override
- public void shellOut(String shellLine) {
-
- System.out.println("fc>" + shellLine);
- }
-
- @Override
- public void processComplete(int exitValue) {
-
- if (exitValue < 0)
- System.err.println("concat non-zero exit: " + exitValue);
- }
- });
-
-
-
- }
-}
diff --git a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/ConvertTest.java b/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/ConvertTest.java
deleted file mode 100644
index a1d6178..0000000
--- a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/ConvertTest.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package org.ffmpeg.android.test;
-
-public class ConvertTest {
-
-}
diff --git a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/CrossfadeTest.java b/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/CrossfadeTest.java
deleted file mode 100644
index 5b11505..0000000
--- a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/CrossfadeTest.java
+++ /dev/null
@@ -1,204 +0,0 @@
-package org.ffmpeg.android.test;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.util.ArrayList;
-import java.util.Locale;
-
-import net.sourceforge.sox.CrossfadeCat;
-import net.sourceforge.sox.SoxController;
-
-import org.ffmpeg.android.Clip;
-import org.ffmpeg.android.FfmpegController;
-import org.ffmpeg.android.ShellUtils;
-
-public class CrossfadeTest {
-
-
- public static void test (String videoRoot, String fileTmpPath, String clipOutPath, double fadeLen) throws Exception
- {
- File fileTmp = new File(fileTmpPath);
- File fileAppRoot = new File("");
- File fileVideoRoot = new File(videoRoot);
-
- String fadeType = "l";
- int sampleRate = 22050;
- int channels = 1;
-
- FfmpegController ffmpegc = new FfmpegController (null, fileTmp);
-
- Clip clipOut = new Clip();
- clipOut.path = clipOutPath;
- clipOut.audioCodec="aac";
- clipOut.audioBitrate=56;
-
-
- ArrayList listVideos = new ArrayList();
-
- String[] fileList = fileVideoRoot.list();
- for (String fileVideo : fileList)
- {
- if (fileVideo.endsWith("mp4"))
- {
- Clip clip = new Clip();
- clip.path = new File(fileVideoRoot,fileVideo).getCanonicalPath();
- //clip.startTime = "00:00:03";
- //clip.duration = "00:00:02";
-
- ffmpegc.getInfo(clip);
-
- //System.out.println("clip " + fileVideo + " duration=" + clip.duration);
-
- listVideos.add(clip);
-
- }
- }
-
- //now add 1 second cross fade to each audio file and cat them together
- SoxController sxCon = new SoxController(null, fileAppRoot, new ShellUtils.ShellCallback() {
-
- @Override
- public void shellOut(String shellLine) {
-
- // System.out.println("sxCon> " + shellLine);
-
- }
-
- @Override
- public void processComplete(int exitValue) {
-
-
- if (exitValue != 0)
- {
- System.err.println("sxCon> EXIT=" + exitValue);
-
- RuntimeException re = new RuntimeException("non-zero exit: " + exitValue);
- re.printStackTrace();
- throw re;
- }
-
- }
- });
-
- ArrayList alAudio = new ArrayList();
-
- //convert each input file to a WAV so we can use Sox to process
- int wavIdx = 0;
-
- for (Clip mediaIn : listVideos)
- {
- if (new File(mediaIn.path).exists())
- {
-
- if (mediaIn.audioCodec == null)
- {
- //there is no audio track so let's generate silence
-
-
- }
- else
- {
- Clip audioOut = ffmpegc.convertToWaveAudio(mediaIn, new File(fileTmp, wavIdx+".wav").getCanonicalPath(),sampleRate,channels, new ShellUtils.ShellCallback() {
-
- @Override
- public void shellOut(String shellLine) {
-
- // System.out.println("convertToWav> " + shellLine);
-
- }
-
- @Override
- public void processComplete(int exitValue) {
-
- if (exitValue != 0)
- {
-
- System.err.println("convertToWav> EXIT=" + exitValue);
-
- RuntimeException re = new RuntimeException("non-zero exit: " + exitValue);
- re.printStackTrace();
- throw re;
- }
- }
- });
-
- alAudio.add(audioOut);
-
- /*
- float duration = (float) sxCon.getLength(new File(audioOut.path).getCanonicalPath());
-
- if (mediaIn.duration == null)
- {
- mediaIn.duration = String.format(Locale.US, "%f", duration);
- }*/
- ffmpegc.getInfo(mediaIn);
-
-
- wavIdx++;
- }
- }
- else
- {
- throw new FileNotFoundException(mediaIn.path);
- }
- }
-
- if (alAudio.size() > 0)
- {
- String fileOut = alAudio.get(0).path;
-
- System.out.println("mix length=" + sxCon.getLength(fileOut));
-
- for (int i = 1; i < alAudio.size(); i++)
- {
-
- File fileAdd = new File(alAudio.get(i).path);
-
- CrossfadeCat xCat = new CrossfadeCat(sxCon, fileOut, fileAdd.getCanonicalPath(), fadeLen, fileOut);
- xCat.start();
-
- fileAdd.deleteOnExit();
-
- System.out.println("mix length=" + sxCon.getLength(fileOut));
-
- }
-
-
- //1 second fade in and fade out, t = triangle or linear
- //String fadeLenStr = sxCon.formatTimePeriod(fadeLen);
-
-
-
- String fadeFileOut = sxCon.fadeAudio(fileOut, fadeType, fadeLen, sxCon.getLength(fileOut)-fadeLen, fadeLen);
-
- //now export the final file to our requested output format mOut.mimeType = AppConstants.MimeTypes.MP4_AUDIO;
-
- Clip mdFinalIn = new Clip();
- mdFinalIn.path = fadeFileOut;
-
-
- System.out.println ("final duration: " + sxCon.getLength(fadeFileOut));
-
- Clip exportOut = ffmpegc.convertTo3GPAudio(mdFinalIn, clipOut, new ShellUtils.ShellCallback() {
-
- @Override
- public void shellOut(String shellLine) {
-
- //System.out.println("convertTo3gp> " + shellLine);
- }
-
- @Override
- public void processComplete(int exitValue) {
-
- if (exitValue < 0)
- {
- RuntimeException re = new RuntimeException("non-zero exit: " + exitValue);
- re.printStackTrace();
- throw re;
- }
- }
- });
- }
- }
-
-}
diff --git a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/FilterTest.java b/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/FilterTest.java
deleted file mode 100644
index 93b7711..0000000
--- a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/FilterTest.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package org.ffmpeg.android.test;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-
-import org.ffmpeg.android.filters.CropVideoFilter;
-import org.ffmpeg.android.filters.DrawBoxVideoFilter;
-import org.ffmpeg.android.filters.DrawTextVideoFilter;
-import org.ffmpeg.android.filters.FadeVideoFilter;
-import org.ffmpeg.android.filters.TransposeVideoFilter;
-import org.ffmpeg.android.filters.VideoFilter;
-
-import android.app.Activity;
-import android.content.Context;
-
-public class FilterTest {
-
-
- public static void test (String title, String textColor, File fileFont, String boxColor, String opacity) throws Exception
- {
- ArrayList listFilters = new ArrayList();
-
- File fileDir = new File("tmp");
- fileDir.mkdir();
-
- int height = 480;
- int width = 720;
- int lowerThird = height / 3;
- DrawBoxVideoFilter vf = new DrawBoxVideoFilter(0,height-lowerThird,width,lowerThird,100,"blue",fileDir);
-
- DrawTextVideoFilter vfTitle =
- new DrawTextVideoFilter(title,
- DrawTextVideoFilter.X_CENTERED,DrawTextVideoFilter.Y_CENTERED,
- textColor,
- 38,
- fileFont,
- true,
- boxColor,
- opacity);
-
- float fps = 29.97f;
- int fadeTime = (int)(fps*3);
- //fades in first 3 seconds
- FadeVideoFilter vfFadeIn = new FadeVideoFilter("in",0,fadeTime);
-
- //fades out last 50 frames
- int totalFrames = (int)(14.37*29.97);
- FadeVideoFilter vfFadeOut = new FadeVideoFilter("out",totalFrames-fadeTime,fadeTime);
-
- //crops video in 100 pixels on each side
- CropVideoFilter vfCrop = new CropVideoFilter("in_w-100","in_h-100","100","100");
-
- //rotates video 90 degress clockwise
- TransposeVideoFilter vfTranspose = new TransposeVideoFilter(TransposeVideoFilter.NINETY_CLOCKWISE);
-
- listFilters.add(vfTranspose);
- listFilters.add(vfCrop);
- listFilters.add(vfTitle);
- listFilters.add(vfFadeIn);
- listFilters.add(vfFadeOut);
-
-
-
- fileDir.deleteOnExit();
- }
-}
diff --git a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/MixTest.java b/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/MixTest.java
deleted file mode 100644
index 4472471..0000000
--- a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/MixTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package org.ffmpeg.android.test;
-
-import java.io.File;
-
-import org.ffmpeg.android.Clip;
-import org.ffmpeg.android.FfmpegController;
-import org.ffmpeg.android.ShellUtils;
-
-public class MixTest {
-
- public static void test (String fileTmpPath, String videoClipPath, String audioClipPath, Clip clipOut) throws Exception
- {
- File fileTmp = new File(fileTmpPath);
- File fileAppRoot = new File("");
-
- FfmpegController fc = new FfmpegController(null, fileTmp);
-
- Clip clipVideo = new Clip(videoClipPath);
- //fc.getInfo(clipVideo);
-
- Clip clipAudio = new Clip(audioClipPath);
- //fc.getInfo(clipAudio);
-
- fc.combineAudioAndVideo(clipVideo, clipAudio, clipOut, new ShellUtils.ShellCallback() {
-
- @Override
- public void shellOut(String shellLine) {
- // System.out.println("MIX> " + shellLine);
- }
-
- @Override
- public void processComplete(int exitValue) {
-
- if (exitValue != 0)
- System.err.println("concat non-zero exit: " + exitValue);
- }
- });
-
- }
-
-}
diff --git a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/Tests.java b/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/Tests.java
deleted file mode 100644
index a714fcf..0000000
--- a/src/android/android-ffmpeg-java/src/org/ffmpeg/android/test/Tests.java
+++ /dev/null
@@ -1,81 +0,0 @@
-package org.ffmpeg.android.test;
-
-import java.io.File;
-
-import org.ffmpeg.android.Clip;
-
-public class Tests {
-
- /**
- * @param args
- */
- public static void main(String[] args) throws Exception {
-
-
-
- String[] testpaths = {
- // "/home/n8fr8/Desktop/smcampmovie",
- // "/home/n8fr8/Desktop/smcampmovie2",
- "/home/n8fr8/Desktop/sm3"
-
- };
-
- int idx = -1;
-
- double fadeLen = 1;
-
- for (String testpath : testpaths)
- {
- idx++;
-
- System.out.println ("************************************");
- System.out.println ("CONCAT TEST: " + testpath);
-
- File fileVideoOutput = new File("/tmp/test" + idx + ".mp4");
- fileVideoOutput.delete();
-
- ConcatTest.test(testpath, "/tmp", fileVideoOutput.getCanonicalPath(), fadeLen);
-
- if (!fileVideoOutput.exists())
- {
- System.out.println("FAIL!! > output file did not get created: " + fileVideoOutput.getCanonicalPath());
- continue;
- }
- else
- System.out.println("SUCCESS!! > " + fileVideoOutput.getCanonicalPath());
-
- System.out.println ("************************************");
- System.out.println ("CROSSFADE TEST: " + testpath);
-
- File fileAudioOutput = new File("/tmp/test" + idx + ".3gp");
- fileAudioOutput.delete();
- CrossfadeTest.test(testpath, "/tmp", fileAudioOutput.getCanonicalPath(),fadeLen);
- if (!fileAudioOutput.exists())
- {
- System.out.println("FAIL!! > output file did not get created: " + fileAudioOutput.getCanonicalPath());
- continue;
- }
- else
- System.out.println("SUCCESS!! > " + fileAudioOutput.getCanonicalPath());
-
- System.out.println ("************************************");
- System.out.println ("MIX TEST: " + testpath);
-
- File fileMix = new File("/tmp/test" + idx + "mix.mp4");
- fileMix.delete();
- Clip clipMixOut = new Clip(fileMix.getCanonicalPath());
- MixTest.test("/tmp", fileVideoOutput.getCanonicalPath(), fileAudioOutput.getCanonicalPath(), clipMixOut);
- if (!fileMix.exists())
- System.out.println("FAIL!! > output file did not get created: " + fileMix.getCanonicalPath());
- else
- System.out.println("SUCCESS!! > " + fileMix.getCanonicalPath());
-
-
- }
-
- System.out.println("**********************");
- System.out.println("*******FIN**********");
-
- }
-
-}
diff --git a/src/android/build.gradle b/src/android/build.gradle
new file mode 100644
index 0000000..caabc88
--- /dev/null
+++ b/src/android/build.gradle
@@ -0,0 +1,16 @@
+
+repositories{
+ jcenter()
+ maven { url "https://jitpack.io" }
+}
+
+dependencies {
+ compile 'com.github.ergovia-mobile:android-transcoder:v0.1.10R_ergovia'
+}
+
+android {
+ packagingOptions {
+ exclude 'META-INF/NOTICE'
+ exclude 'META-INF/LICENSE'
+ }
+}
diff --git a/www/VideoEditor.js b/www/VideoEditor.js
index 5817c4f..fa5abb6 100644
--- a/www/VideoEditor.js
+++ b/www/VideoEditor.js
@@ -47,17 +47,9 @@ VideoEditor.prototype.getVideoInfo = function(success, error, options) {
};
VideoEditor.prototype.execFFMPEG = function(success, error, options) {
- var self = this;
- var win = function(result) {
- if (typeof result.progress !== 'undefined') {
- if (typeof options.progress === 'function') {
- options.progress(result.progress);
- }
- } else {
- success(result);
- }
- };
- exec(win, error, pluginName, 'execFFMPEG', [options]);
+ var msg = 'execFFMPEG has been removed as of v1.1.0';
+ console.log(msg);
+ error(msg);
};
VideoEditor.prototype.execFFPROBE = function(success, error, options) {