How to set stimulustimes automatically based on the duration of the video file?


How to set stimulustimes automatically based on the duration of the...
Author
Message
ttyelnv
ttyelnv
Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)
Group: Forum Members
Posts: 23, Visits: 64
Hi Dave,
I am wondering if there is a way to automatically set the ending time of stimulus presentation based on the duration of the video file? Can inquisit 6 read the duration of video files automatically and end each movie presentation automatically when the video finishes? Thank you in advance for your help.


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
nuttymenkk - 5/11/2023
Hi Dave,
I am wondering if there is a way to automatically set the ending time of stimulus presentation based on the duration of the video file? Can inquisit 6 read the duration of video files automatically and end each movie presentation automatically when the video finishes? Thank you in advance for your help.


The way to do this is to set /playthrough = true in the <video> element, which will force any video item to be played to completion. Then set the <trial> presenting the video stimulus to some arbitrary, short /trialduration. The trial will then automatically end when the respective video ends,

<video examplevideo>
/ items = ("a.mp4", "b.mp4", "c.mp4")
/ playthrough = true
...
</video>

<trial showvideo>
/ stimulusframes = [1=examplevideo]
/ validresponse = 0
/ trialduration = 20
...
</trial>


ttyelnv
ttyelnv
Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)Associate Member (256 reputation)
Group: Forum Members
Posts: 23, Visits: 64
Thank you so much for your reply Dave! If I want to set event marker at the beginning and the end of the video, can I make the following amendment in the script? 
Suppose biopac_start is the marker for indicating the start of the video and biopac_end is the marker for indicating the completion of the video. If the video is between 20-40s, will the trial end if I set \trialduration=10? Thank you in advance for your help!

<video examplevideo>
/ items = ("a.mp4")
/ playthrough = true
...
</video>

<trial showvideo>
/ stimulusframes = [1=examplevideo,biopac_start; 2=biopac_end]
/ trialduration = 10
...
</trial>



Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
nuttymenkk - 5/13/2023
Thank you so much for your reply Dave! If I want to set event marker at the beginning and the end of the video, can I make the following amendment in the script? 
Suppose biopac_start is the marker for indicating the start of the video and biopac_end is the marker for indicating the completion of the video. If the video is between 20-40s, will the trial end if I set \trialduration=10? Thank you in advance for your help!

<video examplevideo>
/ items = ("a.mp4")
/ playthrough = true
...
</video>

<trial showvideo>
/ stimulusframes = [1=examplevideo,biopac_start; 2=biopac_end]
/ trialduration = 10
...
</trial>



You'll want a separate <trial> to display the "end" marker.

<video examplevideo>
/ items = ("a.mp4", "b.mp4", "c.mp4")
/ playthrough = true
/ erase = false
</video>

<trial showvideo>
/ stimulusframes = [1=examplevideo, biopac_start]
/ validresponse = 0
/ trialduration = 20
/ branch = [
   return  trial.sendendmarker;
]
</trial>

<trial sendendmarker>
/ stimulusframes = [1=biopac_end]
/ validresponse = 0
/ trialduration = 20
</trial>
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search