Implementing an Effect that looks ahead in the source

Hello all,
I need to create an application which reads from one AVI file, processes each frame with a special effect, and outputs the result to another AVI of the same format. Fairly standard stuff.
I am fairly new to JMF but I think I have the basic methodology right: creating a Processor, and then during the Configured state, adding a new Effect to the Codec chain of the Processors first TrackControl.
The thing I am unsure about is this: the Effect I am programming needs to 'look ahead' in the source i.e. it needs to see frames 1, 2 and 3 before it can write frame 1 of the output.
Does the process(Buffer input, Buffer output) method of Effect is called for each frame of the video, providing a Buffer for each frame at a time? In this case can I buffer the first three frames for myself, and withhold output until the third frame?
Or is process(Buffer input, Buffer output) called once by the Processor, with the in/out buffers represent the entire stream and able to be read and written to 'asynchronously'? In this case, when I use javax.util.BufferToImage to get my actual frames to apply the effect, do successive calls step through the frames, how do I reference specific frames from this context?
I'll stop speculating now - I hope someone can nudge me in the right direction... Thanks very much for any advice.

Hello Darkmoon_UK,
Your problem seems similar to my one.
I want to implement a slow motion effect with jmf. I also read from an avi file.
First thing I hava to ask is, whether your effect simply plays the original video into the new file, if you only add
output.copy(input);
into process()-method.
I dont't know if it is important, but I add the new Effect to the codec chain AFTER ConfiguredCompleteEvent, not during Configured state. And this works (at least simply playing the video works, not my slow motion effect ;-) ).
Next thing is you should insert some System.out.println()s into your process()-method code to discover that it is called several times (for each frame of the video).
I think it is possible to buffer all the frames into an collection out of java.util.* and make a specific variable (int frameCounter) count the frames by calling frameCounter++; at the end of the process()-method. Same effect is using input.getSequenceNumber(), I think. With the help of a Collection of java.util (ArrayList or something else), it should be possible to access any frame out of the video.
Well, I'm also still learning and trying to force JMF to do what I want, not the other way round, as it is at the moment. I hope this little bit of information I gave you could help you solve your problem or at least nudge you in the right direction.
Bye,
sscheer81

