| Reference | Downloads | Github

Problem with playing video files when PsychoPy experiment is run online

URL of experiment:

Description of the problem:
I need to play video files in my experiment, but they don’t display properly. When the film is supposed to play, I see something like a zoomed-in blur. In other words, the films appear to play - but not display in the formats they are supposed to. I have tried playing around with display settings, but no luck. Has anyone else had this problem?

I should add that instruction screens display mostly fine, which makes me think it has to do with the resolution of the videos themselves. Note that this does not happen when I run the experiment offline!

I could not replicate the exact problem that you describe. But I found that none of the move stimuli displayed in either Chrome or Edge under Windows.

I found that the cause of your problem was primarily the choice of units in the experimental settings being height, when you seemed to intend to shift your movies by 400 pixels sideways. Effectively, the movies were shifted off screen. I fixed this by changing the units to pixels for the movies (it is best to leave the global preference as height to make text sizing easier).

I would also recommend that you resize all of your movie files to their display size of 720 by 480, instead of the 1920 by 1080 as they currently are. Free tools such as Hand Brake are an easy way of doing this. That will allow your online experiment to load much quicker.

A current quirk of movies displayed online is that a static image remains after the movie has finished playing (this is discussed elsewhere), which does not seem to be what you had intended to happen. I solved this problem by overlaying each movie’s location with a rectangle of the background colour with the same size and location as each movie. Each rectangle appeared 3 seconds after the beginning of each movie, because all movies seem to have a runtime of 3 second.

I have made a minimal public example experiment based on your full experiment to demonstrates all of these fixes. Please try it out, see axel_e_expt_fixed_example.

Thank you so much for your feedback.

When changing the units of the films to pixels, the experiment gets stuck on the initializing screen. From other posts I gather this has to do with generating the JS code. Did you run into this as well? Do you know what I can do to avoid it?

Hi again,

I managed to make it work by resizing the videos.

Thanks so much for your help!