Counting No of Frames

Hi All,
I want to know if there is a way of counting the number of frames a particular media file has without going through and simply playing the whole clip and counting each frame as it is played. I am a newbie to JMF so go easy guys if I have missed something really obvious,
Adam

sure
it is possible use Framepositioningcontrol on a stopped player
     fpc = (FramePositioningControl)player.getControl javax.media.control.FramePositioningControl");
     duration = player.getDuration();
     if (duration != Duration.DURATION_UNKNOWN)
totalFrames = fpc.mapTimeToFrame(duration);
greetings Sven

Similar Messages

  • Counting number of frames played

    Hi
    i am interesting in counting the number of frames which are already received and played. I am not interesting in grabbing or editting the frames. Just count them. Any propositions will be greatly appreciated. I think i should use getSequenceNumber( ) but how? I mean should i first create a byte[ ] from my datasource? I am quite confused. Anyway, if anybody has any ideas please send them.....
    Thankssss

    Hi pn@voip,
    first of all thanks for ur feedback. I wasn't really careful while reading the DataSourceReader :) i can finally count the sequence number.
    As for ur problem, i came up with a probable solution (i don't know if it is the best one). I guess u r getting info (Sequence Number, Time Stamp, Length) about ur media from a Buffer. If not, check again DataSourceReader. So, after having calculated the random sequence number i propose using
    buffer.setSequenceNumber(sequence_number)
    then
    buffer.getTimeStamp( )
    and
    buffer.getLength( ).
    In this way u have the begin point (buffer.getTimeStamp( ))
    and the end point also (buffer.getTimeStamp( )+buffer.getLength( ))
    U have to be a bit careful with the formats (sometimes it is long, others int)
    I think it will work :)
    And a question: for transmitting the received data what do u propose? I don't want to save them so i just merge the datasources in order to be able to play the data from the beginning. However i am having some small problems.
    Thanks

  • Warp stabilizer counting much more frames than actually exists...

    Hello, everyone!
    I've just installed Premiere CC 2014 and I'm having problems with Warp Stabilizer... I'm trying to use it in clip with 25s and 24fps, but when I click "Analyze" it shows 1035764 frames! Also, it will take 2560 minutes to analyze it all! Doing the math, it should have only something like 600 frames and take much less time...
    I know this stabilizer is very buggy, but I couldn't find a solution for this. Can anyone help me?
    Thanks in advance!

    Well, for some random reason, if I replace each file for itself the bug disappear, i had to do this one by one. If anyone have the same problem, try doing this.
    This solves the problem for now, but it took some time to discover and to solve it. Hope it doesn't happen again.

  • Frame counter or timer

    Does anyone know of a technique to show a timer inset or a frame count in the frame? I am making movies of screen captures as jpgs (roughly 3000 images). I tried the plug-in called Timer from cf/x and it crashed every way i set it up.
    Any ideas? thanks!
    macbook Mac OS X (10.4.10)
    macbook   Mac OS X (10.4.10)  

    In case anyone else has this problem, I thought I'd close this question with what I've learned. The timer's I tried both worked with imported videos, like QT, but not with a string of stills (jpgs). I did export the stills to QT and then import to iMovie, but the timing was not precise enough... i.e., it was more than 10% off from actual time elapsed, and this was a case where precision mattered, not aesthetics. So the question is answered, but the problem is still out there.
    I really wish the jpg metadata could be captured and displayed before using QT or iMovie

  • Count repeating frames occurance

    Hello,
    In the report there are multiple queries. I am trying to count the total number of repeating frames. Basically, I need to count the final output.
    When trying to use "Count" or "Sum" aggregates inside of SQL, I don't get the needed output. Is there some way to give a number to a repeating frame and then sum up its occurance? I tried different ways, but wasn't successful.
    I appreciate your help.

    Hi Slava
    Create a placeholder column, CP_1, at report level. Set its "Value if Null" property to zero.
    In the group on which the repeating frame is based, create a formula column and set its code to:
    :CP_1 := :CP_1 + 1;
    return :CP_1;
    This will (indirectly) return a running count and finally the total count of repeating frame instances.
    Regards
    Sripathy

  • Make anchored text frame after it is move in to story

    Hi,
    In my document have 4 stories. and one text frame
    this text frame is make of anchored text frame and it move in story 1
    It is possible ?
    please help me...
    my coding is shown in below
    tell application "Adobe InDesign CC 2014"
            set storyofset to story offset of myElement-------------->myElement is particular xpath
            tell storyofset
                set anchored position of anchored object settings of text frame 1 to anchored
                set horizontal reference point of anchored object settings of text frame 1 to anchor location
                set anchor xoffset of anchored object settings of text frame 1 to 0
                set anchor yoffset of anchored object settings of text frame 1 to 0
                set text column count of text frame preferences of text frame 1 to 1
            end tell
        end tell
    thanks in advance.
    by, John Peter.

    I copied text & paisted it and then draged the 3 photos from the file...then clicked on the photo then clicked the inline boxon tool bar nexed to floating one and that is how I did it
    I do not know what you mean "cut & paist"  how do I get the photo in from my picter folder if I do not drag it to the page in Pages? 
    I went to my photo folder and copied a photo and paisted the photo on the top left part of the page and it went there but there was no text to the right of photo...I could crop the photo to what ever size but no text to the right of photo...
    This is just too big of a mess of a program as it should be easier then this,,,I hav e 300 photos in this project and would have to re-paist them all...that is nuts...
    I see the button to the right of inline and floating that has 6 [lace to have the photo but the text does not float around the photo...
    If this is what your talking about this very little freedom in my page layout as I need it to let me place it where I need it to be and the wrap the text...
    There has to be an easier way to get my books ready for other formats other that Apple's iPad...iBooks Author was way eisier to make ready for iTunes...Love that program!!!
    Want my books for sale on all the other formats and was told by Apple Pages whould do it...
    I must be be out to lunch or the designers at Apple are ???

  • How can I make a counter in Flash (with AS3)?

    Hello! I'm new to Actionscript, and I'd like to learn how to create a number counter that goes up each time it passes a frame on
    the main timeline. How can I do this?

    Declare a variable to hold the counter value and in the desired frame increment it by 1. 
    Example:
    // frame 1:
    var counter:int;
    // desired frame
    counter++;

  • RAM Preview timecode counter ... where did it go?

    This issue has been bothering me for a while now, but I've kept forgetting to inquire about it until now and really hope someone knows the answer ...
    Up until recent versions of AE, while RAM previews were being generated the frame-by-frame timecode would count off in AE's viewer window as each frame rendered. That was very useful when using RAM previews to review compositions frame-by-frame for various reasons, rather than only to see real-time playback. That feature went away somewhere around CS1 or CS2 and I miss it terribly since it is very useful for identifying specific frames that one couldn't possibly pinpoint during realtime playback.
    Was the feature replaced by some new way of accomplishing the same that I just haven't found yet?
    people attempting to help have directed me to the Info Panel, which indicates I haven't explained my question clearly enough since the Info Panel doesn't display frame-by-frame timecode as a RAM preview is generated ... only the total number of frames, not an actual timecode count as those frames render.
    Thanks for any help and, if any of the Adobe AE team happens to see this, please consider this a request to return that very useful feature to AE.

    Thanks, Todd.
    I've just submitted this as my second AE feature request ever ... I was actually hoping the feature had just been moved somewhere I hadn't found it yet since I didn't have any luck with my first AE feature request, which I think I've submitted once per version since version 4 ... to do away with the loaded plugin limit that forces plugins into a randomly organized "other" folder when the user has someone's idea of "too many" plugins installed. I've heard various arguments for why it shouldn't matter, but have yet to hear one that genuinely seemed valid, although I do understand how it can be a non-issue for many AE users depending on differences in circumstances, project types, workflow, etc.

  • Stopping a while loop using the time difference of two tick counts

    Hi Guys,
    I'm currently writing a code which test how long does it take for a formula node to perform its operation. The program uses a while loop to perform the calculation, and the program stops after calculating when tick count has reached 10 seconds. The program then displays the number of iterations it does in 10 seconds. 
    So initially I created 2 frames of sequence structure. In my first frame I have my initial tick count, and in my second frame I have my final tick count and the while loop. I used the subtract function and divide the output by 1000 to get the time difference. Then using the comparison function, I set if output > 10 then the program should stop, to do this I linked the output of the comparison function to the stop button inside the while loop. 
    However, when I tried to run the code, the program just didn't run. Hence I created a similar program which puts the last tick count in new frame sequence. When I ran this code, the program never stopped. 
    Do you guys have any idea what went wrong with my codes.
    Thank you!
    Erry
    Solved!
    Go to Solution.
    Attachments:
    1. Tick Count.vi ‏27 KB
    tickcoun2.vi ‏27 KB

    Dataflow!
    In both VI's the stop terminal of the while loop is controlled by a boolean whose source is ouside of the while loop.  So that loop will either run once, or run forever, depending on the value of the boolean that is calculated before the loop starts and shows up at the tunnel going into the loop.
    I would recommend looking at the online LabVIEW tutorials
    LabVIEW Introduction Course - Three Hours
    LabVIEW Introduction Course - Six Hours

  • Display Current Sequence Frame?

    I'm trying to output the current/active sequence frame to a front
    panel indicator. Is there a direct way to hook into the sequence
    structure indicator, or will I have to stich a increment function
    throughout all the frames with multiple sequence locals. It would be
    nice to be able to programatically access the sequence structure's
    total frame count and current frame for use as a program progress
    indicator.

    You could replace the Sequence structure with a Case inside a While loop. Wire the iteration of the While loop to the Case selector and to the terminal for the front panel indicator. Each case represents one frame in the Sequence. Each case will have a boolean constant wired to the Continue terminal of the While loop: in each case but the last, the constant will be True; in the last case it will be False.
    Sorry this isn't the simple answer you were looking for. This approach also works well if you have a sequence which you normally execute end-to-end, but, for some conditions, you may want to end the sequence early. Then just replace the boolean constant with a boolean expression within each case that determines whether or not to continue based on the events i
    n that case.

  • Getting number of Words in a Frame in CS4

    Hello All,
    I am trying to get the number of words in a Text Frame. I tried the API GetWordCountInfo of ITextUtils
    For E.g. Utils<ITextUtils>()->GetWordCountInfo(  iTextmodel, 0,  iTotalLength, ITextUtils::kUpdateAll, ITextUtils::kStartCounting,
          wordStarted,  characters,   words,   paragraphs,  lines, oversetCharacters,  oversetWords,  oversetParagraphs, oversetLines,  bWordAcrossOverset,
          helper  );
    I am took the value of words and checked. I am getting value such as 2049679. Even though there is no text in the frame. Am not sure what wrong value I have given as a parameter required.
    Has anyone tried this before. Or Is there some other way of getting the word count from the frame. If so please do let me know.
    Thank you all in advance.
    Regards
    Farzana.

    Hi ,
    I have declared the parameters to the function as uint32.
    And when I see them in alert I am converting the same to int32 by using ToInt32(). I tried using uint32 appending directly as number to my string variable. But it gives same output in alert.
    Thanks
    Regards
    Farzana,

  • Undersize frame on 802.1Q trunk with extreme switch

    i configure a 802.1Q trunk between 3750 and a summit7i extreme. The show controller ethernet-controller command show that the counter of undersize frame progress regularly. EDP on extreme is off for the ports, also for spanning-tree

    Roger,
    It sounds like it could be a duplex problem. A switch-to-switch connection should be able to run at the fastest speed that the ports have in common, and should be full duplex for maximum performance.
    Undersize packets normally come from collisions in the form of fragments (undersize packets with bad CRC); there shouldn't be any collisions on a full duplex connection, though.
    It could also be that if the Extreme switch is sending undersize packets with good CRC then maybe the software on the Extreme switch needs updating.
    What kind of ports are you using to connect the Cisco Catalyst 3750 to the Extreme Summit7i? What speed and duplex does each side of the link report? Is one side set to autonegotiate, and the other set manually to a fixed speed and/or duplex? What's the distance between the ports? And the media being used: copper UTP, multimode fiber, or single-mode fiber?
    If copper (RJ45 connector) on the Extreme switch, it could be to either a Gigabit-only Ethernet GBIC; or built-in autonegotiating 100/1000BASE-T, depending on the model number of the switch. On the Cisco switch, it could be 10/100 or 10/100/1000 depending on the switch model, or 1000-only if you're using the 1000BASE-T SFP.
    If fiber (SC or MT-RJ connectors) on the Extreme switch, I don't recall whether their Gigabit-only fiber ports give you the option of what duplex you run. But the Cisco switch's Gigabit-only fiber ports always run in full duplex mode only.
    Whatever ports you're using, the actual connection speed and duplex on each end of the switch-to-switch link need to match. Either both ends autonegotiate to matching values; or you need to manually set these values.
    Here's a link that might also be useful:
    Troubleshooting Switch Port and Interface Problems
    http://www.cisco.com/warp/public/473/53.shtml
    Hope this helps.

  • Code for Presentation Slide Counter

    I have a slide presentation I have created with a slide
    counter. My problem I am haveing is the slide counter updates
    current frame and total number of frames from the "_root" or which
    is the begining of the flash document. I have created a preloader
    on a previous scene. What happens is the slide counter is adding
    these 3 or 4 key frames into its total. So when the presentation
    starts it shows its starting on "slide 5" and not 1.
    Question: Does anyone know how to have the code read the
    amount of slide in the current scene rather than the entire Movie
    (_root)?
    I have pasted the code below. Any ideas, help, or suggestions
    would be more than appreciated. Thanks in advance.
    Luke
    onClipEvent (load) {
    function updateFrame (inc) {
    // send slides to new frame
    newFrame = _root._currentFrame + inc;
    _root.gotoAndStop(newFrame);
    // update status indicator
    totFrame = "/ " + _root._totalFrames;
    curFrame = _root._currentFrame;
    if (_root._currentFrame == 1) {
    prevBtn.gotoAndStop(2);
    } else {
    prevBtn.gotoAndStop(1);
    if (_root._currentFrame == _root._totalFrames) {
    nextBtn.gotoAndStop(2);
    } else {
    nextBtn.gotoAndStop(1);
    updateFrame();
    Thanks Again for any help!

    Got it!
    THANKS FOR YOUR HELP! You pretty much had it right away with
    a little tweaking. Thanks again!
    onClipEvent (load) {
    function updateFrame (inc) {
    // send slides to new frame
    newFrame = _root._currentFrame + inc;
    _root.gotoAndStop(newFrame);
    // update status indicator
    totFrame = "/ " + (_root._totalFrames-5);
    curFrame = _root._currentFrame-5;
    if (_root._currentFrame-5 == 1) {
    prevBtn.gotoAndStop(2);
    } else {
    prevBtn.gotoAndStop(1);
    if (_root._currentFrame-5 == (_root._totalFrames-5)) {
    nextBtn.gotoAndStop(2);
    } else {
    nextBtn.gotoAndStop(1);
    updateFrame();
    }

  • Catalyst Express 500 complains about undersize frames

    Hi,
    The exact switch model is WS-CE500-24PC.
    It claims, that devices connected to its ports are generating undersize frames. The connected devices are IP phones with PCs. Moreover I've got messages about undersize frames on Gigabit ports, which are configured as GigaChannel and are connected to another WS-CE500-24PC. The interface counters are showing, that a lot of undersize frames are received, not send. I think, that such big count of undersize frames severely degrades the performance of the switch. Is there any way to diagnose this problem?
    PS When the same endpoints are connected to a "normal" switch, like 2950 or 3500, there is no any problematic frames counted in the output of the "sh controllers ethernet-controller" command.
    Thanks and regards,
    Denis

    When the switch receives a 60-63-byte dot.1q encapsulated frame, it counts it as an undersize frame, but it will forward the frame correctly. There is not workaround for this issue, since the problem is not in the switch, the switch is only reporting that it is receiving this frames in the interface, the frames are generated by the connected device and not by the switch. If you do not experience network connectivity issues in the interface reporting this issue I believe that the issue can be consider as a cosmetic.

  • Premiere exports and rendering too slow

    I’m using Premier Pro CC on a 2012 MacPro (aluminum box) with 16gigs or RAM.
    I have to say that being a long time Avid Media Composer editor I am very, very pleased with the UI and overall capability of Premiere. It’s loaded with tiny nuances that Avid should have incorporated a long time ago. I am in love with this software.
    Or at least I was until I went to export my files. What a slog! I’m sorry but the exports are out to lunch. A six minute 1080p 23.976fps sequence with a few titles, a basic colour effect and two tracks of audio takes…. 3 hours?!?!?? What the heck? If I was rendering an equivalent sequence in the Avid I’d be done rendering any effects and exporting a source QT by the time I finished this sentence. And if I set that QT up to encode in Sorenson I’d have my MP4 done by the end of this email. And the Avid doesn’t need to use any external hardware to ramp things up. In addition, just typing this email while Media Encoder pushes through the output (even with Premiere closed) is causing my whole system to slow down to a point that I find my computer basically unusable for anything else. 16 gigs of RAM and 2x six core processors and it’s acting like it’s 1996 running OS7.
    Now wait, I hear you say, you can do so much more in Premiere. Yes, I can. But the moment I drop, for example, an After Effect link in there…I can feel the system trying to race glaciers - and losing. What I don’t get is if I were to use the the equivalent clips in After Effects doing the equivalent type of effects the render would be way faster than Premiere --- and it’s the same company! And don’t get me started on Speedgrade. I’m better off doing an oil painting of each frame than using that Dynamic Link function. And teh dynamic links are what encouraged me to try all this in the first place.
    Pre-rendering everything is not only awkward but appears to have no effect on the export time - or playback for that matter. In fact I find the rendering of effects rather confusing and horribly inaccurate - both in its estimate of time to go and the number of frames to process. And what is a 'video preview’ anyway -is that the number of clips? Effects?  Effects and clips? Grains of sand on a beach? And why does it’s number keep going up too? It just keeps climbing for no reason I can see. C’mon Premiere…it’s basic math- you count how many frames and then that’s the total number of frames. Why are you recalculating? And did you borrow your time estimate code from Windows 98’s progress bar? One thing it does tell you accurately is how much time you’ve been waiting. That’s handy (not). Oh and I sooooo love the fact that if I quit the rendering process it keeps NOTHING from what it did before. So i have two choices: quit this seemingly endless render to try something else only to find it didn’t help ... or stay put and watch my life drip away into nothingness. Right now, on a second sequence, it says "ETA - 13 seconds left" for, like the LAST 2 hours.
    I can’t help but think Premiere is too caught up on render-free editing and it’s glorious Mercury Engine when they should be making it faster & easier to render effects for smoother playback and much faster exports. In my Media Composer I may not have as much robust real time function as I would like but it doesn't choke on the basics (title, colour crrection, dissolves) and the renders are so fast I don't care that I even have to render.
    Maybe I’m doing something wrong but I’ll be damned if I know what. And no one else is talking. As I skip around the Google-sphere I’m amazed how many people are posing about speed issues (very common Google search result) and so many other editors are retorting “seems pretty normal to me”. No it ain’t. This is NOT normal. This is painfully slow and in no way reflects the current state of speed for import & exports in NLEs.
    I’ve watched every tutorial I could find, picked over every preference, closed every other application, tried different media types, purged every bit of cache and even restarted with no discernible difference. At this stage I’d be thrilled to find out if I’m doing something wrong. But until then I’m afraid this software will not be a regular part of my tool set. This is very disappointing from Premiere given how everything else seems to work so well. Such a shame. This software could kick some serious butt otherwise.
    Maybe Premiere will announce that they have a new render engine at NAB?…crossing fingers? Don’t think so.
    ><({(º>

    Thanks for the reply SAFEHARBOR11.
    I agree, something isn't right. I've watched tutorials where the renders appear to happen in a "reasonable" amount of time and the numbers of frames and videos prviews never increases. So I don't know what is going on with me.
    While I have researched into render/don't render workflow with Premiere I can say I tried both ways only out of desperation.
    For my system, a MacPro from 2012, we got only one choice for a video card from Apple - ATI Radeon HD 5870. I tried to get a CUDA enabled card (3rd party) installed but despite tremendous research I could not find something that was authorized to work on my system. At the time I wanted the CUDA to accelerate by Sorenson encoding.
    One 2011 post suggested  that my issue was related to corrupt media. They had suggested that I try and isolate the timeline down by testing one section at a time with exports until the exports went from fast to excruciatingly slow. As I was working on multiple sequences without common media between them I had reasoned that the software may not have liked my Sony F5 native media (although it plays it just fine). So I took the time to transcode all my footage and use that instead—  with absolutely no difference. Even if it did make a difference I’d be disappointed because working natively with my media in Premiere was a huge time saver, unlike the Avid which claims to work with native media but really it leaves the system and editing sow & unresponsive so I usually end up transcoding anyway.
    My media encoder settings were the template h264 as a Youtube 720p, 23.976 file. Nothing remarkable there. (Although I did  try other settings to see if that affected anything - it didn’t).
    ><({(º>

Maybe you are looking for