Clip mediaIn = new Clip();
int numberOfClips = 10; List<Clip> clips = new ArrayList<Clip>(); for (int i = 0; i < numberOfClips; i++) { Clip clip = new Clip(); clips.add(clip); }
FfmpegController fc = new FfmpegController(fileTmp, fileAppRoot); final Clip out = new Clip("compiled.mp4");
Clip clipIn= new Clip(); FfmpegController ffmpegController = new FfmpegController(getApplicationContext(), getApplicationContext().getCacheDir()); clipIn.path = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES)+"/Video/cvplay.avi").getCanonicalPath();
@Test public void testClipArray() throws Exception { // Lets assume our array contains 2 elements Clip[] clipArray = new Clip[2]; clipArray[0] = new Clip("First", "Clip"); clipArray[1] = new Clip("Second", "Clip"); // Lets retrieve 2nd object (with index: 1) Clip secondObject = clipArray[1]; System.out.println(secondObject.getAuthor()); System.out.println(secondObject.getTitle()); }
public Clip convert(Clip mediaIn, String outPath, ShellCallback sc) throws Exception { ArrayList<String> cmd = new ArrayList<String>(); Clip mediaOut = new Clip(); String mediaPath = mediaIn.path; cmd = new ArrayList<String>(); cmd.add(mFfmpegBin); cmd.add("-i"); cmd.add(mediaPath); cmd.add("-b:a"); cmd.add("128k"); mediaOut.path = outPath; cmd.add(mediaOut.path); execFFMPEG(cmd, sc); return mediaOut; // this is not importatnt because file will be put in outPath }
Clip clip = new Clip(); clip.path = new File(videoSrcPath).getCanonicalPath(); ffmpegController.getInfo(clip); listVideos.add(clip); Clip clip2 = new Clip(); clip2.path = new File(videoSrcPath2).getCanonicalPath(); ffmpegController.getInfo(clip2); listVideos.add(clip2); Clip clip3 = new Clip(); clip3.path = new File(videoSrcPath3).getCanonicalPath(); ffmpegController.getInfo(clip3); listVideos.add(clip3); Clip clipOut = new Clip(); clipOut.path = new File(outputFilePath).getCanonicalPath();
public Clip convert (Clip mediaIn, String outPath, ShellCallback sc) throws Exception { ArrayList<String> cmd = new ArrayList<String>(); cmd.add(mFfmpegBin); cmd.add("-y"); cmd.add("-i"); cmd.add(new File(mediaIn.path).getCanonicalPath()); if (mediaIn.startTime != null) { cmd.add("-ss"); cmd.add(mediaIn.startTime); } if (mediaIn.duration != -1) { cmd.add("-t"); cmd.add(String.format(Locale.US,"%f",mediaIn.duration)); } Clip mediaOut = new Clip(); File fileOut = new File(outPath); mediaOut.path = fileOut.getCanonicalPath(); cmd.add(mediaOut.path); execFFMPEG(cmd, sc); return mediaOut; }
/** * Used to create a new instance of the node. This routine is called * by <code>cloneTree</code> to duplicate the current node. * @param forceDuplicate when set to <code>true</code>, causes the * <code>duplicateOnCloneTree</code> flag to be ignored. When * <code>false</code>, the value of each node's * <code>duplicateOnCloneTree</code> variable determines whether * NodeComponent data is duplicated or copied. * * @see Node#cloneTree * @see Node#cloneNode * @see Node#duplicateNode * @see NodeComponent#setDuplicateOnCloneTree */ @Override public Node cloneNode(boolean forceDuplicate) { Clip c = new Clip(); c.duplicateNode(this, forceDuplicate); return c; }