psychopy.org | Reference | Downloads | Github

MovieStim2() playback very dark and with unconsevred aspect ratio

I have migrated the following bit of code from MovieStim to MovieStim2:

mov = visual.MovieStim2(
	win=win, name='mov',
	filename=recording_path,
	depth=-0.0,
	volume=volume,
	units="norm",
	size=2,
	)

With the normal MovieStim that worked nicely, except for the aforementioned horrible audio. Now audio works great, but the video is very dark, and the aspect ratio is not conserved.

print(mov.size)

gives me 2, 1.25 whereas my vido has the same aspect ratio as my screen, and I should be getting 2, 2. I can fix this by passing size=(2,2), but this requires me to know the aspect ratio of the movie - not all have the same aspect ratio as my screen, and also, not all screens will have the same aspect ratio as the videos I am working with atm.

So I guess I’m asking:

  • How can I pass just the horizontal size to the MovieStim2 call and have it figure out the vertical?
  • How can I make the video brighter?

PS: I am using the live psychopy directly from the master on github. So if this is not about me not using the class properly, but about some bug, I can help you test any fix you may have in mind,.

You might have better luck using height for the units rather than norm:
http://www.psychopy.org/general/units.html

This should allow you to maximise the displayed size of the movie without skewing its aspect ratio when it doesn’t match the monitor.

@Michael ok. I thought this was the exact thing that the “norm” unit should be doing.

In any case, I believe I can sort this out - an ideas about the video luinosity?

Regarding luminosity, I see several options.

  1. Draw a semi-transparent white rectangle on top of your video.

     lum = visual.Rect(win, width=mov.size[0], height=mov.size[1], fillColor='white', lineColor=None, opacity=0.3)
    

    and then when you show it:

     #lum.opacity += 0.005  # just for fun, if you want to increase brightness while you show the movie
     mov.draw()
     lum.draw()
     win.flip()
    
  2. Use visual.MovieStim3(win, opacity=0.7) on a white background.

Although your answer is spread across several answers, make sure to tick one as ‘solved’ to close this discussion - if your problem is solved… :slight_smile:

The luminosity issue was not solved for MovieStim2 but it does not happen with MovieStim3.