psychopy.org | Reference | Downloads | Github

How to increase a video duration?

Hello, below the recomended tamplate.

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): v3. 1. 5
Standard Standalone? (y/n) If not then what?: y
What are you trying to achieve?: I’m trying to extend videos duration. Their original duration is about 2s, but I need it to be 10s. Resulting in a video slower than the original.

What did you try to make it work?: I’ve already tried increasing stimuli time to 10s. But when the original video time runs out, it goes black through the restant time.

Therefore, not an error is happening but probably a lack of knowledge on how to make it happen.

Thanks a lot!

This would require drawing the video just on every fifth screen refresh. e.g. only draw it when the current screen refresh number is evenly divisible by 5:

if frameN % 5 == 0:
    your_movie.draw()

But Builder draws to the screen on every screen refresh, so this would probably result in the movie being blank on the remaining 80% of screen refreshes.

So your choice is ether to get your hands dirty by learning how to hijack Builder’s drawing cycle in code, or simply process the videos externally in some video editing software to slow them down.