Playing jpeg pictures for different amount of time

hello everyone.
i'm new to jmf and i have been reading a bit about it. so i tried the sample code at: http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/JpegImagesToMovie.java (THIS WAS VERY HELPFUL)
this program displays each image for 1 second each.
now my problem is, i want to display these pictures for different amount of time... for example: display pic1 for 1 second, then display pic2 for 3 sec and so on.
can anyone help me please. THANKS

>
i'm new to jmf ..>The [JMF forum|http://forums.sun.com/forum.jspa?forumID=28] is the best place to ask JMF related questions, but I am guessing you are also new to Java, and to programming, so this forum might be best for the moment.
>
..and i have been reading a bit about it. so i tried the sample code at: http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/JpegImagesToMovie.java (THIS WAS VERY HELPFUL)
this program displays each image for 1 second each.
now my problem is, i want to display these pictures for different amount of time... for example: display pic1 for 1 second, then display pic2 for 3 sec and so on.>Well.. given a run of [JpegImagesToMovie.java|http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/JpegImagesToMovie.java ] might go..
java JpegImagesToMovie -w 400 -h  300 -f 1
  -o the.mov pic1.jpg pic2.jpg pic3.jpg..you might instead try..
java JpegImagesToMovie -w 400 -h  300 -f 1
  -o the.mov pic1.jpg pic2.jpg pic2.jpg pic2.jpg pic3.jpg
Lines broken for clarity.  Instead have command all in one line.
This simply repeats the second frame, three times. The .MOV format might 'optimize away' the second and third frame from the final file, but I would not count on it.
Of course, a far better way to animate images (with transition effects, full control over time, and all the bells and whistles) is to load the images into memory and create the slide show using the Java 2D abilities, mostly found in the Graphics class.

