Graphics

 View Only
Expand all | Collapse all

Dynamic Set Video playback range from Xpression Script?

  • 1.  Dynamic Set Video playback range from Xpression Script?

    Posted 02-04-2015 22:19
    Hi,

    I did search on the forum but didn't find any relevant topics.

    I have a long Xpression AVI video, and I want to apply different play range settings for different scenes.

    For example, apply start point from 10s and end at 30s for the video at 1st scene. Then apply start point at 40s, end point at 60s for the video Qaud at 2nd scene. Can I do play range configuration in the script? Now, I only see the play range configuration works for Animation controller but Video clip...


  • 2.  RE: Dynamic Set Video playback range from Xpression Script?

    Posted 02-05-2015 05:37
    You can set the play range in the sequencer for individual clips. Alternatively, you can do this with scripting by directing the scene director to a point through the scene.senedirector.Position method but this is much more difficult than it needs to be. Either way you need to make sure the clip is in the scenedirector in order for either of these methods to work

    #XPression


  • 3.  RE: Dynamic Set Video playback range from Xpression Script?

    Posted 02-05-2015 18:57
    Hi Daniel,

    Thanks a lot for your reply. Honestly I still cannot make it work... can you explain it more detail?

    In the scene, I have a Quad whose material is attached to Xpression AVI video. And I tried to set play range for the scene, but no matter which range I set, the video of Quad always plays from the start to the end, playing totally length of the clip...

    #XPression


  • 4.  RE: Dynamic Set Video playback range from Xpression Script?

    Posted 02-05-2015 19:17
    Open your scene director for the scene you are working on and drag your avi from the materials manager onto your scene director. Other wise the video will just free play, this should make it so that the video plays based on the scene director instead.

    #XPression


  • 5.  RE: Dynamic Set Video playback range from Xpression Script?

    Posted 02-05-2015 19:41
    Daniel,

    I tried to drag the avi video to scene director... but I found I can only drag it to "Track 1" to ~ Track 3. And even if I drag the video on Track 2 for example, I cannot see the video from Preview. Seems like the behavior is totally different from setting material to Quad.

    Did I misunderstand any thing?

    #XPression


  • 6.  RE: Dynamic Set Video playback range from Xpression Script?

    Posted 02-05-2015 19:44
    The behavior will be different when you take the scene. You still assign the video to the quad but you also place the video on the scene director. Take the scene and it should work.

    #XPression


  • 7.  RE: Dynamic Set Video playback range from Xpression Script?

    Posted 02-05-2015 19:59
    https://drive.google.com/file/d/0B_W64UoqloIkbUdocXNpekQwdXc/view?usp

    Daniel,

    Very sorry for keeping asking you this stupid question. I attached the screen shot above. You can see how I drag the video into the Scene director. I followed what you instructed that applying material to one of the Quad named "background" and drag the same video to scene director "Track 2". Then I shortened the Track 2 clip length to 200 frames, and try to preview it from the Sequencer... but I didn't find any difference that the video still playback from the beginning to the end... May I know how did you setup it step by step?

    I appreciate for your kind help.

    #XPression


  • 8.  RE: Dynamic Set Video playback range from Xpression Script?

    Posted 02-05-2015 20:01
    Can you package and post your project?

    #XPression


  • 9.  RE: Dynamic Set Video playback range from Xpression Script?

    Posted 02-06-2015 00:12
    Hi Daniel,

    Sorry for being late. It took me some time to upload the project and test video. Please download project file from below link and test if you can set specific play range for the video.

    I hope we can find out the problem.

    https://drive.google.com/file/d/0B_W64UoqloIkZDRPR0s2Y3k5VE0/view?usp=sharing

    Thank you!

    #XPression


  • 10.  RE: Dynamic Set Video playback range from Xpression Script?

    Posted 02-06-2015 01:16
    Found your issue. Disable the auto start on the video material manager. To do this open your material manager, right click the video and select edit. Then select the video tab under the Layer 1 and in the section labeled "Run Mode" uncheck the option for auto start. Make sure you drag the clip back into the scene director before you move on.

    Once this done you flip over to sequence mode and drag your scene into the sequencer. Select your scene in the sequencer then in teh "Take Inspector" go to the "Scene control" tab. Here you select the play range option and set the range to however many frames you would like.

    #XPression


  • 11.  RE: Dynamic Set Video playback range from Xpression Script?

    Posted 02-06-2015 14:57
    Hi Daniel,

    Thank you very much to help me on this. It works and I can set different range to scenes now!

    Btw, when I use scene director with video, can I dynamic change the video clip from Script? For example if I want to replace "Spring Video" to "Summer video" according to the season, can I change it from script?

    #XPression