JpegImagesToMovie NoDataSinkException problems

Hi,
I'm using Sun's JpegImagesToMovie to convert a sequence of jpeg images to quicktime .mov format. The problem i am having seems to be related to the input images, and output location being in a different location to the JpegImagesToMovie class file.
When i have the input images and output location in the same directory, or lower in the directory structure, as the class file there is no problem and it does the job that is required.
However, when these locations are in a different area - either in the parent directory of the class file or any other folder on the system, a NoDataSinkException is called and a .mov file is not produced.
Anyone got any ideas as to what could be the problem?

I had a similar problem. Change the program parameters so that "file:" precedes the output argument and "file:" does not precede the image (jpg) files. Clearly just a work around.
Example:
-w 320 -h 240 -f 1 -o file:C:\test.mov C:\src\myimage1.jpg C:\src\myimage2.jpg C:\src\myimage3.jpg
The only problem i have found is that when playing the .mov file, i get a corrupted data message. But when i play it, i see the images i put into the movie. The last one however, gets painted over top of the second last image. Haven't solved that yet.

Similar Messages

  • JpegImagesToMovie problem

    Hello ,
    I wanted to convert my sequence MotionJEPG to video type file . ( avi /mov ) . For this goal I search and I found peace of code JpegImagesToMovie.java which so many people had been used . But Wen I try to run it give me error which i not sure how i can solve it . I need help for it .Please have look and let me know .
    944
    946
    - create processor for the image datasource ...
    Setting the track format to: JPEG
    - create DataSink for: file://c:/camJ/helllotest.mov
    start processing...
    - reading image file: file:/c:\cam1\image100.jpg
    - reading image file: file:/c:\cam1\image101.jpg
    - reading image file: file:/c:\cam2\image95.jpg
    - reading image file: file:/c:\cam2\image96.jpg
    - reading image file: file:/c:\cam2\image97.jpg
    - reading image file: file:/c:\cam2\image98.jpg
    - reading image file: file:/c:\cam2\image99.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 LiveCameraVedioRecord.JpegImagesToMovie.controllerUpdate(JpegImagesToMovie.java:198)
         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)

    Sounds like a problem with creating the output file... does the "camJ" folder exist?

  • Problem with using JMF audio over a network

    Hiya, I'm using IBM JMF code but I'm having problems trying to get it transmit data from the MediaTransmitter to the MediaPlayerFrame.
    I'm kinda new to JMF so I assume I'm missing something basis for why this doesn't work.
    Any help would be greatly appreciated.
    MediaPlayerFrame
    import javax.media.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    * An instance of the MediaPlayerFrame may be used to display any media
    * recognized * by JMF.  This is intended to be a very simple GUI example,
    * displaying all possible controls for the given media type.
    public class MediaPlayerFrame extends JFrame {
         * The frame title.
        private static final String FRAME_TITLE = "developerWorks JMF Tutorial " +
            "Media Player";
         * The panel title of the main control panel.
        private static final String CONTROL_PANEL_TITLE = "Control Panel";
        // location and size variables for the frame.
        private static final int LOC_X = 100;
        private static final int LOC_Y = 100;
        private static final int HEIGHT = 500;
        private static final int WIDTH = 500;
         private final static long serialVersionUID = 1;
         * The current player.
        private Player player = null;
         * The tabbed pane for displaying controls.
        private JTabbedPane tabPane = null;
         * Create an instance of the media frame.  No data will be displayed in the
         * frame until a player is set.
        public MediaPlayerFrame() {         
            super(FRAME_TITLE);
            System.out.println("MediaPlayerFrame");
            setLocation(LOC_X, LOC_Y);
            setSize(WIDTH, HEIGHT);
            tabPane = new JTabbedPane();
            getContentPane().add(tabPane);
            /* adds a window listener so that the player may be cleaned up before
               the frame actually closes.
            addWindowListener(new WindowAdapter() {
                                   * Invoked when the frame is being closed.
                                  public void windowClosing(WindowEvent e) {
                                      closeCurrentPlayer(); 
                                      /* Closing this frame will cause the entire
                                         application to exit.  When running this
                                         example as its own application, this is
                                         fine - but in general, a closing frame
                                         would not close the entire application. 
                                         If this behavior is not desired, comment
                                         out the following line:
                                      System.exit(0);
         * Creates the main panel.  This panel will contain the following if they
         * exist:
         * - The visual component: where any visual data is displayed, i.e. a
         * movie uses this control to display the video.
         * - The gain component:   where the gain/volume may be changed.  This
         * is often * contained in the control panel component (below.)
         * - The control panel component: time and some extra info regarding
         * the media.
        private JPanel createMainPanel() {
            System.out.println("createMainPanel");
            JPanel mainPanel = new JPanel();
            GridBagLayout gbl = new GridBagLayout();
            GridBagConstraints gbc = new GridBagConstraints();
            mainPanel.setLayout(gbl);
            boolean visualComponentExists = false;
            // if the visual component exists, add it to the newly created panel.
            if (player.getVisualComponent() != null) {
                visualComponentExists = true;
                gbc.gridx = 0;
                gbc.gridy = 0;
                gbc.weightx = 1;
                gbc.weighty = 1;
                gbc.fill = GridBagConstraints.BOTH;
                mainPanel.add(player.getVisualComponent(), gbc);
            // if the gain control component exists, add it to the new panel.
            if ((player.getGainControl() != null) &&
                (player.getGainControl().getControlComponent() != null)) {
                gbc.gridx = 1;
                gbc.gridy = 0;
                gbc.weightx = 0;
                gbc.weighty = 1;
                gbc.gridheight = 2;
                gbc.fill = GridBagConstraints.VERTICAL;
                mainPanel.add(player.getGainControl().getControlComponent(), gbc);
            // Add the control panel component if it exists (it should exists in
            // all cases.)
            if (player.getControlPanelComponent() != null) {
                gbc.gridx = 0;
                gbc.gridy = 1;
                gbc.weightx = 1;
                gbc.gridheight = 1;
                if (visualComponentExists) {
                    gbc.fill = GridBagConstraints.HORIZONTAL;
                    gbc.weighty = 0;
                } else {
                    gbc.fill = GridBagConstraints.BOTH;
                    gbc.weighty = 1;
                mainPanel.add(player.getControlPanelComponent(), gbc);
            return mainPanel;
         * Sets the media locator.  Setting this to a new value effectively
         * discards any Player which may have already existed.
         * @param locator the new MediaLocator object.
         * @throws IOException indicates an IO error in opening the media.
         * @throws NoPlayerException indicates no player was found for the
         * media type.
         * @throws CannotRealizeException indicates an error in realizing the
         * media file or stream.
        public void setMediaLocator(MediaLocator locator) throws IOException,
            NoPlayerException, CannotRealizeException {
              System.out.println("setMediaLocator: " +locator);
            // create a new player with the new locator.  This will effectively
            // stop and discard any current player.
            setPlayer(Manager.createRealizedPlayer(locator));       
         * Sets the player reference.  Setting this to a new value will discard
         * any Player which already exists.  It will also refresh the contents
         * of the pane with the components for the new player.  A null value will
         * stop the discard the current player and clear the contents of the
         * frame.
        public void setPlayer(Player newPlayer) {      
            System.out.println("setPlayer");
            // close the current player
            closeCurrentPlayer();          
            player = newPlayer;
            // refresh the tabbed pane.
            tabPane.removeAll();
            if (player == null) return;
            // add the new main panel
            tabPane.add(CONTROL_PANEL_TITLE, createMainPanel());
            // add any other controls which may exist in the player.  These
            // controls should already contain a name which is used in the
            // tabbed pane.
            Control[] controls = player.getControls();
            for (int i = 0; i < controls.length; i++) {
                if (controls.getControlComponent() != null) {
    tabPane.add(controls[i].getControlComponent());
    * Stops and closes the current player if one exists.
    private void closeCurrentPlayer() {
    if (player != null) {
    player.stop();
    player.close();
    * Prints a usage message to System.out for how to use this class
    * through the command line.
    public static void printUsage() {
    System.out.println("Usage: java MediaPlayerFrame mediaLocator");
    * Allows the user to run the class through the command line.
    * Only one argument is allowed, which is the media locator.
    public static void main(String[] args) {
    try {
    if (args.length == 1) {
    MediaPlayerFrame mpf = new MediaPlayerFrame();
    /* The following line creates a media locator using the String
    passed in through the command line. This version should
    be used when receiving media streamed over a network.
    mpf.setMediaLocator(new MediaLocator(args[0]));
    /* the following line may be used to create and set the media
    locator from a simple file name. This works fine when
    playing local media. To play media streamed over a
    network, you should use the previous setMediaLocator()
    line and comment this one out.
    //mpf.setMediaLocator(new MediaLocator(
    // new File(args[0]).toURL()));
    mpf.setVisible(true);
    } else {
    printUsage();
    } catch (Throwable t) {
    t.printStackTrace();
    MediaTransmitter
    import javax.media.*;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import javax.media.format.*;
    import java.io.IOException;
    import java.io.File;
    * Creates a new media transmitter.  The media transmitter may be used to
    * transmit a data source over a network.
    public class MediaTransmitter {
         * Output locator - this is the broadcast address for the media.
        private MediaLocator mediaLocator = null;
         * The data sink object used to broadcast the results from the processor
         * to the network.
        private DataSink dataSink = null;
         * The processor used to read the media from a local file, and produce an
         * output stream which will be handed to the data sink object for
         * broadcast.
        private Processor mediaProcessor = null;
         * The track formats used for all data sources in this transmitter.  It is
         * assumed that this transmitter will always be associated with the same
         * RTP stream format, so this is made static.
        private static final Format[] FORMATS = new Format[] {
            new AudioFormat(AudioFormat.MPEG_RTP)};
         * The content descriptor for this transmitter.  It is assumed that this
         * transmitter always handles the same type of RTP content, so this is
         * made static.
        private static final ContentDescriptor CONTENT_DESCRIPTOR =
            new ContentDescriptor(ContentDescriptor.RAW_RTP);
         * Creates a new transmitter with the given outbound locator.
        public MediaTransmitter(MediaLocator locator) {
            mediaLocator = locator;
         * Starts transmitting the media.
        public void startTransmitting() throws IOException {
            // start the processor
            mediaProcessor.start();
            // open and start the data sink
            dataSink.open();
            dataSink.start();
         * Stops transmitting the media.
        public void stopTransmitting() throws IOException {
            // stop and close the data sink
            dataSink.stop();
            dataSink.close();
            // stop and close the processor
            mediaProcessor.stop();
            mediaProcessor.close();
         * Sets the data source.  This is where the transmitter will get the media
         * to transmit.
        public void setDataSource(DataSource ds) throws IOException,
            NoProcessorException, CannotRealizeException, NoDataSinkException {
            /* Create the realized processor.  By calling the
               createRealizedProcessor() method on the manager, we are guaranteed
               that the processor is both configured and realized already. 
               For this reason, this method will block until both of these
               conditions are true.  In general, the processor is responsible
               for reading the file from a file and converting it to
               an RTP stream.
            mediaProcessor = Manager.createRealizedProcessor(
                new ProcessorModel(ds, FORMATS, CONTENT_DESCRIPTOR));
            /* Create the data sink.  The data sink is used to do the actual work
               of broadcasting the RTP data over a network.
            dataSink = Manager.createDataSink(mediaProcessor.getDataOutput(),
                                              mediaLocator);
         * Prints a usage message to System.out for how to use this class
         * through the command line.
        public static void printUsage() {
            System.out.println("Usage: java MediaTransmitter mediaLocator " +
                               "mediaFile");
            System.out.println("  example: java MediaTransmitter " +
                "rtp://192.168.1.72:49150/audio mysong.mp3");
            System.out.println("  example: java MediaTransmitter " +
                "rtp://192.168.1.255:49150/audio mysong.mp3");
         * Allows the user to run the class through the command line.
         * Only two arguments are allowed; these are the output media
         * locator and the mp3 audio file which will be broadcast
         * in the order.
        public static void main(String[] args) {
            try {
                if (args.length == 2) {
                    MediaLocator locator = new MediaLocator(args[0]);
                    MediaTransmitter transmitter = new MediaTransmitter(locator);
                    System.out.println("-> Created media locator: '" +
                                       locator + "'");
                    /* Creates and uses a file reference for the audio file,
                       if a url or any other reference is desired, then this
                       line needs to change.
                    File mediaFile = new File(args[1]);
                    DataSource source = Manager.createDataSource(
                        new MediaLocator(mediaFile.toURL()));
                    System.out.println("-> Created data source: '" +
                                       mediaFile.getAbsolutePath() + "'");
                    // set the data source.
                    transmitter.setDataSource(source);
                    System.out.println("-> Set the data source on the transmitter");
                    // start transmitting the file over the network.
                    transmitter.startTransmitting();
                    System.out.println("-> Transmitting...");
                    System.out.println("   Press the Enter key to exit");
                    // wait for the user to press Enter to proceed and exit.
                    System.in.read();
                    System.out.println("-> Exiting");
                    transmitter.stopTransmitting();
                } else {
                    printUsage();
            } catch (Throwable t) {
                t.printStackTrace();
            System.exit(0);

    Okay, here's the it copied out.
    Media Transmitter
    C:\John\Masters Project\Java\jmf1\MediaPlayer>java MediaTransmitter rtp://127.0.
    0.1:2000/audio it-came-upon.mp3
    -> Created media locator: 'rtp://127.0.0.1:2000/audio'
    -> Created data source: 'C:\John\Masters Project\Java\jmf1\MediaPlayer\it-came-u
    pon.mp3'
    streams is [Lcom.sun.media.multiplexer.RawBufferMux$RawBufferSourceStream;@1decd
    ec : 1
    sink: setOutputLocator rtp://127.0.0.1:2000/audio
    -> Set the data source on the transmitter
    -> Transmitting...
       Press the Enter key to exit
    MediaPlayerFrame
    C:\John\Masters Project\Java\jmf1\MediaPlayer>java MediaPlayerFrame rtp://127.0.
    0.1:2000/audio
    MediaPlayerFrame
    setMediaLocator: rtp://127.0.0.1:2000/audioAs I said, it just kinda stops there, what it should be doing is opening the MediaPlayer.
    "MediaPlayerFrame" and "setMediaLocator: rtp://127.0.0.1:2000/audio" are just print outs I used to track here the code is getting to.

  • Problem with videoformat

    Hi everybody,
    I'm new in JMF and I'm trying to develop an aplication to capture webcam video stream on a computer end send it to another computer by the Lan.
    I write the program and when I try to execute it some messages appear. These messages can be :
    CannotRealizedException : unable to provide all requested trakcs
    or
    Class: com.ibm.media.codec.video.h263.NativeEncoder@ece65
    can only encode in sizes: 128x96, 176x144, 352x288.
    streams is [Lcom.sun.media.multiplexer.RawBufferMux$RawBufferSourceStream;@19209ea : 1
    sink: setOutputLocator rtp://192.168.2.11:5004/video
    BUILD STOPPED (total time: 1 minute 12 seconds)
    I know that these error messages are due to this line :   static final Format[] lesformats = new Format[]{new VideoFormat(VideoFormat.YUV)};//new VideoFormat(VideoFormat.JPEG_RTP)
    Please, is there someone who can help me to resolve this for I can continue? I'm trying to find a solution a week ago.Find the code below
    Regards
    P.S : another problem is that when I want to see formats supported by the webcam,the size of the vector is 0.
    package servstream;
    import java.awt.Dimension;
    import java.io.IOException;
    import java.net.InetAddress;
    import java.net.UnknownHostException;
    import javax.media.protocol.DataSource;
    //import javax.annotation.processing.Processor;
    import javax.media.*;
    import javax.media.format.VideoFormat;
    import javax.media.protocol.ContentDescriptor;
    import javax.media.ProcessorModel;
    import java.lang.*;
    import java.util.Vector;
    //import javax.media.Processor;
    * @author Jean Charles
    public class ServStream
    private static String port = "22224";
    private static InetAddress addrip;
    static final Format[] lesformats = new Format[]{new VideoFormat(VideoFormat.YUV)};//new VideoFormat(VideoFormat.JPEG_RTP)
    static final ContentDescriptor descripteur = new ContentDescriptor(ContentDescriptor.RAW_RTP);
    private static Vector vectlistperiph;
    * @param args the command line arguments
    public static void main(String[] args) throws IOException, NoDataSourceException, NoProcessorException, CannotRealizeException, NoDataSinkException
    MediaLocator inputmdl = new MediaLocator("vfw://0");
    vectlistperiph = CaptureDeviceManager.getDeviceList(null);
         if (vectlistperiph == null)
         System.out.println("List vector is null");
         if (vectlistperiph.size() == 0)
         System.out.println("List vector size is 0");
         System.exit(0);
    DataSource dsrce = (DataSource) Manager.createDataSource(inputmdl);
    ProcessorModel procmod = new ProcessorModel(dsrce,lesformats,descripteur);
    try
    Processor myprocessor = Manager.createRealizedProcessor(procmod);
    MediaLocator outputmdl = new MediaLocator("rtp://192.168.2.11:5004/video");
    DataSink destin = Manager.createDataSink(myprocessor.getDataOutput(),outputmdl);
    destin.open();
    destin.start();
    catch(CannotRealizeException e)
    System.out.println("Erreur "+ e);
    System.exit(0);
    }

    Hi, Beverley.  
    Thank you for visiting Apple Support Communities.  
    I understand that you are unable to trim clips using iMovie.  I would need a little more information on how you were attempting to trim a clip to provide a better answer.  However, make sure you have the movie project open and are selecting the clip that you wish to trim as this will activate the clip trimmer.  
    Trim clips
    -Jason H.  

  • Problem with  M-JPEG by using JMF and JPEGCodec .

    Hi, there,
    I want to implement a M-JPEG using JMF and JPEGCodec, is that possible?(I already been trapped)
    My problem is I have a video clip which is a AVI file, the video format is following:
    Video format: RGB, 160x120, FrameRate=14.9, Length=57600, 24-bit, Masks=3:2:1, P
    ixelStride=3, LineStride=480, Flipped.
    I already convered a frame to an Image object(video format with JPEG and CVID doesn't work) ,
    I can also convert this Image back as a Buffer, It works fine with me .But to use JPEGCodec( provided by com.sun.image.codec.jpeg ) I need to convert an Image to a BufferedImage, I use the following defination:
    BufferedImage   bImage = new BufferedImage(frameImage.getWidth(null), frameImage.getHeigh(null),BufferedImage.TYPE_INT_RGB); It seems work, But when I use JPEGImageEncoder to encoder this bImage and save as a jpg file,
    everything is black .
    I also need to cast BufferedImage to an Image: frameImage = (Image) bImage; then I convert frameImage back to Buffer.My video clip still running , but every frame now became black .
    can someone help me? thanks in advance.

    I solved this problem . But I met a new problem.
    I converted the above video clip into a JPEG and I want to create a DataSink for it. the messege is:
    Video format: JPEG, 160x120, FrameRate=12.0, Length=3574
    - set content descriptor to: AVI
    - set track format to: JPEG
    Cannot transcode any track to: JPEG
    Cannot create the DataSink: javax.media.NoDataSinkException: Cannot find a DataS
    ink for: com.sun.media.multiplexer.RawBufferMux$RawBufferDataSource@2b7eea
    Transcoding failedHope some Java Experts can help me.
    Regards.

  • JpegImagesToMovie--com.sun.media.processor.unknown.Handler

    hi,
    I get the following error with JpegImagesToMovie.
    It seem same as:
    http://onesearch.sun.com/search/highlight/index.html?url=http%3A%2F%2Fforum.java.sun.com%2Fthread.jspa%3FforumID%3D28%26threadID%3D585235&fterm=JpegImagesToMovie
    But look like no answer!
    C:\>java JpegImagesToMovie -w 320 -h 240 -f 1 -o file:/c:/test.mov file:/c:/k1.jpg file:/c:/k2.jpg
    - create processor for the image datasource ...
    Setting the track format to: JPEG
    - create DataSink for: file:/c:/test.mov
    start processing...
    - reading image file: file:/c:/k1.jpg
    - reading image file: file:/c:/k2.jpg
    Done reading all images.
    Exception in thread "JMF thread: SendEventQueue: com.sun.media.processor.unknown.Handler" java.lang.NullPointe
    rException
    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)

    The basic problem is that this program, like all of the JMF examples, is very haphazardly coded. From what I can gather somewhere in the excecution of the program there was a major thread conflict. JMF is not thread safe and requires the use of wait for state methods. In all honesty, I have never had a sample program compile and run succesfully as is. I think it would just be easier to re-write this code, except this time use the StateHelper class which can be found in the JMF guide. The StateHelper class manages all of the Player and Processor threads so you don't have to worry about it. I wish I could be of more help here but I think this is just a case of some sloppy code.

  • JpegImagesToMovie

    I downloaded the latest JMF and is installed correctly. I'm trying to run JpegImagesToMovie example with the proper parameters. I don't understand why I'm getting the following error:
    - create processor for the image datasource ...
    Setting the track format to: JPEG
    - create DataSink for: C:\??\??\??\out.mov
    Cannot create the DataSink: javax.media.NoDataSinkException: Cannot find a DataSink for: com.sun.media.multiplexer.BasicMux$BasicMuxDataSource@cd2c3c
    Failed to create a DataSink for the given output MediaLocator: C:\??\??\??\out.mov
    Thanks...

    >
    parameters used:>Note that I did not ask what parameters were used, so much as the exact command typed. Something more along these lines.
    C:\JpegToMovie>java JpegImagesToMovie -w 576 -h 432 -f 1 -o file:./out.mov 100_9216.jpg 100_9390.jpg 100_9652.jpg
    - create processor for the image datasource ...
    Setting the track format to: JPEG
    - create DataSink for: file:./out.mov
    start processing...
      - reading image file: 100_9216.jpg
        read 185634 bytes.
      - reading image file: 100_9390.jpg
        read 182426 bytes.
      - reading image file: 100_9652.jpg
    Done reading all images.
    ...done processing.
    C:\JpegToMovie>java JpegImagesToMovie  -w 576 -h 432 -f 1 -o C:\out.mov 100_9216.jpg 100_9390.jpg 100_9652.jpg
    - create processor for the image datasource ...
    Setting the track format to: JPEG
    - create DataSink for: C:\out.mov
    Cannot create the DataSink: javax.media.NoDataSinkException: Cannot find a
      DataSink for: com.sun.media.multiplexer.BasicMux$BasicMuxDataSource@c21495
    Failed to create a DataSink for the given output MediaLocator: C:\out.mov
    C:\JpegToMovie>java JpegImagesToMovie -w 576 -h 432 -f 1 -o C:\\out.mov 100_9216.jpg 100_9390.jpg 100_9652.jpg
    - create processor for the image datasource ...
    Setting the track format to: JPEG
    - create DataSink for: C:\\out.mov
    Cannot create the DataSink: javax.media.NoDataSinkException: Cannot find a
      DataSink for: com.sun.media.multiplexer.BasicMux$BasicMuxDataSource@c21495
    Failed to create a DataSink for the given output MediaLocator: C:\\out.movOh, and hopefully you will spot the error if you look closely at the input and output.

  • Problem transferring video using RMI

    Hi frnds...I have a code which transfers images using rmi.....this code works fine.....but if i give a .avi file instead of a .jpeg the file gets transferred to the other machine but it gets corrupt...the size is also the same.....do i have to encode the video ??
    please help me solve the problem..
    thanks..
    Nik

    here is the code....
    import java.io.*;
    import javax.media.*;
    import javax.media.control.*;
    import javax.media.datasink.*;
    import javax.media.format.*;
    import javax.media.protocol.*;
    import java.rmi.*;
    import java.sql.*;
    public class TestQuickCamPro
         private static boolean                    debugDeviceList = false;
         private static String                    defaultVideoDeviceName = "vfw:Microsoft WDM Image Capture (Win32):0";
         private static String                    defaultAudioDeviceName = "DirectSoundCapture";
         private static String                    defaultVideoFormatString = " ";
         private static String                    defaultAudioFormatString = "linear, 16000.0 hz, 8-bit, mono, unsigned";
         private static CaptureDeviceInfo     captureVideoDevice = null;
         private static CaptureDeviceInfo     captureAudioDevice = null;
         private static VideoFormat               captureVideoFormat = null;
         private static AudioFormat               captureAudioFormat = null;
         public static void main(String args[])
                 debugDeviceList = false;
                  new TestQuickCamPro();
    public TestQuickCamPro(){
              Stdout.log("get list of all media devices ...");
              java.util.Vector deviceListVector = CaptureDeviceManager.getDeviceList(null);
              if (deviceListVector == null)
                   Stdout.log("... error: media device list vector is null, program aborted");
                   System.exit(0);
              if (deviceListVector.size() == 0)
                   Stdout.log("... error: media device list vector size is 0, program aborted");
                   System.exit(0);
              for (int x = 0; x < deviceListVector.size(); x++)
                   // display device name
                   CaptureDeviceInfo deviceInfo = (CaptureDeviceInfo) deviceListVector.elementAt(x);
                   String deviceInfoText = deviceInfo.getName();
                   if (debugDeviceList)
                        Stdout.log("device " + x + ": " + deviceInfoText);
                   // display device formats
                   Format deviceFormat[] = deviceInfo.getFormats();
                   for (int y = 0; y < deviceFormat.length; y++)
                        // serach for default video device
                        if (captureVideoDevice == null)
                             if (deviceFormat[y] instanceof VideoFormat)
                             if (deviceInfo.getName().indexOf(defaultVideoDeviceName) >= 0)
                             captureVideoDevice = deviceInfo;
                             Stdout.log(">>> capture video device = " + deviceInfo.getName());
                        // search for default video format
                        if (captureVideoDevice == deviceInfo)
                             if (captureVideoFormat == null)
                             if (DeviceInfo.formatToString(deviceFormat[y]).indexOf(defaultVideoFormatString) >= 0)
                             captureVideoFormat = (VideoFormat) deviceFormat[y];
                             Stdout.log(">>> capture video format = " + DeviceInfo.formatToString(deviceFormat[y]));
                        // serach for default audio device
                        if (captureAudioDevice == null)
                             if (deviceFormat[y] instanceof AudioFormat)
                             if (deviceInfo.getName().indexOf(defaultAudioDeviceName) >= 0)
                             captureAudioDevice = deviceInfo;
                             Stdout.log(">>> capture audio device = " + deviceInfo.getName());
                        // search for default audio format
                        if (captureAudioDevice == deviceInfo)
                             if (captureAudioFormat == null)
                             if (DeviceInfo.formatToString(deviceFormat[y]).indexOf(defaultAudioFormatString) >= 0)
                             captureAudioFormat = (AudioFormat) deviceFormat[y];
                             Stdout.log(">>> capture audio format = " + DeviceInfo.formatToString(deviceFormat[y]));
                        if (debugDeviceList)
                             Stdout.log(" - format: " +  DeviceInfo.formatToString(deviceFormat[y]));
              Stdout.log("... list completed.");
              // if args[x] = "-dd" terminate now
              if (debugDeviceList)
                   System.exit(0);
              // setup video data source
              MediaLocator videoMediaLocator = captureVideoDevice.getLocator();
              DataSource videoDataSource = null;
              try
                   videoDataSource = javax.media.Manager.createDataSource(videoMediaLocator);
              catch (IOException ie) { Stdout.logAndAbortException(ie); }
              catch (NoDataSourceException nse) { Stdout.logAndAbortException(nse); }
              if (! DeviceInfo.setFormat(videoDataSource, captureVideoFormat))
                   Stdout.log("Error: unable to set video format - program aborted");
                   System.exit(0);
              // setup audio data source
              MediaLocator audioMediaLocator = captureAudioDevice.getLocator();
              DataSource audioDataSource = null;
              try
                   audioDataSource = javax.media.Manager.createDataSource(audioMediaLocator);
              catch (IOException ie) { Stdout.logAndAbortException(ie); }
              catch (NoDataSourceException nse) { Stdout.logAndAbortException(nse); }
              if (! DeviceInfo.setFormat(audioDataSource, captureAudioFormat))
                   Stdout.log("Error: unable to set audio format - program aborted");
                   System.exit(0);
              // merge the two data sources
              DataSource mixedDataSource = null;
              try
                   DataSource dArray[] = new DataSource[2];
                   dArray[0] = videoDataSource;
                   dArray[1] = audioDataSource;
                   mixedDataSource = javax.media.Manager.createMergingDataSource(dArray);
              catch (IncompatibleSourceException ise) { Stdout.logAndAbortException(ise); }
              // create a new processor
              // setup output file format  ->> msvideo
              FileTypeDescriptor outputType = new FileTypeDescriptor(FileTypeDescriptor.MSVIDEO);
              // setup output video and audio data format
              Format outputFormat[] = new Format[2];
              outputFormat[0] = new VideoFormat(VideoFormat.INDEO50);
              outputFormat[1] = new AudioFormat(AudioFormat.GSM_MS /* LINEAR */);
              // create processor
              ProcessorModel processorModel = new ProcessorModel(mixedDataSource, outputFormat, outputType);
              Processor processor = null;
              try
                   processor = Manager.createRealizedProcessor(processorModel);
              catch (IOException e) { Stdout.logAndAbortException(e); }
              catch (NoProcessorException e) { Stdout.logAndAbortException(e); }
              catch (CannotRealizeException e) { Stdout.logAndAbortException(e); }
              // get the output of the processor
              DataSource source = processor.getDataOutput();
              // create a File protocol MediaLocator with the location
              // of the file to which bits are to be written
              MediaLocator dest = new MediaLocator("file:testcam.avi");
              // create a datasink to do the file
              DataSink dataSink = null;
              MyDataSinkListener dataSinkListener = null;
              try
                   dataSink = Manager.createDataSink(source, dest);
                   dataSinkListener = new MyDataSinkListener();
                   dataSink.addDataSinkListener(dataSinkListener);
                   dataSink.open();
              catch (IOException e) { Stdout.logAndAbortException(e); }
              catch (NoDataSinkException e) { Stdout.logAndAbortException(e); }
              catch (SecurityException e) { Stdout.logAndAbortException(e); }
              // now start the datasink and processor
              try
                   dataSink.start();
              catch (IOException e) { Stdout.logAndAbortException(e); }
              processor.start();
              Stdout.log("starting capturing ...");
              try { Thread.currentThread().sleep(5000); } catch (InterruptedException ie) {}     // capture for 10 seconds
              Stdout.log("... capturing done");
              // stop and close the processor when done capturing...
              // close the datasink when EndOfStream event is received...
              processor.stop();
              processor.close();
              dataSinkListener.waitEndOfStream(10);
              dataSink.close();
              Stdout.log("[all done]");

  • How to compine FrameAccess and JpegImagesToMovie?

    Hello,
    I want to have a sequence of image accessed by FrameAccess (I use vid2jpg where I output BufferedImages) and then save the images as video using JpegImagesToMovie. I also modified JpegImagesToMovie to read BufferedImages, but now the problem is that JpegImagesToMovie looks for a folder of "images" to read and make the movie.
    Any idea how to make it work?
    Thanks

    this is y i asked about the code.. would have been simpler if u posted it for every1 to see..
    anyway, if its asking for a folder of images, maybe u should save everyting (every frame, buffer or whatever) as jpeg files first, then convert them to movie. if u wish to use that method i may have a code somewhere which does just that

  • How to Modify JpegImagesToMovie

    I would like to Modify JpegImagesToMovie so that I can view the resultant movie as it is being created. Do I need to clone the datasource?
    http://java.sun.com/products/java-media/jmf/2.1.1/solutions/JpegImagesToMovie.html

    RE-publishing a SharePoint Designer workflow will not affect running instances of the previous workflow instance.  I don't know of any way to modify the workflow variables in a running workflow instance.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • URGENT!!! JpegImagesToMovie

    We have several JPEG images to be saved into a single MOV file. We are having a problem in automating passing of command line arguments into the JpegImagesToMovie.java class. Typical scenario will be passing an unknown number of JPEG files as arguments in a method call to be converted into a MOV file. Please help us as we are not sure how best to go about it.

    I used frame grabber to get JPEG pictures.
    use a loop to save picture file name 1pic.jpg 2pic.jpg .........XXpic.jpg
    Then when using JPEGtoMOV code, create a method that loops the XX amount, create a String[] and add each file name (string name), there you go, pass the String[] as an argument to cunstructor.

  • Modifiying JpegImagesToMovie example

    Hi,
    I've modified the JpegImagesToMovie example in order to generate an AVI file.
    The problem is that the AVI file generated is very big comparing to the one generated as Quicktime.
    Do you know how to generate an AVI file with compressed images?
    Thank you.

    After setting the processor's content descriptor, get its track controls. Iterate through the track controls to find one with a format that is an instance of VideoFormat. Next, obtain all the available formats from that control. Iterate through those and find one you like, say, CVID. Then set the control's format to the selected format. Personally, I like the MJPG codec for hi-res work because it maintains good quality while still doing decent compression.         TrackControls[] tc = p.getTrackControls();
            for (int i = 0; i < tc.length; i++) {
                TrackControl c = tc;
    Format f = c.getFormat(); // current format
    if (f instanceof VideoFormat) {
    Format[] fmt = c.getSupportedFormats();
    if ((fmt != null) && (fmt.length > 0)) {
    // look through fmt array for desired format
    // and once found, use c.setFormat(newFormat)
    Use a decent debugger to inspect the results. There is no available documentation that can tell you what to expect.

  • JpegImagesToMovie ... play video

    I downloaded JpegImagesToMovie from [urlhttp://java.sun.com/products/java-media/jmf/2.1.1/solutions/JpegImagesToMovie.html[/url]
    I'm trying to play the video by cloning the processor datasource but i get this exception
    javax.media.NoPlayerException: Cannot find a Player for: com.ibm.media.protocol.SuperCloneableDataSource$PushDataSourceSlave@bf1d3b
         at javax.media.Manager.createPlayerForSource(Manager.java:1512)
         at javax.media.Manager.createPlayer(Manager.java:500)
         at javax.media.Manager.createRealizedPlayer(Manager.java:579)
         at mySource.JpegImagesToMovie.doIt(JpegImagesToMovie.java:131)
         at mySource.JpegImagesToMovie.main(JpegImagesToMovie.java:330)what does it mean ? what i have to do ?
    thanks

    If you mean "can I play a video file's video part via AppleTV and the audio part via the Macbook" then the answer is no.
    You could probably play the video on AppleTv and also play it on the Macbook and output the audio, but you would have to do this manually, and 2 applications accessing the same video file might cause stuttering playback issues. Additionally you'd have to manually sync the audio and lip sync problems are annoying at the best of times.
    If you mean "can I watch a video from AppleTV and play separate music via iTunes on the Macbook", then the answer is yes.
    AC

  • Problem with Transmitting media using JMF

    Hello Everyone !!
    I am working on an application called SIPSpeaker which listens for incoming calls, answer the call and plays a message. I am done with the first two parts of the application, i.e. it can successfully answers the call. I am now facing problem with transmitting audio to the SIP Phone (the caller). I am using JMF and I am trying to send the audio over RTP.
    My code looks something like this....
    locator = new MediaLocator("rtp://130.237.214.124:" + port + "/audio");
            f = new File("C:/1.wav");
            try {
                ds = Manager.createDataSource(f.toURL());         
            } catch (NoDataSourceException ex) {
                ex.printStackTrace();
            } catch (MalformedURLException ex) {
                ex.printStackTrace();
            } catch (IOException ex) {
                ex.printStackTrace();
            format = new Format[]{new AudioFormat(AudioFormat.GSM_RTP,8000,8,1)};
            contentDesc = new ContentDescriptor(ContentDescriptor.RAW_RTP);
                    processor = Manager.createProcessor(ds);
                    waitForState(processor,Processor.Configured);
                    processor.setContentDescriptor(contentDesc);
                    processor.getTrackControls()[0].setFormat(format[0]);
                    waitForState(processor,Processor.Realized);
    try {
                sink = Manager.createDataSink(processor.getDataOutput(),locator);
                System.out.println("6");
            } catch (NotRealizedError ex) {
                ex.printStackTrace();
            } catch (NoDataSinkException ex) {
                ex.printStackTrace();
    processor.start();
            try {
                sink.open();
                sink.start();
            } catch (SecurityException ex) {
                ex.printStackTrace();
            } catch (IOException ex) {
                ex.printStackTrace();
               we are required to work with a .wav file as input ....
    i am new to java and to JMF and i have absolutely no idea whats going wrong...
    please help me
    Regards,
    Sanjay !!

    Hello
    following is the error i get
    Failed to realize: com.sun.media.ProcessEngine@618d26
    Cannot build a flow graph with the customized options:
    Unable to transcode format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 16000.0 frame rate, FrameSize=32768 bits
    to: mpegaudio/rtp, 8000.0 Hz, 8-bit, Mono
    outputting to: RAW/RTP
    Error: Unable to realize com.sun.media.ProcessEngine@618d26
    what could be the problem ???

  • I capture a video but can't save it .How to halndle the problem via JMF?

    Hi everyone, I'm starting to use JMF and faced the problem
    The problem is to save captured video in .avi or .mov formats.I managed to capture and play it in a player, but can't save it .On the other hand when I used processor to capture and save the video , I've succeeded .But my task is to combine these two actions. Give a hint please.
    All kind of replies will be greatly appreciated.
    Edited by: postvard on Feb 25, 2009 12:03 AM

    >
    You need to get the StreamWriterControl on the DataSink, rather than the Processor.I doesn't seem to work.
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.io.IOException;
    import javax.media.CannotRealizeException;
    import javax.media.Control;
    import javax.media.DataSink;
    import javax.media.Format;
    import javax.media.Manager;
    import javax.media.MediaLocator;
    import javax.media.NoDataSinkException;
    import javax.media.NoProcessorException;
    import javax.media.Processor;
    import javax.media.ProcessorModel;
    import javax.media.format.VideoFormat;
    import javax.media.protocol.DataSource;
    import javax.media.protocol.FileTypeDescriptor;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.media.control.MonitorControl;
    import javax.media.control.StreamWriterControl;
    public class MyProcessor extends JPanel {
         private MediaLocator locator=null;
         private Processor processor=null;
         private DataSource dataSource=null;
         private DataSink filewriter=null;
         private Format[]formats=new Format[1];
         public MyProcessor() throws NoProcessorException, CannotRealizeException, IOException, InterruptedException {
              setLayout(new BorderLayout());
              FileTypeDescriptor outputType = new FileTypeDescriptor(FileTypeDescriptor.MSVIDEO);
                   Format[]format=new Format[1];
                   format[0]=new VideoFormat(VideoFormat.YUV);
              locator=new MediaLocator("vfw://0");
              processor=Manager.createRealizedProcessor(new ProcessorModel(locator,format, new FileTypeDescriptor(FileTypeDescriptor.MSVIDEO)));
              Control controls[] = processor.getControls();
              for(Control c:controls){
              if(c instanceof MonitorControl){
              MonitorControl mc = (MonitorControl) c;
              mc.setEnabled(true);
              if (mc.getControlComponent() != null) {
              add("Center", mc.getControlComponent());
              dataSource= processor.getDataOutput();
              MediaLocator dest = new MediaLocator("file:record1.avi");
              try {
              filewriter = Manager.createDataSink(dataSource, dest);
              Control[] dataSink_controls= (Control[])filewriter.getControls();
         for(Control c1:dataSink_controls){
              if(c1 instanceof StreamWriterControl){
                   StreamWriterControl stream_size=(StreamWriterControl)c1;
                   if(stream_size!=null){
                        stream_size.setStreamSizeLimit(30000);
              filewriter.open();
              } catch (NoDataSinkException e) {
              System.exit(-1);
              } catch (IOException e) {
              System.exit(-1);
              } catch (SecurityException e) {
              System.exit(-1);
              try {
              filewriter.start();
              } catch (IOException e) {
              System.exit(-1);
         processor.start();
         //Thread.currentThread().sleep(20000);
    //     processor.stop();
    //               processor.close();
    //               filewriter.stop();
    //               filewriter.close();
         public static void main(String[] args) {
              try {
                   MyProcessor processor1=new MyProcessor();
                   JFrame frame=new JFrame();
                   frame.setSize(300,300);
                   frame.add(processor1);
                   frame.setVisible(true);
              } catch (NoProcessorException e) {
                   e.printStackTrace();
              } catch (CannotRealizeException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
              } catch (InterruptedException e) {
                   e.printStackTrace();

Maybe you are looking for

  • Lost username for WRT54GS, resetting router doesn't seem to restore defaults

    I lost username for WRT54GS so I tried resetting as per instructions, holding down reset key for 30 seconds, but can't log in using 'admin' and blank password, which I understand is factory default, and which should have been restored on reset--right

  • Unable to open Tiff Document

    Hi, We have installed Tiff as an workstattion application and also done all required settings in SAP, When user is trying to open a tiff file he is not getting any thing like no error msg and nothing changes. But he is able to open other formats like

  • Date Unix time stamp in milli seconds

    TYPES : BEGIN OF ty_final,          line(600)  TYPE c,         END OF ty_final. DATA : gt_final TYPE TABLE OF ty_final. I have some the records are that are appending to the  internal table gt_final is of length 6423,7. How can I achieve this ? Final

  • Does the cam work on yahoo messenger on a New Mac Air

    On a New Mac Air with Yahoo Messenger does the Cam Function work ?

  • Help with sent mail address cache

    has anyone learned how to delete the addresses that come up when sending iphone mail? I accidentally sent an email to "f" and now every time I type f in the to: field, "f" is in the list of possible addresses to choose from (and it's not even a conta