Similar Messages

  • Is there a way to create a custom screensaver with pics/slides that display for different amounts of time?

    Is there a way to create a custom screensaver with pics/slides that display for different amounts of time? Or even add a "video slide" into the screensaver?
    My business has 3 TVs displayed in our lobby, each with its own apple TV and they are all linked to the same photo stream. Currently the Atv screensaver displays the photostream pictures of our products for the default 3 seconds. We just added pics/slides that now display messages and useful info for our customers but I want that info to be displayed for a longer period of time than the pictures to give people a chance to read it.
    I tried using flickr and powerpoint as a work around but no luck.  I created a slide in powerpoint with play length of 15 secs and saved it as a wmv file.  I added that file to a "screensaver" set in flickr and pointed the Atv screensaver to that flickr set.  It still displays everything, pics and the wmv file at the default 3 sec.
    I know I can increase the duration of all pics in the screensaver to display for longer but the goal is to have the pics display at 3 secs and the info slides to display at 15 secs.

    Welcome to the Apple Community.
    No that's not possible.
    If you have any suggestions that you think might enhance the Apple TV you can send Apple your feedback here 

  • Writing a file for prescribed amount of time in a while loop after the triggering condition is met

    Hello Guys,
    I am trying to program an application in which if the trigger condition is met it should start to write the file.
    I was able to do that, but if I want it to be written for certain amount of time, and once the trigger condition is met, it should continue to write the files for prescribed amount of time. I was not able to do this. The file name should also be updated accordingly.
    I tried to with some options by keeping the creation of the file outside of the loop, if I do that then if the trigger condition is not met it will stop writing and I dont want that, as once the trigger condition is met it should be true thereafter.
    So I cant keep any thing outside the while loop, bcaz then it checks the condition of the shift register for the trigger and I have it as a false constant.
    I am attaching my application which is kind of mess and I have written in the application where I am having problems. For every iteration of while loop it makes a new file, and i dont want that, I want to write specific amount of time data to the each file.
    Please take a look at my code and help me in solving the problem. Any insights and examples on how to do this thing will be a relief to me.
    Thanks in advance.
    Regards,
    Nitin
    Attachments:
    PXI_4462_Sync_and_Stream_trigger.zip ‏192 KB

    what i am saying is to keep track of how much data you have written and whenever you need to make a new file you make 1.
    here is a vi that i just made that should show you. let me know if you need any help understanding it.
    Attachments:
    new file exemple.vi.zip ‏21 KB

  • Wait for undefined amount of time

    Hello All,
    I have a requirement, where in I would want my activity in the workflow to wait for an indefinite amount of time. Then when a certain activity occurs, I would like to complete the 'waiting' activity.
    So lets say I have the following process with 2 activities(A and B)
    ----------> A ----------> B(wait for undefined amount of time)------------->End
    B needs to wait for some time, which I do not know.
    Then when another event( PL/SQL activity) occurs, I need the event to trigger of the waiting activity B, to completion.
    How can I acheive this?
    Thanks in advance.
    PHK

    Luiz,
    Lets say I have the following:
    -------->A---------->B(needs to wait)-----No------>D----> END
    \ Yes
    C-------------->END
    B is the activity which needs to wait. It has a PL/SQL function assciated with it.Lets say I have a result type of YES/NO associated with activity B. As soon as the workflow engine encounters activity B, it will execute the function associated with it. Lets the function ends with a result_out => YES, then immediatly C will be executed.
    So setting a result type will not help. I need to wait at step 'B'
    Regards,
    PHK.

  • Group Items showing for different lengths of time

    I have created a group of check and x-marks to indicate correct and incorrect answers.  The check mark and X-mark are both smart shapes.  In my advanced actions, I hide the group and then show either a check or X-mark after the answers have been submitted.  The advanced actions are written as, " show X-mark" and "Hide Check Mark" and vice versa.  But when I preview the slide the check mark only stays by the correct answers for 3 seconds, and the X-marks remain. 
    Any ideas as to why two items in a group would display for different lengths of time?

    Lieve, was the timeline okay or did you need more?  One thing that was different about the check marks, I noticed, was that they were set as "Use as button".  I unchecked that box for each of the 72 check marks that are on my slides.  I think that I got them all.   However, they are still each linked to 24 Object style manager Smart Shapes which will help me position them three at a time.  I don't see anything in the Object style manager that has a setting that might affect the length that they stay visible.

  • ITunes movies - 'freeze' for same amount of time I can play??..

    I have a frequent problem with iTunes movies - when I download one from the Store it stops all the time.  I can usually restart it by pressing pause and then play, although sometimes I have to go out of the movie altogether then restart and fast forward to where i was. It is incredibly irritating as you can imagine.  Any ideas?  The amount of time I get to watch the movie seems to relate to the amount of time I have before it of waiting.  Eg if it stops and I restart instantly I only get a minute or so of movie, whereas if I stop the movie and only restart it after five minutes then I seem to get at least five minutes before it stops again.
    So grateful for any help..

    I have a frequent problem with iTunes movies - when I download one from the Store it stops all the time.  I can usually restart it by pressing pause and then play, although sometimes I have to go out of the movie altogether then restart and fast forward to where i was. It is incredibly irritating as you can imagine.  Any ideas?  The amount of time I get to watch the movie seems to relate to the amount of time I have before it of waiting.  Eg if it stops and I restart instantly I only get a minute or so of movie, whereas if I stop the movie and only restart it after five minutes then I seem to get at least five minutes before it stops again.
    So grateful for any help..

  • Perform each task for certain amount of time

    Hey,
    The program I'm trying to create is a very linear one and involves performing three different processes after one another, each for a set amount of time.
    I originally tried using case statements and timers to do this, but everything got very messy very quickly. I then looked at sequence structures however have read some bad things about them.
    Could anyone point me in the best direction to achive this?
    Thanks,
    Sam.

    Sam_R, Yamaeda is right. Sometimes things are so simple that you do not need a state machine. But sometimes you end up adding features to your simple little program and it ends up growing out of control. Trust me
    There are a million examples of state machines out there. This makes a million and one. It does not address the part of your question about performing an action for a certain amount of time. I wanted to keep it as simple as possible while also demonstrating programmatically determining the next state and error handling.
    I don't mean to sound condescending with this basic example. But I know there was a time when it seemed like advanced stuff to me. Hopefully someone will find this useful.
    =====================
    LabVIEW 2012
    Attachments:
    State Machine.vi ‏12 KB

  • Display for variable amount of time?

    Any thoughts on how I might accomplish the following:
    I need to be able to display a graphic (or video) for a variable amount of time in captivate.  This will be for a quiz type slide.  The user will only have a limited amount of time to view a graphic, and then must answer a question.  The graphic will only be displayed for fractions of a second ie. 1/16 to a half second.  The user must be able to adjust the time, so that they can go from slow transitions to faster transitions (for training purposes).
    My initial thoughts were:
    Is there a me
    1) Collect and set a variable in Captivate for the time to wait (user selects at run time), pass that variables value to a flash object and play the content for the specified length of time on the Captivate slide.
    or
    2) Create a new question type widget and define the widget parameters (time to display, image file to use, etc..), but will I be able to change a parameter at run time to allow the user to define the length of time to display???
    or
    3) Create the whole quiz in Flash, then tackle transmiting the quiz score/interactions back to captivate?  I don't have eLearning suite, so I dont have the question extras as well.
    I would prefer to do as much in captivate for speed and I am most familiar with it.  I would prefer to do as little in Flash as possible since I don't know it as well.
    Suggestions???

    Sorry I lost part of the post:
    Is there a method in Captivate to wait a period of time, and if so just set a conditional loop to show an object, wait the time, and then hide?  I am figuring that there is not, so my three other plans of attack...

  • Send the email to myself with 4 pictures for more than 100 times --- i didn't do this

    one of my colleages send an email to [email protected], and cc the email to me.
    and my blackberry send the email with 4 pictures in my camera folder to me and joegmail.com for more than 50 times a day.
    Why does it happen? and what should i do for that. please help.

    one of my colleages send an email to [email protected], and cc the email to me.
    and my blackberry send the email with 4 pictures in my camera folder to me and joegmail.com for more than 50 times a day.
    Why does it happen? and what should i do for that. please help.

  • Writing binary file for fixed amount of time

    Hello, I'm trying to write a binary file of multiple channels for a fixed amount of time before I perform my analysis. Does anyone know the best way to accomplish this?

    Here is an example of one way to do what I think you are trying to do. There may be a more elegant way of doing it, but this is pretty simple and straight-forward. It basically writes a 5-integer array for 5 seconds and then stops. Let me know if you have any questions.
    Attachments:
    timed write.vi ‏27 KB

  • When I use my computer for any amount of time all of a sudden the fan starts up full blast and everything freezes

    Nothing works after this happens its happened 3 times now, the first I just forced shut down and re started, the second I force shut down and left it off for the night, the third time I let it run like that for a bit to see if it would control itself but after a small amount of time I forced shut it down again.

    If you have more than one user account, these instructions must be carried out as an administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter "BOOT_TIME" (without the quotes) in the search box. Note the timestamps of those log messages, which refer to the times when the system was booted. Now clear the search box and scroll back in the log to the last boot time after  you had the problem. Select the messages logged before the boot, while the system was unresponsive or was failing to shut down. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message (command-V). Please include the BOOT_TIME message at the end of the log extract.
    If there are runs of repeated messages, post only one example of each. Don’t post many repetitions of the same message.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    Still in Console, look under System Diagnostic Reports for crash or panic logs, and post the entire contents of the most recent one, if any. In the interest of privacy, I suggest you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if present (it may not be.) Please don’t post any other kind of report — it will be very long and not helpful.

  • Images disappearing when on another tab for any amount of time.

    I am a member on a ProBoards forum and have spent the past 24 hours discussing this issue with them assuming it to be fault at their end. Okay here's what happens. I have several tabs opened on my firefox browser the first one being my ProBoards writing forum. At the top of the forum I have random banners that load in. Now these banners should load in immediately and when they do, they should stay there the whole time. What is happening when I go to another tab, for say Facebook for any length of time, I am talking at least a minute or more sometimes less, when I go back to my initial tab with my forum the image at the top of the site is no longer displaying. The only way to get it to show again is to either scroll a fraction on the site, or click on another tab and back to the site again within seconds. I know it shouldn't be doing this and in fact only started last night. I have terrible OCD and this isn't helping me. Can you please give me an ansewr or at least fix the issue. ProBoards after 24 hours deem it to be a Firefox issue as I can't recreate the issue on Google Chrome but I really don't like or want to use that browser. Thanks.

    Is the disk cache and memory cache enabled and working if you check that on the about:cache page? (open this page via the location bar)
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Create a new profile as a test to check if your current profile is causing the problems.
    See "Creating a profile":
    *https://support.mozilla.org/kb/profile-manager-create-and-remove-firefox-profiles
    *http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Profile_issues
    If the new profile works then you can transfer some files from an existing profile to the new profile, but be careful not to copy corrupted files.
    *http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • Computer hibernates automatically after sleeping for X amount of time.

    I recently bought a VPS and have been sleeping my old personal server when it's not in use.  However, I find that after putting it to sleep, it'll actually go into hibernate after some amount of time.   I would prefer this *not* to happen so that I could easily wake the machine with WOL.  Was hoping someone could point me in the right direction as to what might be causing this.
    I have the acpid and cpufreq daemons which might affect this.  Both of these are setup with the default configurations.  I have laptop mode installed but *not* in the daemons array/running.
    In order to put the machine to sleep, I am simply using "pm-suspend".   Does the default pm-suspend script cause the machine to hibernate after a specified time?  Or, perhaps a script that comes with laptop-mode that is being run on suspend?
    Appreciate the help in tracking this down!

    You can do it with a time schedule in System Preferences > Energy Saver > Schedule.. button.
    Regards

  • Is it possible to have unique pictures for different iChat accounts?

    Hello -
    I am new to Macs and am setting up multiple iChat accounts (Google chat, facebook, work, etc.). However, the work picture seems to be overwriting my picture in Google. Ideally I could have my casual Google picture and my more formal work picture coexist under a single iChat group of accounts.
    I haven't found a way to do this yet. Any suggestions?
    Messages version 7.0.1
    Thanks!

    Hi,
    Although this was possible in earlier version of iChat it is not possible in Messages.
    In earlier Versions you could set up separate Buddy lists (the then default)
    At each Buddy List pic you could call down the change drop down and select a Pic.
    It could be done for each Buddy list.
    In Messages when you do this the Pic changes in all Buddy Lists.
    NOTES
    Changing the pic this way overrides the normal Choice which is the Contacts (Formerly Address Book) pic.
    Changing the Address Book > My Card pic will override the Mac Users Account pic which is the default for that.
    Put another way when you create a Mac user Account you get to chose a pic that is shown in the Login list (Also System Preferences > Users and Groups > your account).
    This gets pulled to the Contacts/Address Book as the My card is created with your other details.
    That is turn is used by Messages (or iChat in Earlier versions)
    You can change them so that your have three different Pictures.
    10:28 PM      Friday; November 9, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Request: script to stream music for given amount of time

    I'm looking for a bash script (or anything that will get the job done) that will:
    -stream music from my favorite internet radio station (ie: di.fm)
    -play stream for a given time in increments of 1hr (ie: 1 hr, 3 hrs, etc)
    -at the end of the given time, fade out the music then terminate stream after fade out is complete.
    -terminate script (or application that is performing these tasks)
    Ideally, the script will take in the internet radio station and time as arguments. I have Rhythmbox which I currently use to stream.  I don't care if the script opens applications for use in this process.  Can anyone help me with this?  Or at least get me pointed in the right direction?
    PS: I plan on using this as my music to listen to while I'm trying to go to sleep, hence the time limit and fade out.  If the music stopped abruptly I would most likely wake up.
    Thanks guys.

    I know in mplayer, you can do most of that.
    For example, running this from console will play Lounging Sound radio for exactly one hour;
    mplayer -endpos 01:00:00 http://67.159.44.146:8002/
    I'm not sure about the fade out effect, you might have to Google for that information. I'd recommend the 'mplayer-svn-nogui' package in AUR (or check out the one here) if you decide to go this route.
    Oh, you might want to check out MPD too... it could possibly do something like this.
    Last edited by Pnevma (2008-07-22 12:56:30)

