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.

Similar Messages

  • 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.

  • Need urgent help to use or modify the "ultrasonic starter kit"

    Hi, I am a french student, and I am working on an ultrasonic table with Labview 7.1.
    On the one hand, I have done the control of the table that moves the "probe?", and on the other hand I have done the program that read the picture given by EPOCH (an ultrasonic system that detects interfaces into metals).
    So, now my goal is now to mix them to make a map of those interfaces (one gives the position (x,y) of the probe and the other a graph with intensity peaks).
    I have found the "ultrasonic starter kit", and I would like to modify it, but I need help to remove the part that simulates the graph of intensity in order to replace it with mine and to remove the part that simulates (x,y) position to replace it by my positions that are controled in the same order. (y decreases each time x>constant).
    In case you would like to help me and need my work or a better description, please contact me to : [email protected]
    François-Xavier MAYAUD.
    Thank you.

    Hi,
    I think it would be easier for you to start from a blank VI, than modifiying the example you found which is quite complex. Try to use an intensity graph with inputs as your data.
    Regards,
    ClémentG

  • Edit an EDI File before sending it

    Hi Experts,
    how can I found the EDI File generated for a SHPMNT and edit it before sending it ?
    User create an outbound delivery and transport. By saving the transport we create/edit the EDI Message SHPMNT (with user-exit) but don't send it. It will be send by using a Z-Programm which made the Good Issue.
    The probem is following: After saving the transport, the user want to modifiy, for example, the Shpg.Cond. into the Out.Delivery Head. How can I actualize the EDI Message with the new value of Shpg.Cond. ???
    Regards,
    David

    Hi Vinod,
    thanks for your quick answer.
    We have 1 EDI File for 1 SHPMNT. But 1 SHPMNT may contain several Outb.Deliv. with the same Ship-to-Party...
    I found the Function EDI_DOCUMENT_OPEN_FOR_EDIT with EDI_DOCUMENT_CLOSE_EDIT.
    How can I find the Idoc No. of the EDI-File???
    Regards,
    David

  • Images to Video (Sun Example doesn't work for me)

    Hi every one :)
    I'm trying to convert some jpg images into movie file. I saw the [Sun's example|http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/JpegImagesToMovie.html] , but when I try to execute I have a DataSink error:
    Cannot create the DataSink: javax.media.NoDataSinkException: Cannot find a DataSink for: com.sun.media.multiplexer.BasicMux$BasicMuxDataSource@c1f10e
    Failed to create a DataSink for the given output MediaLocator: foo.mov ¿There's another way to do it?
    P.S: Sorry for my english ;)

    darkskimmer wrote:
    The output MediaLocator, I create it with
    MediaLocator out = new MediaLocator("foo.mov");The error is creating out DataSink. No errors when creating the input stream of images...Which is why I told you specificlly...
    I believe the problem may be with how you're constructing your output MediaLocator... Check out their "main" method and see how they're converting their filenames into MediaLocators, and make sure you do that too. I can tell you, that's not how they do their output mediaLocators. They construct theirs with a "file://" prefix and a fully-rooted pathname. Check the code.
         if ((oml = createMediaLocator(outputURL)) == null) {
             System.err.println("Cannot build media locator from: " + outputURL);
             System.exit(0);
         }

  • 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.

  • BPEL Example Hello World not synchronous 'Building SImple BPEL Process'

    Introduction to BPEL Process Manager Chapter 1 - shows an example using Eclpise. I am using JDeveloper. After inserting the expression syntax as shown, I get an error message for 'input' parameter. In any case even when modifiying syntax get an asynchrconous message.

    Turns out - by allocating a NEW workspace and new project as Synchronous - and using wizard - application works as advertized. the exprssion syntax used for the Eclipse version is NOT the same - variable names differ.

  • Green band in output video. (From program: JpegImagesToMovie.java)

    Hi!! I'm working in this examples: http://java.sun.com/products/java-media/jmf/2.1.1/solutions/JpegImagesToMovie.java.
    This program makes a MOV video from a list of images (in JPEG format). In the video appears a green horizontal band. It's an error, no?
    Somebody help me?

    java_developper wrote:
    player = Manager.createRealizedPlayer(original); !!!!????
    u should create player for the clone datasource not for originale oneUmmmm, why should he do that? In what way does that matter at all which is the clone and which is the original?

  • 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.

  • JpegImagesToMovie to read single images

    Hi,
    I found that JpegImagesToMovie reads a list of images first and then creates the movie. Is that correct?
    Can I make it to read image by image without the use of a Vector, just to load single images, one at the time and at the end to save it to video?
    Thanks

    Hi MDM_PS,
    One idea is that we can used the ADO.Net knowledge, for example, we can use it like this “SELECT top xx from table…”, we can store the data in a new data source, then use this new data source in the unit test.
    Tony also shared us a workaround , maybe you could refer to it here:
    https://social.msdn.microsoft.com/Forums/en-us/f35d4e7c-1479-45f3-9985-38304e97b748/how-do-i-retrieve-value-from-single-cell-on-csv-file-using-data-driven-tests-for-codeduitest?forum=csharplanguage
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Just installed Firefox 4. It hangs when I open any website and type in, for example, an ID, or even just click on something, for example, "Compose", in my webmail site.

    Here's the detail of what happens.
    1. Turn on computer and then click on Firefox icon on desktop.
    2. Firefox opens. Everything looks OK. Mr Bunsen's graphic is working fine.
    3. Click on any webpage link. For example, a newspaper or an online webmail page. All looks OK until
    4. Click on anything or type anything, such as in ID in a box, and bingo, the top line of Firefox goes from dark blue to very pale blue and the computer is hung. You cannot get out of Firefox or get Firefox to work.
    5. Switch off computer.
    Is this perhaps due to a clash of Add-ons. I run Avast anti-virus. McAfee came with Firefox 4 and I did not reject it. Is it conflicting wth something in my system and causing it to hang?

    You can modify the pref <b>keyword.URL</b> on the <b>about:config</b> page to use Google's "I'm Feeling Lucky" or Google's "Browse By Name".
    * Google "I'm Feeling Lucky": http://www.google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q=
    * Google "Browse by Name": http://www.google.com/search?ie=UTF-8&sourceid=navclient&gfns=1&q=
    * http://kb.mozillazine.org/keyword.URL
    * http://kb.mozillazine.org/Location_Bar_search

  • Some of my apps refuse to open. For example, google crome gives me the message that it quit unexpectedly and gives me the option to submit a report to no resolve. Does anyone have suggestions?

    Some of my apps refuse to open. For example, google crome gives me the message that it quit unexpectedly and gives me the option to submit a report to no resolve. Does anyone have suggestions?

    Welcome to the Apple community.
    Does anyone have suggestions?
    Trash the spyware (Chrome) and use Safari.

  • How can I change the background of a running webpage on my own. Example Facebook I want to change its backround color from white to black just in my view not for all

    How can I change the background of a running webpage on my own. Example Facebook I want to change its background color from white to black just in my view, not for all. Cause I really hate some site with white background because as I read for an hour it aches my eyes but not on those with darker background color.

    You can use the NoSquint extension to set font sizes (text/page zoom) and text colors on web pages.
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • TS1814 Most of the songs on my iPod Classic no longer dshow up on iTunes on my laptop.  I deleted iTunes & installed the latest version but this did not change anything.  For example on 1 playlist I have 66 songs but only 1 shows on the iTunes screen.  Th

    Most of the songs on my iPod Classic no longer show up on iTunes on my laptop.  I deleted iTunes & installed the latest version but this did not change anything.  For example on 1 playlist I have 66 songs but only 1 shows on the iTunes screen.  Thanks you for any help.

    See Empty/corrupt iTunes library after upgrade/crash or
    Recover your iTunes library from your iPod or iOS device.
    tt2

  • When previewing images by clicking on the thumbnail in an Event for example, I've been finding that many images preview in a 'zoomed in' way so only a small part of the photos is previewed in a highly magnified view.

    When previewing images by clicking on the thumbnail in an Event for example, I've been finding that many images preview in a 'zoomed in' way so only a small part of the photos is previewed in a highly magnified view.
    Initially I could find no cause. Then I tried right click - Edit and on the affected images, always get this warning:
    "Image Cannot Be Edited - This photo was previously edited with another application or with an early version of Iphoto. Duplicate this photo to edit it." and a "Duplicate To Edit" Button is displayed. 
    The external Editor defined for iPhoto is Adobe Photoshop Elements.
    Now, I reckon the MUST be others out there affected by this same apparent Preview bug, yet my searches have not revealed any answers.  Also seems impossible to find a contact number for adobe???
    Thanks

    Start '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Firefox in Safe Mode]''' {web Link} by holding down the '''<Shift ''(Mac Options)'' >''' key, and then starting Firefox. Is the problem still there?

Maybe you are looking for

  • Balance Interest

    Hi Friends, My client has a requirement. Security deposit is received from Stockists ( Debtors) and the same is posted to the same debtor account using Spl GL Indicator. Interest has to be paid on the security deposit. Can any body help me to do the

  • Save As Stationery - Does Not Work

    Anyone having problems saving files as stationery in Mail 3 ? I create a new message like help says and the save as stationery under the file menu is grayed out. Has anyone had any success altering and saving new stationery files? Thanks

  • Lightroom will not download on my laptop, i bought the package and lightroom wont launch into download

    i just bought the photoshop and lightroom package, ligthroom will not launch when i try to download on my laptop, help please

  • OTL - Auto approvals issue.

    Hi Folks , I have very unique problem identified in OTL setup. When one of the employee applies for time card ( 8 hours ) , its getting auto approved instead of going to Supervisor. We have defined the hierarchy level and approval method as HR_SUPERV

  • HT1459 disabled ipod

    How do you fix  a disabled ipod?