Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

Unable to use the 'media_player_mpy'

Hello,
We are trying to play a video clip followed by a task on Open Sesame. I have downloaded and tried to use the Visual stimuli button after downloading. But it keeps saying 'an unexpected error occurred':
Failed to load plugin 'media_player_mpy'

Is there anything I did wrong or anything I can do to fix this?

Comments

  • sebastiaansebastiaan Posts: 2,812

    Hi,

    I have downloaded and tried to use the Visual stimuli button after downloading.

    What do you mean exactly by "using the visual stimuli button"?

    But it keeps saying 'an unexpected error occurred': Failed to load plugin 'media_player_mpy'

    If you look in the debug window (Ctrl+D), do you see an error message? If so, could you post that here?

    Cheers,
    Sebastiaan

    Thanked by 1irisshen926

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • Hi Sebastiaan,
    Thanks for responding! There's a visual stimuli button appeared on the left side (under Toolbar items). I can see the error message. But I read some other discussions in the past about this issue. And I used a Windows system this time and it worked fine now!

    Best,
    Iris

  • DanielDaniel Posts: 366

    Hi Iris,
    Still it would be great if you could post the error message here so we can maybe fix this for the non-windows systems you were working on earlier. Please let us know more about this.

    Thanked by 1irisshen926
  • Hi Daniel,
    Of course! Sorry about the late reply.
    Error message:

    Traceback (most recent call last):
    File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libqtopensesame/widgets/tree_overview.py", line 753, in dropEvent
    self.drop_event_item_new(data, e)
    File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libqtopensesame/widgets/tree_overview.py", line 672, in drop_event_item_new
    item, new_items = self.drop_get_item_snippet(data)
    File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libqtopensesame/widgets/tree_overview.py", line 560, in drop_get_item_snippet
    catch_exceptions=False)
    File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libqtopensesame/misc/qtitem_store.py", line 105, in new
    script=script)
    File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/item_store.py", line 162, in new
    u"Failed to load plugin '%s'" % _type, exception=e)
    osexception:
    Failed to load plugin 'media_player_vlc'

    item-stack: experiment[run].expLoop[run]
    exception message: dlopen(libvlc.dylib, 6): image not found
    time: Tue Dec 20 16:59:41 2016
    exception type: OSError

    Traceback:
    File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/item_store.py", line 159, in new
    self.experiment, script, self.experiment.item_prefix())
    File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/plugins.py", line 361, in load_plugin
    item_module = import_plugin(plugin, _type=_type)
    File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/plugins.py", line 332, in import_plugin
    return imp.load_source(plugin, path)
    File "/Applications/OpenSesame.app/Contents/Resources/share/opensesame_plugins/media_player_vlc/media_player_vlc.py", line 32, in
    import vlc
    File "/Applications/OpenSesame.app/Contents/Resources/share/opensesame_plugins/media_player_vlc/vlc.py", line 168, in
    dll, plugin_path = find_lib()
    File "/Applications/OpenSesame.app/Contents/Resources/share/opensesame_plugins/media_player_vlc/vlc.py", line 160, in find_lib
    dll = ctypes.CDLL('libvlc.dylib')
    File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/ctypes/init.py", line 362, in init
    self._handle = _dlopen(self._name, mode)
    OSError: dlopen(libvlc.dylib, 6): image not found

  • DanielDaniel Posts: 366

    Hi Iris,
    I see you are using the older media_player_vlc. This is causing quite some troubles with the newer version of OpenSesame and we don't actively maintain it anymore, because many of its issues are regarded as unfixable. Have you tried the media_player_mpy, player that comes packaged with the latest version of OpenSesame?

  • Hi,
    I'm running into similar problems. (Hope it's ok to use this thread even though the error is not identical.) I tried to add a media_player_mpy item via GUI. I tried both drag-and drop and the 'insert new item' button and get the following error messages:

    Failed to load plugin 'media_player_mpy'

    exception message: Unable to download 'ffmpeg.osx'.

    I'm using OS version 3.01.06 (expyriment backend) under Mac OS X 10.11.6.
    Here's the full error message:

    Traceback (most recent call last):
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libqtopensesame/widgets/tree_append_menu.py", line 183, in append_item
        action.append_item(target_item_name)
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libqtopensesame/widgets/tree_append_menu.py", line 126, in append_item
        item = self.experiment.items.new(self.item_type, catch_exceptions=False)
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libqtopensesame/misc/qtitem_store.py", line 105, in new
        script=script)
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/item_store.py", line 164, in new
        u"Failed to load plugin '%s'" % _type, exception=e)
    osexception: 
    Failed to load plugin 'media_player_mpy'
    
    item-stack: 
    exception message: Unable to download 'ffmpeg.osx'. Perhaps there is a no internet connection? If there is, please report this problem.
    time: Sun Sep  3 19:18:47 2017
    exception type: IOError
    
    Traceback:
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/item_store.py", line 161, in new
        self.experiment, script, self.experiment.item_prefix())
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/plugins.py", line 360, in load_plugin
        item_module = import_plugin(plugin, _type=_type)
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/libopensesame/plugins.py", line 331, in import_plugin
        return imp.load_source(plugin, path)
      File "/Applications/OpenSesame.app/Contents/Resources/share/opensesame_plugins/media_player_mpy/media_player_mpy.py", line 42, in <module>
        import mediadecoder
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/mediadecoder/__init__.py", line 6, in <module>
        from mediadecoder.decoder import Decoder
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/mediadecoder/decoder.py", line 9, in <module>
        from moviepy.video.io.VideoFileClip import VideoFileClip
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/moviepy/video/io/VideoFileClip.py", line 3, in <module>
        from moviepy.video.VideoClip import VideoClip
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/moviepy/video/VideoClip.py", line 20, in <module>
        from .io.ffmpeg_writer import ffmpeg_write_image, ffmpeg_write_video
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/moviepy/video/io/ffmpeg_writer.py", line 15, in <module>
        from moviepy.config import get_setting
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/moviepy/config.py", line 38, in <module>
        FFMPEG_BINARY = get_exe()
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/imageio/plugins/ffmpeg.py", line 52, in get_exe
        exe = get_remote_file('ffmpeg/' + FNAME_PER_PLATFORM[plat])
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/imageio/core/fetching.py", line 98, in get_remote_file
        _fetch_file(url, filename)
      File "/Applications/OpenSesame.app/Contents/Resources/lib/python2.7/site-packages/imageio/core/fetching.py", line 154, in _fetch_file
        os.path.basename(file_name))
    IOError: Unable to download 'ffmpeg.osx'. Perhaps there is a no internet connection? If there is, please report this problem.
    

    I don't know how to download ffmpeg.osx
    Do I do that in the debug window? (-> What is the exact command?) Or should I use the webbrowser? (-> Which site do I get it from and where should I put the file?)

    Can anyone help me?

    Thanks!
    Sophia

  • eduardeduard Posts: 977

    Hi Sophia,

    maybe this links helps: https://www.ffmpeg.org/download.html

    If not you can always try one of the other players: http://osdoc.cogsci.nl/3.1/manual/stimuli/video/

    Good luck,
    Eduard

  • Hi Eduard,

    Thank you for the link! Do you happen to know where the file has to be saved to? I tried different places in the libopensesame folder but I'm not even sure if I have to insert the folder as a whole or extract the individual files.

    Cheers,
    Sophia

  • eduardeduard Posts: 977

    Nope, not really. Maybe in the same folder as where the plugin is stored? You can try to check all the files in the stack trace of the error message (starting from below), to see whether you can find a path at which Opensesame tries to find it.

    Eduard

    Thanked by 1linguist_noob
  • linguist_nooblinguist_noob Posts: 21
    edited September 4

    Hi Eduard,
    Thanks for your reply! That's what I had started doing. :smile:
    Meanwhile, I found these instructions that seem perfectly fit for my problem. Unfortunately, following them doesn't solve the problem, either.
    So I guess I'll just go to plan b and try another player.
    Thanks again for your hints!

    edit: I eat my words. The linked instructions did solve my problem! :smiley: (I was just stupid enough to try a newer file version and not the one with exactly the required name.)

Sign In or Register to comment.