#1
|
|||
|
|||
Video function setTime() is hit & miss
Hi all,
I am using the video set/stopTime functions to play clips of a long video, at different points in my application. However, the playback jumps to a point at the beginning of the video once I call setTime(). This odd behavior appears totally random and have found no pattern regarding its occurrence. Weirdly enough this point is always the same, around the 12th second of the 5-min video (mp4 175MB). Due to the size I cannot upload the video. My code is very simple and the values I pass (start/stop) are always correct: Code:
self.video.setTime(start) self.video.stoptime(end) self.video.play() Thanks! |
#2
|
|||
|
|||
I don't think I've seen this before. Does it also happen when running the following script? Can you upload the video and I'll try to reproduce the issue?
Code:
import viz import vizact viz.go() quad = viz.addTexQuad(pos=[0,1.8,3]) video = viz.addVideo('video.mp4') video.play() quad.texture(video) vizact.onkeydown('1',video.setTime,0) vizact.onkeydown('2',video.setTime,30) vizact.onkeydown('3',video.setTime,60) vizact.onkeydown('4',video.setTime,90) vizact.onkeydown('5',video.setTime,120) vizact.onkeydown('6',video.setTime,150) |
#3
|
|||
|
|||
Jeff,
I played around with my implementation, which was more complicated than what you sent me (which works fine with my video). I think I identified the culprit. You need to call play() AFTER the actual setTime(). I am not sure why, but if you leave it the way I have in the example (see attachment), then playback jumps arbitrarily (maybe once every 3-4 times) to the 12th second of the video. It seems like a bug to me, but if you decide not to fix it you might want to emphasize in the documentation that the video MUST be playing for setTime() to work right. Thanks for looking into this promptly! Let me know if I should know something more. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Playing a video on a object that is moving. | Jose | Vizard | 8 | 01-29-2015 01:22 PM |
video restarting on right click in architectural interactive | raj | Vizard | 4 | 08-21-2014 01:39 AM |
Video function | EKF | Vizard | 2 | 10-03-2012 12:41 PM |
synching video camera recording with vizard | billjarrold | Vizard | 0 | 12-15-2009 11:43 PM |
video help | nasr | Vizard | 2 | 05-26-2009 11:42 AM |