WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-22-2016, 12:12 PM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
Unhappy 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()
I am wondering if file size and/or format have anything to do with the problem. Is this a Vizard bug that someone else has come across? It makes the function unusable and if I don't resolve this, I will need to break down the video, which is such an inconvenience.

Thanks!
Reply With Quote
  #2  
Old 09-22-2016, 08:36 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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)
Reply With Quote
  #3  
Old 09-23-2016, 10:37 AM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
Wink

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.
Attached Files
File Type: zip Video_test.zip (1.1 KB, 623 views)
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -7. The time now is 04:02 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC