Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[open] video

edited November 2012 in OpenSesame

Hi, I have an experiment in which I want to show the clips with sound. I've inserted the media-player in my experiment. However, only by the first clip, i have sound and video, by the next clips, i have only video without any sound. What am I doing wrong?
thx
Madjid

Comments

  • edited 10:14PM

    Hi Madjid,

    You're probably not doing anything wrong. The media_player is known to be a bit flaky sometimes, and this issue could be due to any number of things. You might try the following:

    • Convert the video to a different format, and see if this resolves the issue.
    • Explicitly quit and reinitialize the PyGame mixer at the beginning of each trial. Something like the following (as a starting point, you can try variations):
    import pygame
    pygame.mixer.quit()
    pygame.mixer.init()

    For more information, see http://www.pygame.org/docs/ref/mixer.html

    If neither of these options work, perhaps you could post some more information (operating system, version of OpenSesame, video format, etc.) and I'll forward your issue to the developer of the media_player plugin.

    Hope this is of some use!

    Cheers,
    Sebastiaan

  • edited 10:14PM

    I'll see if I can replicate and solve this problem soon. The pygame mixer reinitialization should do the trick. I also hope to release an updated version of media_player soon that is rid of all these quirks, but playing video in Python is still dodgy business...

    Buy Me A Coffee

  • edited November 2012

    Hi sebastian,

    i have converted all videos in .avi format, but the problem has not been resolved. At the first round, i have video and sound, at the second no sound and at the third round, i have sound and video, ... .
    i have windows XP, opensesame 0.26 and all videos have the avi format.
    thx Madjid

  • edited 10:14PM

    I see, that's unfortunate!

    As a workaround, you could try running your experiment in a separate process. To do this, you open Menu→ Tools → Preferences and under Run options select Run experiments in a separate process. You can leave the run command on Auto-detect.

    What this essentially does is start your experiment through opensesamerun, which is an external program. Therefore, it will be like you close and open OpenSesame for every run. Presumably, this will resolve your problem.

    Hope this helps!

Sign In or Register to comment.