Maybe you are looking for

  • Jvm crash on 1.4.2_04 BEA/Solaris

    our weblogic managed server crashed on production with tht following error HotSpot Virtual Machine Error : 11 # Error ID : 4F530E43505002EF 01 we opened a case with BEA and they redirected us to SUN as it seems to be a bug in SUN jvm 1.4.2_04. http:/

  • Program doesnt work, tried to make it into array list

    I tried to change this from an array to arraylist and all i got was allot of errors! i was wondering if anyone could help? import java.util.*; import chn.util.*; public class final_proj public void quicks(int first, int last); int g = first, h = last

  • Correlating some parameters in EXIF data

    Is there any way to correlate parameters such as Exposure Program and Metering Mode in the Advanced tab for EXIF properties of File Info shown in Photoshop Elements 4? All that is listed is a number rather than Aperture for Exposure Program of Matrix

  • Photoshop Raw File Import Error

    I'm using CS6 and Photoshop will not open Raw Files. I've updated to the most recent Raw plugin as well as photoshop. I'm running it on a Mac with Yosemite. Is there a solution to importing raw files to photoshop with this set-up.

  • Website comes up fine, but I'm unable to receive live video feed.

    The target website comes up just as it has for the last two years or so, and I can login and be accepted by the software. However none of the live streaming video from any of the cameras on the site is received. Instead I have only a white 4X4 square