Howdy, Stranger!

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

Supported by

[open] Onset times with media_player_vlc

riprip
edited December 2014 in OpenSesame

Hello,

Is it possible to log the onset times of videos (e.g. the first frame)? I do not see a time_* logging property
for the vlc video event.

Thank you

Comments

  • edited 5:00PM

    Hi,

    The easiest way is to insert a simple inline_script just before the media_player_vlc with something like the following in the run phase:

    exp.set('time_media_player_vlc', self.time())
    

    This will underestimate the actual playback time by only a very small amount (20 ms on my system). To get an even better estimate, you need a more hackish solution. Add an inline_script after the media_player_vlc with the following in the prepare phase:

    exp.items['media_player_vlc'].playbackStarted = True
    

    ... and something like the following in the run phase:

    t = exp.items['media_player_vlc'].startPlaybackTime
    exp.set('time_media_player_vlc', t)
    

    This will access the internal state of the media_player_vlc.

    Cheers!
    Sebastiaan

Sign In or Register to comment.