Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtualCamera video loop issues / #718

Open
carlesgutierrez opened this issue Jun 29, 2018 · 0 comments
Open

virtualCamera video loop issues / #718

carlesgutierrez opened this issue Jun 29, 2018 · 0 comments

Comments

@carlesgutierrez
Copy link

Hello,
I've been struggle to try to read a video in loop mode. I did not find how to do it. Online Reference I'm now following is here

So , one way to get this somehow working -->

#global variables
cam = VirtualCamera('AbsolutePath/video.mov', 'video')
#functions
def setupVideo():
     cam = VirtualCamera('AbsolutePath/video.mov', 'video')
def updateVideo():
    img = cam.getImage()
    if img:
        img.show()
    else:
        print("end video so -> rewind")
        cam.rewind()

But check if there is or not a img, frezee my Raspberry pi for more than 4 seconds. So I've tried to find first the number of frames of my loaded video with findLastestImage but i've got following error:

while time.mktime(time.localtime()) - os.stat(max_full_path).st_mtime > 0.1:
TypeError: coercing to Unicode: need string or buffer, NoneType found

Any fixes, tips or different approaches are welcome. Thanks for your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant