Millisecond Forums

Two videos cannot play at the same time in one trial

https://forums.millisecond.com/Topic35066.aspx

By ttyelnv - 12/24/2022

Hello!

I am trying to play two videos (one on the left side of the screen and another on the right side of the screen) on inquisit 5 on windows, however, they do not start at the same time despite two videos are identical in content, format and size.

My codes are as follows:

<video video_one_left>
/ items = ("F8.mp4")
/ playthrough = true
/ position = (25%,50%)
/ scale = (0.25)
</video>

<video video_one_right>
/ items = ("F8.mp4")
/ playthrough = true
/ position = (75%,50%)
/ scale = (0.25)
</video>

<trial movieone>
/stimulusframes = [1= video_one_left,video_one_right; 16000=clearscreen]
/trialduration = 16000
</trial>

The video on the left side will always be opened first, followed by the video on the right side of the screen. When I tried the same code on Mac OS, no such problem occurred, but the resolution of the video became very poor. I also tried /stimulustimes, but the same problem persists. May I ask if there is any solution to resolve the time lag issue and make videos on both sides start playing at the same time? Thank you in advance for your help!
By Dave - 12/26/2022

nuttymenkk - 12/24/2022
Hello!

I am trying to play two videos (one on the left side of the screen and another on the right side of the screen) on inquisit 5 on windows, however, they do not start at the same time despite two videos are identical in content, format and size.

My codes are as follows:

<video video_one_left>
/ items = ("F8.mp4")
/ playthrough = true
/ position = (25%,50%)
/ scale = (0.25)
</video>

<video video_one_right>
/ items = ("F8.mp4")
/ playthrough = true
/ position = (75%,50%)
/ scale = (0.25)
</video>

<trial movieone>
/stimulusframes = [1= video_one_left,video_one_right; 16000=clearscreen]
/trialduration = 16000
</trial>

The video on the left side will always be opened first, followed by the video on the right side of the screen. When I tried the same code on Mac OS, no such problem occurred, but the resolution of the video became very poor. I also tried /stimulustimes, but the same problem persists. May I ask if there is any solution to resolve the time lag issue and make videos on both sides start playing at the same time? Thank you in advance for your help!

> May I ask if there is any solution to resolve the time lag issue and make videos on both sides start playing at the same time?

No, there isn't. The relevant WIndows' video API isn't really built for playing multiple videos simultaneously, so you'll always see lags. The macOS API handles this somewhat better, but -- as you noted -- it's not without issues either.
By ttyelnv - 12/28/2022

Dave - 12/26/2022
nuttymenkk - 12/24/2022
Hello!

I am trying to play two videos (one on the left side of the screen and another on the right side of the screen) on inquisit 5 on windows, however, they do not start at the same time despite two videos are identical in content, format and size.

My codes are as follows:

<video video_one_left>
/ items = ("F8.mp4")
/ playthrough = true
/ position = (25%,50%)
/ scale = (0.25)
</video>

<video video_one_right>
/ items = ("F8.mp4")
/ playthrough = true
/ position = (75%,50%)
/ scale = (0.25)
</video>

<trial movieone>
/stimulusframes = [1= video_one_left,video_one_right; 16000=clearscreen]
/trialduration = 16000
</trial>

The video on the left side will always be opened first, followed by the video on the right side of the screen. When I tried the same code on Mac OS, no such problem occurred, but the resolution of the video became very poor. I also tried /stimulustimes, but the same problem persists. May I ask if there is any solution to resolve the time lag issue and make videos on both sides start playing at the same time? Thank you in advance for your help!

> May I ask if there is any solution to resolve the time lag issue and make videos on both sides start playing at the same time?

No, there isn't. The relevant WIndows' video API isn't really built for playing multiple videos simultaneously, so you'll always see lags. The macOS API handles this somewhat better, but -- as you noted -- it's not without issues either.

I see, thank you very much for your swift reply!

I have one additional question about  adding event markers for the start and end of the video display. Right now it is quite easy to add event markers for biopac when I am using /stimulustimes in the inquisit script, but the lag between videos is a bit more serious with /stimulustimes compared to /stimulusframes. However, with /stimulusframs command, I am a bit clueless about how to add event markers at the end of the video. Should I extract the exact number of frames for every video and add the exact frame number it to the script?
By Dave - 12/28/2022

nuttymenkk - 12/28/2022
Dave - 12/26/2022
nuttymenkk - 12/24/2022
Hello!

I am trying to play two videos (one on the left side of the screen and another on the right side of the screen) on inquisit 5 on windows, however, they do not start at the same time despite two videos are identical in content, format and size.

My codes are as follows:

<video video_one_left>
/ items = ("F8.mp4")
/ playthrough = true
/ position = (25%,50%)
/ scale = (0.25)
</video>

<video video_one_right>
/ items = ("F8.mp4")
/ playthrough = true
/ position = (75%,50%)
/ scale = (0.25)
</video>

<trial movieone>
/stimulusframes = [1= video_one_left,video_one_right; 16000=clearscreen]
/trialduration = 16000
</trial>

The video on the left side will always be opened first, followed by the video on the right side of the screen. When I tried the same code on Mac OS, no such problem occurred, but the resolution of the video became very poor. I also tried /stimulustimes, but the same problem persists. May I ask if there is any solution to resolve the time lag issue and make videos on both sides start playing at the same time? Thank you in advance for your help!

> May I ask if there is any solution to resolve the time lag issue and make videos on both sides start playing at the same time?

No, there isn't. The relevant WIndows' video API isn't really built for playing multiple videos simultaneously, so you'll always see lags. The macOS API handles this somewhat better, but -- as you noted -- it's not without issues either.

I see, thank you very much for your swift reply!

I have one additional question about  adding event markers for the start and end of the video display. Right now it is quite easy to add event markers for biopac when I am using /stimulustimes in the inquisit script, but the lag between videos is a bit more serious with /stimulustimes compared to /stimulusframes. However, with /stimulusframs command, I am a bit clueless about how to add event markers at the end of the video. Should I extract the exact number of frames for every video and add the exact frame number it to the script?

/stimulustimes vs /stimulusframes shouldn't make a difference, since /stimulustimes ultimately maps to frames. Frames, i.e. discrete display refresh cycles, is what all displays rely on, and /stimulustimes just picks the frame that gets you closest to the specified time point given the display's refresh rate.
By ttyelnv - 12/28/2022

Dave - 12/28/2022
nuttymenkk - 12/28/2022
Dave - 12/26/2022
nuttymenkk - 12/24/2022
Hello!

I am trying to play two videos (one on the left side of the screen and another on the right side of the screen) on inquisit 5 on windows, however, they do not start at the same time despite two videos are identical in content, format and size.

My codes are as follows:

<video video_one_left>
/ items = ("F8.mp4")
/ playthrough = true
/ position = (25%,50%)
/ scale = (0.25)
</video>

<video video_one_right>
/ items = ("F8.mp4")
/ playthrough = true
/ position = (75%,50%)
/ scale = (0.25)
</video>

<trial movieone>
/stimulusframes = [1= video_one_left,video_one_right; 16000=clearscreen]
/trialduration = 16000
</trial>

The video on the left side will always be opened first, followed by the video on the right side of the screen. When I tried the same code on Mac OS, no such problem occurred, but the resolution of the video became very poor. I also tried /stimulustimes, but the same problem persists. May I ask if there is any solution to resolve the time lag issue and make videos on both sides start playing at the same time? Thank you in advance for your help!

> May I ask if there is any solution to resolve the time lag issue and make videos on both sides start playing at the same time?

No, there isn't. The relevant WIndows' video API isn't really built for playing multiple videos simultaneously, so you'll always see lags. The macOS API handles this somewhat better, but -- as you noted -- it's not without issues either.

I see, thank you very much for your swift reply!

I have one additional question about  adding event markers for the start and end of the video display. Right now it is quite easy to add event markers for biopac when I am using /stimulustimes in the inquisit script, but the lag between videos is a bit more serious with /stimulustimes compared to /stimulusframes. However, with /stimulusframs command, I am a bit clueless about how to add event markers at the end of the video. Should I extract the exact number of frames for every video and add the exact frame number it to the script?

/stimulustimes vs /stimulusframes shouldn't make a difference, since /stimulustimes ultimately maps to frames. Frames, i.e. discrete display refresh cycles, is what all displays rely on, and /stimulustimes just picks the frame that gets you closest to the specified time point given the display's refresh rate.

for some unknown reason, /stimulusframes command gives me less time lag in the opening time of both videos. This is so strange....
By Dave - 12/29/2022

nuttymenkk - 12/29/2022
Dave - 12/28/2022
nuttymenkk - 12/28/2022
Dave - 12/26/2022
nuttymenkk - 12/24/2022
Hello!

I am trying to play two videos (one on the left side of the screen and another on the right side of the screen) on inquisit 5 on windows, however, they do not start at the same time despite two videos are identical in content, format and size.

My codes are as follows:

<video video_one_left>
/ items = ("F8.mp4")
/ playthrough = true
/ position = (25%,50%)
/ scale = (0.25)
</video>

<video video_one_right>
/ items = ("F8.mp4")
/ playthrough = true
/ position = (75%,50%)
/ scale = (0.25)
</video>

<trial movieone>
/stimulusframes = [1= video_one_left,video_one_right; 16000=clearscreen]
/trialduration = 16000
</trial>

The video on the left side will always be opened first, followed by the video on the right side of the screen. When I tried the same code on Mac OS, no such problem occurred, but the resolution of the video became very poor. I also tried /stimulustimes, but the same problem persists. May I ask if there is any solution to resolve the time lag issue and make videos on both sides start playing at the same time? Thank you in advance for your help!

> May I ask if there is any solution to resolve the time lag issue and make videos on both sides start playing at the same time?

No, there isn't. The relevant WIndows' video API isn't really built for playing multiple videos simultaneously, so you'll always see lags. The macOS API handles this somewhat better, but -- as you noted -- it's not without issues either.

I see, thank you very much for your swift reply!

I have one additional question about  adding event markers for the start and end of the video display. Right now it is quite easy to add event markers for biopac when I am using /stimulustimes in the inquisit script, but the lag between videos is a bit more serious with /stimulustimes compared to /stimulusframes. However, with /stimulusframs command, I am a bit clueless about how to add event markers at the end of the video. Should I extract the exact number of frames for every video and add the exact frame number it to the script?

/stimulustimes vs /stimulusframes shouldn't make a difference, since /stimulustimes ultimately maps to frames. Frames, i.e. discrete display refresh cycles, is what all displays rely on, and /stimulustimes just picks the frame that gets you closest to the specified time point given the display's refresh rate.

for some unknown reason, /stimulusframes command gives me less time lag in the opening time of both videos. This is so strange....

Do you have some data to show the difference and the underlying code for both /stimulusframes and -times? From a purely technical perspective, there shouldn't be any difference, since /stimulustimes literally maps to frames, i.e. the same thing /stimulusframes does directly.