Creating video from images

I am trying to make video from images
here is my program
import java.awt.Dimension;
import java.awt.Image;
import javax.media.*;
import javax.media.control.*;
import javax.media.protocol.*;
import javax.media.protocol.DataSource;
import javax.media.datasink.*;
import javax.media.format.VideoFormat;
import javax.media.util.ImageToBuffer;
import java.io.*;
import java.util.*;
*For AVI files, each frame must have a time stamp set. See the following message from the jmf-interest archives for details:
http://archives.java.sun.com/cgi-bin/wa?A2=ind0107&L=jmf-interest&P=R34660
public class AviCreator implements ControllerListener, DataSinkListener
private boolean doIt(
int width,
int height,
int frameRate,
MediaLocator outML)
     File folder=new File("c:/images1");     
          File [] files=folder.listFiles();
ImageDataSource ids = new ImageDataSource(width, height, frameRate,files);
Processor p;
try
System.err.println(
"- create processor for the image datasource ...");
p = Manager.createProcessor(ids);
catch (Exception e)
System.err.println(
"Yikes! Cannot create a processor from the data source.");
return false;
p.addControllerListener(this);
// Put the Processor into configured state so we can set
// some processing options on the processor.
p.configure();
if (!waitForState(p, Processor.Configured))
System.err.println("Failed to configure the processor.");
return false;
// Set the output content descriptor to QuickTime.
p.setContentDescriptor(
new ContentDescriptor(FileTypeDescriptor.MSVIDEO));
// Query for the processor for supported formats.
// Then set it on the processor.
TrackControl tcs[] = p.getTrackControls();
Format f[] = tcs[0].getSupportedFormats();
if (f == null || f.length <= 0)
System.err.println(
"The mux does not support the input format: "
+ tcs[0].getFormat());
return false;
tcs[0].setFormat(f[0]);
System.err.println("Setting the track format to: " + f[0]);
// We are done with programming the processor. Let's just
// realize it.
p.realize();
if (!waitForState(p, Processor.Realized))
System.err.println("Failed to realize the processor.");
return false;
// Now, we'll need to create a DataSink.
DataSink dsink;
if ((dsink = createDataSink(p, outML)) == null)
System.err.println(
"Failed to create a DataSink for the given output MediaLocator: "
+ outML);
return false;
dsink.addDataSinkListener(this);
fileDone = false;
System.err.println("start processing...");
// OK, we can now start the actual transcoding.
try
p.start();
dsink.start();
catch (IOException e)
System.err.println("IO error during processing");
return false;
// Wait for EndOfStream event.
waitForFileDone();
// Cleanup.
try
dsink.close();
catch (Exception e)
p.removeControllerListener(this);
System.err.println("...done processing.");
return true;
* Create the DataSink.
private DataSink createDataSink(Processor p, MediaLocator outML)
DataSource ds;
if ((ds = p.getDataOutput()) == null)
System.err.println(
"Something is really wrong: the processor does not have an output DataSource");
return null;
DataSink dsink;
try
System.err.println("- create DataSink for: " + outML);
dsink = Manager.createDataSink(ds, outML);
dsink.open();
catch (Exception e)
System.err.println("Cannot create the DataSink: " + e);
return null;
return dsink;
private Object waitSync = new Object();
private boolean stateTransitionOK = true;
* Block until the processor has transitioned to the given state.
* Return false if the transition failed.
private boolean waitForState(Processor p, int state)
synchronized (waitSync)
try
while (p.getState() < state && stateTransitionOK)
waitSync.wait();
catch (Exception e)
return stateTransitionOK;
* Controller Listener.
public void controllerUpdate(ControllerEvent evt)
if (evt instanceof ConfigureCompleteEvent
|| evt instanceof RealizeCompleteEvent
|| evt instanceof PrefetchCompleteEvent)
synchronized (waitSync)
stateTransitionOK = true;
waitSync.notifyAll();
else if (evt instanceof ResourceUnavailableEvent)
synchronized (waitSync)
stateTransitionOK = false;
waitSync.notifyAll();
else if (evt instanceof EndOfMediaEvent)
evt.getSourceController().stop();
evt.getSourceController().close();
private Object waitFileSync = new Object();
private boolean fileDone = false;
private boolean fileSuccess = true;
* Block until file writing is done.
private boolean waitForFileDone()
synchronized (waitFileSync)
try
while (!fileDone)
waitFileSync.wait();
catch (Exception e)
return fileSuccess;
* Event handler for the file writer.
public void dataSinkUpdate(DataSinkEvent evt)
if (evt instanceof EndOfStreamEvent)
synchronized (waitFileSync)
fileDone = true;
waitFileSync.notifyAll();
else if (evt instanceof DataSinkErrorEvent)
synchronized (waitFileSync)
fileDone = true;
fileSuccess = false;
waitFileSync.notifyAll();
public static String[] createParam()
     File folder=new File("c:/images1");     
     String [] files=folder.list();
     String param[]=new String[files.length+8];          
