Howdy, Stranger!

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

Supported by

Crash with "media_player_mpy"

Hi, 

I am using OpenSesame for the first time. I'm builting an experiment with images and videos. The first part with images running succesfully but the part with videos crash. To read video I'm using open-sesame-media_player_mpy and I've load the plugin following the instruction of this discussion https://forum.cogsci.nl/discussion/2640/troubles-with-media-player-mpy-unable-to-download-ffmpeg-osx. But I have to introduce the last script everytime I open OpenSesame.

The item run good and I can introduce order but when I run my experiment, it crash and I receive this message : 

Details

  • item-stack: experiment[prepare].new_media_player_mpy[prepare]
  • exception type: OSError
  • exception message: [Errno 2] No such file or directory
  • time: Wed May 6 17:27:07 2020

Traceback (also in debug window)

  File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libqtopensesame/misc/process.py", line 157, in run
    exp.run()
  File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/experiment.py", line 456, in run
    self.items.execute(self.var.start)
  File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/item_store.py", line 102, in execute
    self.prepare(name)
  File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/item_store.py", line 142, in prepare
    self[name].prepare()
  File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/sequence.py", line 124, in prepare
    self.experiment.items.prepare(_item)
  File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/item_store.py", line 142, in prepare
    self[name].prepare()
  File "/Applications/OpenSesame.app/Contents/Resources/share/opensesame_plugins/media_player_mpy/media_player_mpy.py", line 119, in prepare
    elif not self.player.load_media(path):
  File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/mediadecoder/decoder.py", line 162, in load_media
    self.clip = VideoFileClip(mediafile, audio=play_audio)
  File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/moviepy/video/io/VideoFileClip.py", line 91, in __init__
    fps_source=fps_source)
  File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/moviepy/video/io/ffmpeg_reader.py", line 33, in __init__
    fps_source)
  File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/moviepy/video/io/ffmpeg_reader.py", line 256, in ffmpeg_parse_infos
    proc = sp.Popen(cmd, **popen_params)
  File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/subprocess.py", line 394, in __init__
    errread, errwrite)
  File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/subprocess.py", line 1047, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Somebody can help me, pleas ? I'm looking for in the forum and I have not see a solution...

Thank you very much

Comments

  • Hi,

    I don't have enough experience with video playback to be sure, but could this problem be related to Opensesame not finding the video you are trying to play? So, do the filenames match? Are the files in the correct folder?

    Other than that, I don't know what the problem could be. In any case, you can always try to run OpenCV.

    This requires some python coding, but isn't terribly complicated and you have a lot more control over the video playback. Here an example on how to play a video: https://github.com/smathot/OpenSesame


    Eduard

    Buy Me A Coffee

Sign In or Register to comment.