[SOLVED] Movie Player Output Position

  • Hi all of you,
    There is something strange with the Movie Player Actor, the Output position is never equal 100%. For me, on different computer and different movies file it is always something like 99,xxx% but never 100%. I don't understand why ? Thanks

  • Tech Staff


    Yes that is true, the output actually never matches the position input but if you play the movie to the end and set the loop enable to off you will see that the movie position output will reach 100%. I did file a bug report once (quite long ago). Maybe it helps if you do that as well.

    Best Michel

  • @Michel

    Thanks for your answer. I have the same issue with the loop enable to off.

  • If my memory is correct isn't this something to do with the codec?

    I'm sure you've seen but you can use the loop end trigger if you need it. 

  • Hello,

    It depend of your "optimize" setting. 
    – with "interactive", position output reach 100 and send 1 trigger on "loop end" output
    – with "performance", it never reach 100 and send multiple trigger on "loop end" output
    I will fill a bug report for the trigger.

  • Thanks @jhoepffner for your explanation. I understand why I had problem

  • Dear @rodgy_fr

    Regarding your report about the Movie Player's position output never reaching 100%, this is to be expected. Let's consider a 5 frame movie as an example. These are the values that would be reported at the position output as the movie plays. Here's what the position output would say for each frame:
    Frame 1 = 0.00% (0 / 5)
    Frame 2 = 0.20% (1 / 5)
    Frame 3 = 0.40% (2 / 5)
    Frame 4 = 0.00% (3 / 5)
    Frame 5 = 0.80% (4 / 5)
    ** LOOP TO START **
    Frame 1 = 0.00% (0 / 5)
    Frame 2 = 0.20% (1 / 5)
    As you can see, the position output reports the position of the starting point of each frame based on the number of frames within the movie. The _starting_ time of the last frame will always be at some percentage before 100%... 100% is never reported  because 100% is would be the starting time of the last frame plus the frame's duration... but before this is reported, the movie has looped back to the beginning.
    Only if you set the 'loop enable' to off will you see the position output reach 100%.. because the movie plays it's entire duration and then stops.
    I hope that explains what's happening.
    Best Wishes,

  • Tech Staff


    one thing that is disturbing is, that most of the time the postion output does not matches the position input.

    Best Michel

  • Hi @mark thanks for your answer. But I have the same issue that explain by @jhoepffner.

  • @Michel,

    Well, Michel, It's a matter of rounding by the AVFoundation/Quicktime/DirectShow subsystems. When you enter a value in the position input of 50%, I can assure you this is exactly where I tell those systems to go. The thing is, they make their own decisions about where the "playhead" can actually go. 
    I just checked this and it looks like AVFoundation will only go to the nearest frame. Quicktime will go a value much closer to the specified value, but even it will not match exactly... this is may be dependent on the sample rate of the audio.... I'm not sure what the limitation is there.
    I assume when you say "But I have the same issue that explain by @jhoepffner." you mean about the end trigger bug, yes? Please confirm this. (I have fixed this bug for the next release.)
    In the meantime, if you need a trigger when the movie gets to the end, use a Compartor actor. Set the 'compare' input to 'ge', and the 'value 2' input to 99.9\. Then you'll connect the 'position' output into 'value 1' and you'll get a trigger when the movie gets to the end.
    Best Wishes,

  • Tech Staff


    Ok I understand. Thank you.

    Best Michel

  • @mark

    Yes it is about the trigger bug. Thank you for your advice

Log in to reply

Looks like your connection to TroikaTronix Community Forum was lost, please wait while we try to reconnect.