param[0]="-w";
param[1]="400";
param[2]="-h";
param[3]="300";
param[4]="-f";
param[5]="1";
param[6]="-o";
param[7]="file:/c:/images/abc.avi";          
     for(int i=8;i<files.length+8;i++)     
          param="file:/c:/images1/"+files[i-8];
return param;     
public static void main(String args1[]) throws Exception
//jpegCreator.main(null);
//if (args.length == 0)
// prUsage();
          //String [] args ={"-w","320" ,"-h","240", "-f","1", "-o", "file:/c:/images/abc.mov","file:/c:/images/surya_jo1.jpg", "file:/c:/temp/flower1_jpg.jpg" };
          String [] args=createParam();
// Parse the arguments.
int i = 0;
int width = -1, height = -1, frameRate = 1;
Vector inputFiles = new Vector();
inputFiles.add("file:/c:/images/surya_jo1.jpg");
inputFiles.add("file:/c:/images/flower1_jpg.jpg");
String outputURL = null;
width = 128;
height = 128;
outputURL = "file:/c:/images/abc.avi";
// Generate the output media locators.
MediaLocator oml;
if ((oml = createMediaLocator(outputURL)) == null)
System.err.println("Cannot build media locator from: " + outputURL);
System.exit(0);
AviCreator imageToMovie = new AviCreator();
imageToMovie.doIt(width, height, frameRate, oml);
System.exit(0);
static void prUsage()
System.err.println(
"Usage: java JpegImagesToMovie -w <width> -h <height> -f <frame rate> -o <output URL> <input JPEG file 1> <input JPEG file 2> ...");
System.exit(-1);
* Create a media locator from the given string.
private static MediaLocator createMediaLocator(String url)
MediaLocator ml;
if (url.indexOf(":") > 0 && (ml = new MediaLocator(url)) != null)
return ml;
if (url.startsWith(File.separator))
if ((ml = new MediaLocator("file:" + url)) != null)
return ml;
else
String file =
"file:" + System.getProperty("user.dir") + File.separator + url;
if ((ml = new MediaLocator(file)) != null)
return ml;
return null;
// Inner classes.
* A DataSource to read from a list of JPEG image files and
* turn that into a stream of JMF buffers.
* The DataSource is not seekable or positionable.
/************************************************* private class ImageDataSource extends PullBufferDataSource
private ImageSourceStream streams[];
ImageDataSource(int width, int height, int frameRate)
streams = new ImageSourceStream[1];
streams[0] = new ImageSourceStream(width, height, frameRate);
public void setLocator(MediaLocator source)
public MediaLocator getLocator()
return null;
public String getContentType()
return ContentDescriptor.RAW;
public void connect()
public void disconnect()
public void start()
public void stop()
public PullBufferStream[] getStreams()
return streams;
public Time getDuration()
System.out.println("dur is " + streams[0].nextImage);
//return new Time(1000000000);
return DURATION_UNKNOWN;
public Object[] getControls()
return new Object[0];
public Object getControl(String type)
return null;
* A DataSource to read from a list of JPEG image files or
* java.awt.Images, and
* turn that into a stream of JMF buffers.
* The DataSource is not seekable or positionable.
private static class ImageDataSource extends PullBufferDataSource {
private final Time durTime;
private final PullBufferStream[] streams = new JpegSourceStream[1];
* Constructor for creating movies out of jpegs
ImageDataSource(int width, int height, int frameRate, File[] jpegFiles) {
streams[0] = new JpegSourceStream(width, height, frameRate, jpegFiles);
this.durTime = new Time(jpegFiles.length / frameRate);
* Constructor for creating movies out of Images
* NOTE - this is all done IN MEMORY, so you'd better have enough
/*ImageDataSource(int width, int height, int frameRate, Image[] images) {
streams[0] = new AWTImageSourceStream(width, height, frameRate, images);
this.durTime = new Time(images.length / frameRate);
public void setLocator(MediaLocator source) {
public MediaLocator getLocator() {
return null;
* Content type is of RAW since we are sending buffers of video
* frames without a container format.
public String getContentType() {
return ContentDescriptor.RAW;
public void connect() {
public void disconnect() {
public void start() {
public void stop() {
* Return the ImageSourceStreams.
public PullBufferStream[] getStreams() {
return streams;
public Time getDuration() {
return durTime;
public Object[] getControls() {
return new Object[0];
public Object getControl(String type) {
return null;
* The jpeg-based source stream to go along with ImageDataSource.
private static class JpegSourceStream implements PullBufferStream {
private final File[] jpegFiles;
private final int width, height;
private final VideoFormat videoFormat;
private int nextImage = 0; // index of the next image to be read.
private boolean ended = false;
// Bug fix from Forums - next one line
long seqNo = 0;
public JpegSourceStream(int width, int height, int frameRate, File[] jpegFiles) {
this.width = width;
this.height = height;
this.jpegFiles = jpegFiles;
this.videoFormat = new VideoFormat(VideoFormat.JPEG,
new Dimension(width, height),
Format.NOT_SPECIFIED,
Format.byteArray,
(float)frameRate);
* We should never need to block assuming data are read from files.
public boolean willReadBlock() {
return false;
* This is called from the Processor to read a frame worth
* of video data.
public void read(final Buffer buf) {
try {
// Check if we've finished all the frames.
if (nextImage >= jpegFiles.length) {
// We are done. Set EndOfMedia.
System.out.println("Done reading all images.");
buf.setEOM(true);
buf.setOffset(0);
buf.setLength(0);
ended = true;
return;
File imageFile = jpegFiles[nextImage];
nextImage++;
System.out.println(" - reading image file: " + imageFile);
// Open a random access file for the next image.
RandomAccessFile raFile = new RandomAccessFile(imageFile, "r");
byte[] data = (byte[])buf.getData();
// Check to see the given buffer is big enough for the frame.
if (data == null || data.length < raFile.length()) {
// allocate larger buffer
data = new byte[(int)raFile.length()];
buf.setData(data);
// Read the entire JPEG image from the file.
raFile.readFully(data, 0, (int)raFile.length());
System.out.println(" read " + raFile.length() + " bytes.");
// Bug fix for AVI files from Forums ( next 3 lines).
long time = (long) (seqNo * (1000 / videoFormat.getFrameRate()) * 1000000);
buf.setTimeStamp(time);
buf.setSequenceNumber(seqNo++);
buf.setOffset(0);
buf.setLength((int)raFile.length());
buf.setFormat(videoFormat);
buf.setFlags(buf.getFlags() | buf.FLAG_KEY_FRAME);
// Close the random access file.
raFile.close();
} catch (Exception e) {
// it's important to print the stack trace here because the
// sun class that calls this method silently ignores
// any IOExceptions that get thrown
e.printStackTrace();
throw new RuntimeException(e);
* Return the format of each video frame. That will be JPEG.
public Format getFormat() {
return videoFormat;
public ContentDescriptor getContentDescriptor() {
return new ContentDescriptor(ContentDescriptor.RAW);
public long getContentLength() {
return LENGTH_UNKNOWN;
public boolean endOfStream() {
return ended;
public Object[] getControls() {
return new Object[0];
public Object getControl(String type) {
return null;
* The source stream to go along with ImageDataSource.
/*************************************************************** class ImageSourceStream implements PullBufferStream
final int width, height;
final VideoFormat format;
// Bug fix from Forums - next two lines
float frameRate;
long seqNo = 0;
int nextImage = 0; // index of the next image to be read.
boolean ended = false;
public ImageSourceStream(int width, int height, int frameRate)
this.width = width;
this.height = height;
// Bug fix from Forums (next line)
this.frameRate = (float) frameRate;
final int rMask = 0x00ff0000;
final int gMask = 0x0000FF00;
final int bMask = 0x000000ff;
format =
new javax.media.format.RGBFormat(
new Dimension(width, height),
Format.NOT_SPECIFIED,
Format.intArray,
frameRate,
32,
rMask,
gMask,
bMask);
public boolean willReadBlock()
return false;
public void read(Buffer buf) throws IOException
// Check if we've finished all the frames.
if (nextImage >= 100)
// We are done. Set EndOfMedia.
System.err.println("Done reading all images.");
buf.setEOM(true);
buf.setOffset(0);
buf.setLength(0);
ended = true;
return;
nextImage++;
int data[] = null;
// Check the input buffer type & size.
if (buf.getData() instanceof int[])
data = (int[]) buf.getData();
// Check to see the given buffer is big enough for the frame.
if (data == null || data.length < width * height)
data = new int[width * height];
buf.setData(data);
// Bug fix from Forums ( next 3 lines).
long time = (long) (seqNo * (1000 / frameRate) * 1000000);
buf.setTimeStamp(time);
buf.setSequenceNumber(seqNo++);
java.awt.Color clr = java.awt.Color.red;
if (nextImage > 30)
clr = java.awt.Color.GREEN;
if (nextImage > 60)
clr = java.awt.Color.BLUE;
for (int i = 0; i < width * height; i++)
// TODO - figure what the guy was trying to do here.
data[i] = clr.getRGB();
buf.setOffset(0);
buf.setLength(width * height);
buf.setFormat(format);
buf.setFlags(buf.getFlags() | Buffer.FLAG_KEY_FRAME);
public Format getFormat()
return format;
public ContentDescriptor getContentDescriptor()
return new ContentDescriptor(ContentDescriptor.RAW);
public long getContentLength()
return 0;
public boolean endOfStream()
return ended;
public Object[] getControls()
return new Object[0];
public Object getControl(String type)
return null;
* The java.awt.Image-based source stream to go along with ImageDataSource.
* Not sure yet if this class works.
private static class AWTImageSourceStream implements PullBufferStream {
private final Image[] images;
private final int width, height;
private final VideoFormat videoFormat;
private int nextImage = 0; // index of the next image to be read.
private boolean ended = false;
// Bug fix from Forums - next one line
private long seqNo = 0;
public AWTImageSourceStream(int width, int height, int frameRate, Image[] images) {
this.width = width;
this.height = height;
this.images = images;
// not sure if this is correct, especially the VideoFormat value
this.videoFormat = new VideoFormat(VideoFormat.RGB,
new Dimension(width, height),
Format.NOT_SPECIFIED,
Format.byteArray,
(float)frameRate);
* We should never need to block assuming data are read from files.
public boolean willReadBlock() {
return false;
* This is called from the Processor to read a frame worth
* of video data.
public void read(final Buffer buf) throws IOException {
try {
// Check if we've finished all the frames.
if (nextImage >= images.length) {
// We are done. Set EndOfMedia.
System.out.println("Done reading all images.");
buf.setEOM(true);
buf.setOffset(0);
buf.setLength(0);
ended = true;
return;
Image image = images[nextImage];
nextImage++;
// Open a random access file for the next image.
//RandomAccessFile raFile = new RandomAccessFile(imageFile, "r");
Buffer myBuffer = ImageToBuffer.createBuffer(image, videoFormat.getFrameRate());
buf.copy(myBuffer);
// Bug fix for AVI files from Forums ( next 3 lines).
long time = (long) (seqNo * (1000 / videoFormat.getFrameRate()) * 1000000);
buf.setTimeStamp(time);
buf.setSequenceNumber(seqNo++);
//buf.setOffset(0);
//buf.setLength((int)raFile.length());
//buf.setFormat(videoFormat);
//buf.setFlags(buf.getFlags() | buf.FLAG_KEY_FRAME);
} catch (Exception e) {
// it's important to print the stack trace here because the
// sun class that calls this method silently ignores
// any Exceptions that get thrown
e.printStackTrace();
throw new RuntimeException(e);
* Return the format of each video frame.
public Format getFormat() {
return videoFormat;
public ContentDescriptor getContentDescriptor() {
return new ContentDescriptor(ContentDescriptor.RAW);
public long getContentLength() {
return LENGTH_UNKNOWN;
public boolean endOfStream() {
return ended;
public Object[] getControls() {
return new Object[0];
public Object getControl(String type) {
return null;
bit i am getting following exception at run time
1
2
3
4
5
6
- create processor for the image datasource ...
Setting the track format to: JPEG
- create DataSink for: file:/c:/images/abc.mov
start processing...
- reading image file: file:/c:/images/surya_jo1.jpg
- reading image file: file:/c:/images/flower1_jpg.jpg
Done reading all images.
Exception in thread "JMF thread: SendEventQueue: com.sun.media.processor.unknown.Handler" java.lang.NullPointerException
at com.sun.media.multiplexer.video.QuicktimeMux.writeVideoSampleDescription(QuicktimeMux.java:936)
at com.sun.media.multiplexer.video.QuicktimeMux.writeSTSD(QuicktimeMux.java:925)
at com.sun.media.multiplexer.video.QuicktimeMux.writeSTBL(QuicktimeMux.java:905)
at com.sun.media.multiplexer.video.QuicktimeMux.writeMINF(QuicktimeMux.java:806)
at com.sun.media.multiplexer.video.QuicktimeMux.writeMDIA(QuicktimeMux.java:727)
at com.sun.media.multiplexer.video.QuicktimeMux.writeTRAK(QuicktimeMux.java:644)
at com.sun.media.multiplexer.video.QuicktimeMux.writeMOOV(QuicktimeMux.java:582)
at com.sun.media.multiplexer.video.QuicktimeMux.writeFooter(QuicktimeMux.java:519)
at com.sun.media.multiplexer.BasicMux.close(BasicMux.java:142)
at com.sun.media.BasicMuxModule.doClose(BasicMuxModule.java:172)
at com.sun.media.PlaybackEngine.doClose(PlaybackEngine.java:872)
at com.sun.media.BasicController.close(BasicController.java:261)
at com.sun.media.BasicPlayer.doClose(BasicPlayer.java:229)
at com.sun.media.BasicController.close(BasicController.java:261)
at JpegImagesToMovie.controllerUpdate(JpegImagesToMovie.java:196)
at com.sun.media.BasicController.dispatchEvent(BasicController.java:1254)
at com.sun.media.SendEventQueue.processEvent(BasicController.java:1286)
at com.sun.media.util.ThreadedEventQueue.dispatchEvents(ThreadedEventQueue.java:65)
at com.sun.media.util.ThreadedEventQueue.run(ThreadedEventQueue.java:92)
plz help me
thanks in advance

Step 1) Copy that code into a .java file
Step 2) Compile it
Step 3) Run it
Step 4) Look at the output
Step 5 (optional)) If it didn't work, post a specific question about the code, and use [co[b]de] tags.

Similar Messages

  • Illustrator script to create symbols from images in folder

    Time to give back to the community...
    Here is a script I recently devised to bulk create symbols from images in a folder. Tested with Illustrator CC 2014.
    // Import Folder's Files as Symbols - Illustrator CC script
    // Description: Creates symbols from images in the designated folder into current document
    // Author     : Oscar Rines (oscarrines (at) gmail.com)
    // Version    : 1.0.0 on 2014-09-21
    // Reused code from "Import Folder's Files as Layers - Illustrator CS3 script"
    // by Nathaniel V. KELSO ([email protected])
    #target illustrator
    function getFolder() {
      return Folder.selectDialog('Please select the folder to be imported:', Folder('~'));
    function symbolExists(seekInDoc, seekSymbol) {
        for (var j=0; j < seekInDoc.symbols.length; j++) {
            if (seekInDoc.symbols[j].name == seekSymbol) {
                return true;
        return false;
    function importFolderContents(selectedFolder) {
        var activeDoc = app.activeDocument;     //Active object reference
      // if a folder was selected continue with action, otherwise quit
      if (selectedFolder) {
            var newsymbol;              //Symbol object reference
            var placedart;              //PlacedItem object reference
            var fname;                  //File name
            var sname;                  //Symbol name
            var symbolcount = 0;        //Number of symbols added
            var templayer = activeDoc.layers.add(); //Create a new temporary layer
            templayer.name = "Temporary layer"
            var imageList = selectedFolder.getFiles(); //retrieve files in the folder
            // Create a palette-type window (a modeless or floating dialog),
            var win = new Window("palette", "SnpCreateProgressBar", {x:100, y:100, width:750, height:310});
            win.pnl = win.add("panel", [10, 10, 740, 255], "Progress"); //add a panel to contain the components
            win.pnl.currentTaskLabel = win.pnl.add("statictext", [10, 18, 620, 33], "Examining: -"); //label indicating current file being examined
            win.pnl.progBarLabel = win.pnl.add("statictext", [620, 18, 720, 33], "0/0"); //progress bar label
            win.pnl.progBarLabel.justify = 'right';
            win.pnl.progBar = win.pnl.add("progressbar", [10, 35, 720, 60], 0, imageList.length-1); //progress bar
            win.pnl.symbolCount = win.pnl.add("statictext", [10, 70, 710, 85], "Symbols added: 0"); //label indicating number of symbols created
            win.pnl.symbolLabel = win.pnl.add("statictext", [10, 85, 710, 100], "Last added symbol: -"); //label indicating name of the symbol created
            win.pnl.errorListLabel = win.pnl.add("statictext", [10, 110, 720, 125], "Error log:"); //progress bar label
            win.pnl.errorList = win.pnl.add ("edittext", [10, 125, 720, 225], "", {multiline: true, scrolling: true}); //errorlist
            //win.pnl.errorList.graphics.font = ScriptUI.newFont ("Arial", "REGULAR", 7);
            //win.pnl.errorList.graphics.foregroundColor = win.pnl.errorList.graphics.newPen(ScriptUIGraphics.PenType.SOLID_COLOR, [1, 0, 0, 1], 1);
            win.doneButton = win.add("button", [640, 265, 740, 295], "OK"); //button to dispose the panel
            win.doneButton.onClick = function () //define behavior for the "Done" button
                win.close();
            win.center();
            win.show();
            //Iterate images
            for (var i = 0; i < imageList.length; i++) {
                win.pnl.currentTaskLabel.text = 'Examining: ' + imageList[i].name; //update current file indicator
                win.pnl.progBarLabel.text = i+1 + '/' + imageList.length; //update file count
                win.pnl.progBar.value = i+1; //update progress bar
                if (imageList[i] instanceof File) {         
                    fname = imageList[i].name.toLowerCase(); //convert file name to lowercase to check for supported formats
                    if( (fname.indexOf('.eps') == -1) &&
                        (fname.indexOf('.png') == -1)) {
                        win.pnl.errorList.text += 'Skipping ' + imageList[i].name + '. Not a supported type.\r'; //log error
                        continue; // skip unsupported formats
                    else {
                        sname = imageList[i].name.substring(0, imageList[i].name.lastIndexOf(".") ); //discard file extension
                        // Check for duplicate symbol name;
                        if (symbolExists(activeDoc, sname)) {
                            win.pnl.errorList.text += 'Skipping ' + imageList[i].name + '. Duplicate symbol for name: ' + sname + '\r'; //log error
                        else {
                            placedart = activeDoc.placedItems.add(); //get a reference to a new placedItem object
                            placedart.file = imageList[i]; //link the object to the image on disk
                            placedart.name =  sname; //give the placed item a name
                            placedart.embed();   //make this a RasterItem
                            placedart = activeDoc.rasterItems.getByName(sname); //get a reference to the newly created raster item
                            newsymbol = activeDoc.symbols.add(placedart); //add the raster item to the symbols                 
                            newsymbol.name = sname; //name the symbol
                            symbolcount++; //update the count of symbols created
                            placedart.remove(); //remove the raster item from the canvas
                            win.pnl.symbolCount.text = 'Symbols added: ' + symbolcount; //update created number of symbols indicator
                            win.pnl.symbolLabel.text = 'Last added symbol: ' + sname; //update created symbol indicator
                else {
                    win.pnl.errorList.text += 'Skipping ' + imageList[i].name + '. Not a regular file.\r'; //log error
                win.update(); //required so pop-up window content updates are shown
            win.pnl.currentTaskLabel.text = ''; //clear current file indicator
            // Final verdict
            if (symbolcount >0) {
                win.pnl.symbolLabel.text = 'Symbol library changed. Do not forget to save your work';
            else {
                win.pnl.symbolLabel.text = 'No new symbols added to the library';
            win.update(); //update window contents
            templayer.remove(); //remove the temporary layer
        else {
            alert("Action cancelled by user");
    if ( app.documents.length > 0 ) {
        importFolderContents( getFolder() );
    else{
        Window.alert("You must open at least one document.");

    Thank you, nice job & I am looking forward to trying it out!

  • How to setup Compressor to create video from multiple sequences within FCP?

    I am wondering how I can set compressor up to create videos from multiple sequences within FCP. When I click file -> export - > compressor for a sequence and go into the program, it doesn't allow me to go back into FCP. I just get a spinning beach ball. Is there no way to set it up so I can prep a bunch of fcp sequences within compressor and then click submit and walk away? I have over 100 sequences that need to be exported so it would be a little difficult to do this one at a time. Thanks.

    Batch processing
    *Step one. Make sure everything in every sequence is rendered.*
    *Step two. Make a folder somewhere and name it something relevant.*
    *Step three. In FCP select all you sequences that you want to compress and right click (option), choose Batch Export from the contextual menu.*
    *Step three point one. In the batch export window click on settings and choose the folder you made in step two for the destination. Make sure Make Self-Contained is not check and include Audio and Video.*
    *Step four. Click export in the batch window.*
    Once that is done you can close FCP.
    Now in Compressor
    *Step five. Make a setting that will give you the output that you want (mpeg2, AC3, h.264, whatever). Make a destination for where you want to save the output.*
    *Step six. Make a droplet from the settings you made in step five.*
    You can quit Compressor now.
    *Step seven. Take the files that you batch exported from FCP in step three and four and drop them on the droplet you made in step six.*
    o| TOnyTOny |o

  • Can you export created videos from Premiere Pro Trial to youtube?

    Is it posible to export a created video from a trial of Premiere Pro to social media networks such as youtube or vimeo?

    Yes.
    Mylenium

  • How to render a video from image sequence with custom frame rate?

    Dear all,
    For a project i would like to create a video from 47 images with a custom frame rate. To achieve this i take the following steps in Photoshop CS6 extended:
    1) File -> Open...
    2) Select the first image and select " image sequence ". All images have the same size (1280 x 1261 px) and are numbered correctly.
    3) Click open
    4) Frame Rate: Custom 3 fps
    5) File -> Export -> Render Video... -> Render
    6) Play the video with VLC. The video shows a still image of the first image.
    If i choose a frame rate of 10 fps, then there is no problem. VLC plays the video as expected.
    Is there a other way to create a video from 47 images and choose a custom frame rate? Or what am i doing wrong?

    Seen this SO thread?
    http://stackoverflow.com/questions/6691136/how-to-convert-series-of-images-into- movie-in-ios

  • Coverting video from images without using JMF.

    Dear All,
    I want to convert video from sequence of images.
    I have used JMF sample for doing the same.It works pretty fine.
    But I want to do same without using JMF.
    Do anyone here used another libraries like FFMPEG for Java or Theora to achieve same.
    If you have any idea about it, please reply.
    Yours Sincerely,
    Ashish Nijai

    I've done this in the past by calling out to ffmpeg as an external application. There's nothing Java specific in that other than the act of calling an external binary - for which the ProcessBuilder API should be your starting point. If you have questions about ProcessBuilder start a new thread in "Java Programming" or "New To Java" but remember to google first - it's a common topic.
    A bit of Googling suggests that there might be some JNI wrappers for ffmpeg too.
    Note that on the project where I used ffmpeg we eventually went over to running it in batches from a cron script with no Java components at all.

  • Create thumnail from image

    Can we create thumbnail from a image in Oracle 11g database?

    The image is stored as blob secure file in oracle 11g database.
    What is the difference between blob and ORDImage?
    Can I create thumbnail from a image and store it in the database?

  • Creating MP4 Videos from Images - Resolution Issue

    Currently I am using the Media Foundation SDK to convert Images to a H.264 video using the following example from Microsoft.
    https://msdn.microsoft.com/en-us/library/windows/desktop/ff819477(v=vs.85).aspx
    I have encountered an Issue when adjusting the MF_MT_FRAME_SIZE of the media type object used for input,  it would seem that if the resolution is higher then monitor the computer is connected to the call to SetInputMediaType for the IMFSinkWriter object
    returns an HRESULT error code 0xc00d36b4.  The only differences in my code from the example is the following constants defined at the top.
    const UINT32 VIDEO_WIDTH = 2048;
    const UINT32 VIDEO_HEIGHT = 1088;
    const GUID VIDEO_ENCODING_FORMAT = MFVideoFormat_H264;
    Any help in the matter would be appreciated.

    @Loki_
    What if you use the preloaded file commander? 
    "I'd rather be hated for who I am, than loved for who I am not." Kurt Cobain (1967-1994)

  • Javascript to create vector from image and save as eps

    Hi,
    I started writing a script which open all images in a folder and i need to turn those into vectors.
    How do i write the following in JavaScript:
    Open the JPG file
    Select the image layer/object
    Create a vector from the image using the Image Trace for high fidelity 
    Reduce the new vector objec size by %50.
    save as eps
    any help with any of the stages would be very helpful.
    thank you

    PERFECT!!!!!!
    This is exactly what I was going to build.  No need to create when it is already done.
    Thank you very much.
    -Mike

  • Unusual Bug when creating pdf from image files

    Hi I have a very mindboggling problem which I cant seem to get my head around.
    basically I am trying to create a pdf using a large amount of image files, these images are scans of pages of a book. so I have been trying to create a pdf file from these images, and everytime i try, it all looks ok except for one page which comes up smaller in size than the rest which is a big problem and very unusual. If I change the view of acrobat so that it shows two pages at a time then this is clearly visable where one page is normal and the page next to it is like a third of the size. Ive checked the image file properties for that page and they are more or less the same as the rest, the dimensions of the image file too, but when I add it into a PDF it seems to shrink in size, any ideas as to why? any help would be much appreciated! (and I hope what I said made sense lol )
    Thanks
    Nav

    Hi Davew000
    Can you please tell the steps you are doing to create the PDF ?
    Thanks,
    Tanvi

  • Unable to create cd from Image file

    I downloaded the Solaris 8 for Intel, unzipped the files. I have been unsuccessful creating an image file for the file sol-8-1_01-fcs-bin-ia-v1. I have tried various CD writing applications.
    I was able to create images from the other files.
    Thanks

    You are not supposed to create an image file from the unzipped data. These unzipped files are image
    files! You just have to rename them using the proper file extension so that your CD-R burning software
    recognizes them as cd image files. (common extension are .ISO or .RAW; check with your CD recording
    software)

  • Creating BufferedImage from Image

    I've figured out one way to create a BufferedImage from an Image, but I'm sure it's not the best way.Image im = Toolkit.getDefaultToolkit().getImage(files.getAbsolutePath());
    JLabel jl = new JLabel(new ImageIcon(im));
    BufferedImage bim = new BufferedImage(im.getWidth(null), im.getHeight(null), BufferedImage.TYPE_BYTE_INDEXED);
    Graphics g = bim.getGraphics();
    jl.paint(bim.getGraphics());
    This works, but I'm sure there has to be a better/easier way. Any suggestions?
    Thanks,
    m

    close, the best way is this...
    public BufferedImage createBufferedImage(Image img)
    BufferedImage bimg = new BufferedImage(img.getWidth(null),img.getHeight(null),BufferedImage.TYPE_INT_RGB);//or whatever type is appropriate
    bimg.getGraphics().drawImage(img,0,0,null);
    return bimg;
    }

  • Video from image files

    How can I make a short video for watching in my iPod 30GB from some image files?
    Thank you

    ckaker_kid says:
    1. take a screen shot of every slide.
    2. either put the image files into the ipod separtely or make a short video with them
    I think from .png files
    Thank you

  • Creating video from DVD files?

    Someone sent me a DVD of some video he shot for a show that I was in. Is there a way to convert the files from the DVD to a video file that I can edit and post on Facebook?

    If for whatever reason you do not like the other programs that have been suggested, another option is MPEG Streamclip. You can Google that and download it, but you may need to then buy (for $20) MPEG-2 on the Apple site to do what you have planned. I have used it for the almost the same purposes you have. I have uploaded over 70 videos to YouTube, some almost 10 minutes long. I use MPEG Streamclip to process the video, Export it to Quicktime, Import it into iMovie, and Share it to YouTube.
    If you go that route, you can search and find other posts, including ones from me, that provide detailed settings to make for that.

  • Any applications to batch create qts from image sequences.

    I've got about 15 tiff image sequences that I've got to creates qts of. QTPro does a great job, but it would be great if I could just drag all the folders to an application that would do all the grunt work for me (hey I know, I'm a lazy so and so and this kind of task happens every month or so).

    I am sure this is something an Apple Script could do.
    I had someone create something for me recently to do a similar thing. Afraid I cant help, you would need to ask arounda to see if someone can compile one for you
    theres also an Apple Script discussion here:
    http://discussions.apple.com/forum.jspa?forumID=724
    Gary

Maybe you are looking for