﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 6  » How to set stimulustimes automatically based on the duration of the video file?</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Mon, 06 Jul 2026 03:18:51 GMT</lastBuildDate><ttl>20</ttl><item><title>How to set stimulustimes automatically based on the duration of the video file?</title><link>https://forums.millisecond.com/Topic35367.aspx</link><description>Hi Dave,&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;</description><pubDate>Mon, 15 May 2023 11:36:44 GMT</pubDate><dc:creator>ttyelnv</dc:creator></item><item><title>RE: How to set stimulustimes automatically based on the duration of the video file?</title><link>https://forums.millisecond.com/Topic35382.aspx</link><description>&lt;blockquote data-id="35378" class="if-quote-wrapper" unselectable="on" data-guid="1684150416351" id="if_insertedNode_1684150414548" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="35378" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="35378" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="35378" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;nuttymenkk - 5/13/2023&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-35378"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;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?&amp;nbsp;&lt;br/&gt;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!&lt;br/&gt;&lt;br/&gt;&amp;lt;video examplevideo&amp;gt;&lt;br/&gt;/ items = ("a.mp4")&lt;br/&gt;/ playthrough = true&lt;br/&gt;...&lt;br/&gt;&amp;lt;/video&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial showvideo&amp;gt;&lt;br/&gt;/ stimulusframes = [1=examplevideo,biopac_start; 2=biopac_end]&lt;br/&gt;/ trialduration = 10&lt;br/&gt;...&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="35378"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;You'll want a separate &amp;lt;trial&amp;gt; to display the "end" marker.&lt;br/&gt;&lt;br/&gt;&amp;lt;video examplevideo&amp;gt;&lt;br/&gt;/ items = ("a.mp4", "b.mp4", "c.mp4")&lt;br/&gt;/ playthrough = true&lt;br/&gt;/ erase = false&lt;br/&gt;&amp;lt;/video&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial showvideo&amp;gt;&lt;br/&gt;/ stimulusframes = [1=examplevideo, biopac_start]&lt;br/&gt;/ validresponse = 0&lt;br/&gt;/ trialduration = 20&lt;br/&gt;/ branch = [&lt;br/&gt;&amp;nbsp;&amp;nbsp; return&amp;nbsp; trial.sendendmarker;&lt;br/&gt;]&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial sendendmarker&amp;gt;&lt;br/&gt;/ stimulusframes = [1=biopac_end]&lt;br/&gt;/ validresponse = 0&lt;br/&gt;/ trialduration = 20&lt;br/&gt;&amp;lt;/trial&amp;gt;</description><pubDate>Mon, 15 May 2023 11:36:44 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: How to set stimulustimes automatically based on the duration of the video file?</title><link>https://forums.millisecond.com/Topic35378.aspx</link><description>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?&amp;nbsp;&lt;br/&gt;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!&lt;br/&gt;&lt;br/&gt;&amp;lt;video examplevideo&amp;gt;&lt;br/&gt;/ items = ("a.mp4")&lt;br/&gt;/ playthrough = true&lt;br/&gt;...&lt;br/&gt;&amp;lt;/video&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial showvideo&amp;gt;&lt;br/&gt;/ stimulusframes = [1=examplevideo,biopac_start; 2=biopac_end]&lt;br/&gt;/ trialduration = 10&lt;br/&gt;...&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Sat, 13 May 2023 17:24:38 GMT</pubDate><dc:creator>ttyelnv</dc:creator></item><item><title>RE: How to set stimulustimes automatically based on the duration of the video file?</title><link>https://forums.millisecond.com/Topic35368.aspx</link><description>&lt;blockquote data-id="35367" class="if-quote-wrapper" unselectable="on" data-guid="1683804563681" id="if_insertedNode_1683804562606" contenteditable="false"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="35367" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="35367" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="35367" title=" "&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;nuttymenkk - 5/11/2023&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-35367"&gt;&lt;div class="if-quote-message-margin" contenteditable="true"&gt;Hi Dave,&lt;br/&gt;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.&lt;br/&gt;&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="35367"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/blockquote&gt;&lt;br/&gt;The way to do this is to set /playthrough = true in the &amp;lt;video&amp;gt; element, which will force any video item to be played to completion. Then set the &amp;lt;trial&amp;gt; presenting the video stimulus to some arbitrary, short /trialduration. The trial will then automatically end when the respective video ends,&lt;br/&gt;&lt;br/&gt;&amp;lt;video examplevideo&amp;gt;&lt;br/&gt;/ items = ("a.mp4", "b.mp4", "c.mp4")&lt;br/&gt;/ playthrough = true&lt;br/&gt;...&lt;br/&gt;&amp;lt;/video&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial showvideo&amp;gt;&lt;br/&gt;/ stimulusframes = [1=examplevideo]&lt;br/&gt;/ validresponse = 0&lt;br/&gt;/ trialduration = 20&lt;br/&gt;...&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;</description><pubDate>Thu, 11 May 2023 11:33:05 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>