Similar Messages

  • How can I unlock my iphone??? on the screen I only have the apple logo and  a thing that looks like if the phone is working but no advance

    how can I unlock my iphone??? on the screen I only have the apple logo and  a thing that looks like if the phone is working but no advance

    Hi,
    Try a Reset of the Phone... You will Not Lose Any Data...
    Turn the Phone Off...
    Press and Hold the Sleep/Wake Button and the Home Button at the Same Time...
    The Apple logo will Appear and then Disappear...
    Usually takes about 10 - 15 Seconds...
    Turn the Phone On...
    If that does not help... See Here:
    Backing up, Updating and Restoring
    http://support.apple.com/kb/HT1414

  • Can I still get CS5 trial - I have limited internet access and just want software on my pc - I am only running vista so that looks to be the latest that  will work for me

    Can I still get CS5 trial - I have limited internet access and just want software on my pc - I am only running vista so that looks to be the latest that  will work for me
    If so what url do I go to as I have been round in circles and always come back to CC
    Thanks

    Downloadable installation files available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  13 |12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  13 |12 | 11, 10 | 9,8,7
    Lightroom:  5.7.1| 5 | 4 | 3 | 2.7(win),2.7(mac)
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.window using the Lightroom 3 link to see those 'Important Instructions'.

  • I would like to create the same mouse over effect that is used on the home page of Industrial Light

    I would like to create the same mouse over effect that is used on the home page of Industrial Light & Magic website. http://ilm.com
    Could someone please let me know what the code or effect that is used. Thanks.

    It appears there are two slideshows running in parallel where a mask that follows the mouse displays one of them.  THe one you see in the moving mask is on top of the other.
    If you were to search Google for a custom cursor tutorial you will probably end up with most of what you need for getting the mask to follow the mouse.  

  • Best approach to delete records that are not in the source table anymore.

    I have a situation where I need to remove records from dimensions that are not in the source data anymore. Right now we are not maintaing history, i.e. not using SCD but planning for the next release. If we did that it would be easy to figure the latest records. The load is nightly and records are updated and new added.
    The approach that I am considering is to join the dimension tables the the sources on keys and delete what doesn't join. However, is there perhaps some function in OWB that would allow to do this automatically on import so it can be also in place for the future?
    Thanks!

    Bear in mind that deleting dimension records becomes problematic if you have facts attached to them. Just because this record is no longer in the active set doesn't mean that it wasn't used historically, and so have foreign key constraints on it in your database. IF this is the case, a short-term solution would be to add an expiry_date field to the dimension and update the load to set this value when the record disappears rather than to delete it.
    And to do that, use the target dimension as a source table, outer join it to the actual source table on the natural key, and so your update will set expiry_date=nvl(expiry_date,sysdate) to set to sysdate if this record has not already been expired on all records where the outer join fails.
    Further consideration: what do you do if the record is re-inserted into the source table? create a new dimension key? Or remove the expiry date?
    But I will say that I am not a fan of deleting records in most circumstances. What do you do if you discover a calculation error and need to fix that and republish historical cubes? Without the historical data, you lose the ability to do things like that.

  • Effect that looks like video being smashed?

    I have a piece of video that is full screen at 720x480 and the client wants a person's foot to come in from the top and smash or crunch the video down to expose just the foot (smash the competition -get it?). Would this be possible in either FCP or Motion? I'm thinking some kind of wipe effect or jagged wipe effect. Any suggestions?
    Thanks,
    John Schenkel

    i'd look into motion on this one. FCP can do wipes and garbage and stuff like that but that is ultimately 'cropping' the video if you will and not distorting it. check your motion manual and look up effects. Distort, corner pin, things like that. the manuals are easy to read. if you are still having trouble check the motion forums. good luck

  • I am unable to watch any tv channel due to the problem that it says is the source code is protected by html guardian. how to solve this problem?

    when i tried to watch a tv channel on livetvchannelsfree.in it says that the source code is protected by html guardian. in firefox 3.6 beeta5 i did not come across this problem. but now in latest version i am unable to watch any tv channel. canyou please tell me how to solve this problem?

    Forgotten Passcode or device disabled after entering wrong passcode

  • How do I resize effects that I create in the "effects gallery"?

    Part 1:
    I am attempting to use Illustrator to vector a map so I can see detail in zoom as close as 50' to 100'. Where the original scale is about 15,000' by 21,000'. My current problem is setting what I do in the effects gallery (textures, grain, etc...) so that they don't look so pixelated zoomed in to about 50' to 100'.  This map will be used in another viewing program so setting up links will not work. If I need to I can do the map in segments as the entire map does not have to be so detailed, but it would be nice to have one complete map (if possible).
    My basic questions:
    1. How do i set it up so the graphics come out clear at a close zoom?
    2. Is there a place I can get some free mapping textures (different types of stone, marble, earth, concrete, etc...)?
    Part 2:
    3. I have a lot of mapping textures but they are in .png format. I tried converting them in illustrator but they always come out solid colors. What is the proper process for converting/importing testures into Illustrator. I am using CS6.
    Bruce

    Here is what you should do:
    1. Get SharePoint Manager from Codeplex, if you've not already. It's a freeware with very useful feature for people like us.
    2. Run SharePoint Manager as administrator 
    3. Under the site -> List -> Fields, change the property of Workflow field Allow Deletion True
    4. Open the site in SPD, Edit List coulmns, Show Read Only columns & finally delete.
    Hope this helps :)

  • A page that looked fine in the last version does not look correct at all in 3.6.3, although it looks fine in both IE6 and IE8

    This is a log-in page, which points to our email registration software's server (Tikit's Emerge Reaction Server). If you open in it in the last version of FF, it looks as expected. The page renders fine in IE6 and IE8, and all our other website pages (www.mofo.com) render fine in both ver. of FF - its just the pages that point to our emerge-reaction server site that won't render properly. Tikit says we are the only user having this problem, and they don't know what the problem is caused by. Help!?
    == URL of affected sites ==
    http://emerge-reaction.mofo.com/reaction/RSLogin.asp?eventId=TOPICS

    Looks like a problem with the [http://emerge-reaction.mofo.com/reaction/styles/RS.css CSS file]: missing quote in url and a trailing, extra, '}' in line 331
    See the Tools > Error Console.
    <code>.header }
    .header
    </code>

  • PSE user since the old Album `1.  Accumulated a 20K or more photo catalog.  Stopped upgrading at PSE 10.  How do I translate all the categories, sub categories and tags in PSE 10 to the new versions that look alot like the system in Lightroom??

    How do I convert my catalog and the Categories, Sub Categories, and Tags in PSE 10 to the newer versions like PSE 12 or 13??
    The new organizer looks a lot like Lightroom with the computers filing system, not the organizer I have been using for about 10 years.
    Can I upgrade and somehow retain all the organization I presently have?

    How do I convert my catalog and the Categories, Sub Categories, and Tags in PSE 10 to the newer versions like PSE 12 or 13??
    The new organizer looks a lot like Lightroom with the computers filing system, not the organizer I have been using for about 10 years.
    Can I upgrade and somehow retain all the organization I presently have?

  • Looking for a theme that looks like the default theme.

    I'm looking for a theme that looks exactly like the default theme, but that doesn't use the colours of my gnome theme. Right now I'm using a dark gnome theme that looks great, but looks horrible with firefox. Anybody got any suggestions?
    Alternatively, is there another way to make firefox ignore my gtk theme?

    I don't like the way firefox themes look, I want the default theme, but without gtk coloring. Surely it must be possible?

  • How to create a globe effect that text moving around?

    Hi everyone, I'm doing a project for my school and I found a effect that looks kinda cool on you tube but I don't know how to create it. This is the link to that video clip:
    http://www.youtube.com/watch?v=FUgM105uN4c&feature=related
    You can see that effect about 20 seconds of the clip.
    Please help...thanks.

    There's a
    tutorial on Creative COW about this, and an
    example project on the After Effects Exchange.
    I found these by doing this
    After Effects Community Help search for 'globe'.

  • Can I set a default to effect settings? Or apply the same effect settings to multiple clips?

    If I want to set multiple clips to have the same effect, can I do that without resetting the effects every time I add it?
    Or can I set a default setting to an effect that is different from the default default?

    ATalkingFish wrote:
    Can you elaborate on how to use copy/paste attributes with effects?
    the Manual says :
    http://help.apple.com/finalcutpro/mac/10.0.6/#ver3029fc422

  • How do I create an emergency stop custom control in LabVIEW that looks like an actual E-stop button

    How can I find (or buy) a variety of custom controls for various applications that look better than the standard NI controls.

    Here is a simple E-Spot button. Warning: I'm no artist . I made the pictures in Word, edited them in MS Photo Editor and imported them into LabVIEW
    Attachments:
    E-Stop_Button.ctl ‏51 KB

  • ADPRECLONE.PL PREPARE THE SOURCE SIDE EFFECT

    we want to clone our production server (24/7) server and as far as we know that
    when you Prepare the source system tiers for cloning it will chage things on it
    like some profile option, workflow ...etc. so since its an prodction system i
    would like to know what the perclone change exactly on my prodution system and
    what can i do to prevent/recover those changes.

    Hi, the first step in the cloning process with rapidclone contemplate run a preclone process in the source server, this process ago the following thing:
    1.- Create on $COMMON_TOP, a directory called "clone", with a basic structure of executable, scripts, templates and java files.
    2.- Later to the creation of the clone directory, the process picks up important information of your source system with which upgrades the necessary templates for the process adcfgclone that was carried out in in the target server.
    The adpreclone process not affect your source system, and your can run this process with the application up and running.
    Regards

Maybe you are looking for

  • "Run Script" (F5) Flacky Behavior with CREATE PROCEDURE and PACKAGE

    When I have the following create statement in a SQL Worksheet and run the script using "Run Script" (F5), I get the "PROCEDURE bogus Compiled." message. Why does it not tell me that there was a compile error? The procedure is marked with a little red

  • Check form assign

    Hi all, I assigned cheque form in the payment method in co.code in fbzp, as F110_PRENUM_CHCK. But during the cheque printing, the format of the cheque is coming other format. which is taking from other form (customized form ZFI00_MYKL_CHK). how to ch

  • Hdr not displaying all options

    Hi there, I seem to have a really strange problem with photoshop cs5. I installed on my samsung nc10 and when I go Image--> Adjustments-->HDR toning, not all the options come up, there are some missing, it's like the hdr toning window is "hiding" som

  • Unwanted tabs opening

    How do I stop Safari opening new unwanted add tabs

  • Left Click No Longer Works

    I recently upgraded my MacBook Pro to 10.8.3. After I upgraded my MacBook I could no longer left click on anything. I verified that it is not my mouse, it is affecting my trackpad as well. I have also verified that the buttons have not been reversed.