Millisecond Forums

Last frame of Movie/Video play (.mp4) Window 10 Inquisit 5.0.14.0 (Build 4291)

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

By wuaham - 1/16/2020

Hi,
I am playing a movie (.mp4, just 2sec long on the upper half of the screen) and displaying two stimuli on the lower half of the screen. When the movie paying finish, participant can click on any of the two stimuli. 
The problem is when the movie is played fully then a black screen appear (I verified using movie editing software that my movie does not have any blank frame nor sound at the end).
I tried to get rid of the black screen by superimposing an image replacing the black screen but no success. Any idea?
Kind regards
Ahamed  
By Dave - 1/16/2020

wuaham - 1/17/2020
Hi,
I am playing a movie (.mp4, just 2sec long on the upper half of the screen) and displaying two stimuli on the lower half of the screen. When the movie paying finish, participant can click on any of the two stimuli. 
The problem is when the movie is played fully then a black screen appear (I verified using movie editing software that my movie does not have any blank frame nor sound at the end).
I tried to get rid of the black screen by superimposing an image replacing the black screen but no success. Any idea?
Kind regards
Ahamed  

That's the normal behavior. If you want to get rid of the video window or replace it with something else (e.g. still image of its last frame), the best option is to split things into two consecutive trials -- one displaying the video, one collecting the response after the video --  like so:

<block myblock>
/ trials = [1-4 = showvideo]
</block>

<values>
/ videoitem = ""
</values>

<trial showvideo>
/ ontrialend = [
    values.videoitem = video.myvideo.currentitem;
]
/ stimulusframes = [1=myvideo, a, b]
/ trialduration = 0
/ validresponse = (0)
/ branch = [
    trial.collectresponse
]
/ recorddata = false
</trial>

<trial collectresponse>
/ stimulusframes = [1=clearscreen, a, b]
/ validresponse = (a, b)
/ inputdevice = mouse
</trial>

<video myvideo>
/ items = videoitems
/ position = (50%, 25%)
/ erase = false
/ playthrough = true
</video>

<item videoitems>
/ 1 = "01.mp4"
/ 2 = "02.mp4"
/ 3 = "03.mp4"
/ 4 = "04.mp4"
</item>

<text a>
/ items = ("A")
/ position = (30%, 75%)
/ erase = false
</text>

<text b>
/ items = ("B")
/ position = (70%, 75%)
/ erase = false
</text>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode values.videoitem response latency correct)
/ separatefiles = true
</data>
By wuaham - 1/17/2020

Dave - 1/17/2020
wuaham - 1/17/2020
Hi,
I am playing a movie (.mp4, just 2sec long on the upper half of the screen) and displaying two stimuli on the lower half of the screen. When the movie paying finish, participant can click on any of the two stimuli. 
The problem is when the movie is played fully then a black screen appear (I verified using movie editing software that my movie does not have any blank frame nor sound at the end).
I tried to get rid of the black screen by superimposing an image replacing the black screen but no success. Any idea?
Kind regards
Ahamed  

That's the normal behavior. If you want to get rid of the video window or replace it with something else (e.g. still image of its last frame), the best option is to split things into two consecutive trials -- one displaying the video, one collecting the response after the video --  like so:

<block myblock>
/ trials = [1-4 = showvideo]
</block>

<values>
/ videoitem = ""
</values>

<trial showvideo>
/ ontrialend = [
    values.videoitem = video.myvideo.currentitem;
]
/ stimulusframes = [1=myvideo, a, b]
/ trialduration = 0
/ validresponse = (0)
/ branch = [
    trial.collectresponse
]
/ recorddata = false
</trial>

<trial collectresponse>
/ stimulusframes = [1=clearscreen, a, b]
/ validresponse = (a, b)
/ inputdevice = mouse
</trial>

<video myvideo>
/ items = videoitems
/ position = (50%, 25%)
/ erase = false
/ playthrough = true
</video>

<item videoitems>
/ 1 = "01.mp4"
/ 2 = "02.mp4"
/ 3 = "03.mp4"
/ 4 = "04.mp4"
</item>

<text a>
/ items = ("A")
/ position = (30%, 75%)
/ erase = false
</text>

<text b>
/ items = ("B")
/ position = (70%, 75%)
/ erase = false
</text>

<data>
/ columns = (date time subject group blocknum blockcode trialnum trialcode values.videoitem response latency correct)
/ separatefiles = true
</data>

I will implement this and thank you for your excellent idea!
By kev_dent - 3/27/2020

I too am trying to implement this solution.
I wish to present some shapes for a participant to remember, then play a movie, then present some shapes that are either same or different from the original ones.
When I set this up as suggested using a Branch after the movie is done and before the shapes appear the second time there is always a very brief pause when the screen is blank and presented in the default screen colour.
I can not seem to get the shapes to appear the second time immediately after the movie with no gap.
Can you help.
By Dave - 3/27/2020

kev_dent - 3/27/2020
I too am trying to implement this solution.
I wish to present some shapes for a participant to remember, then play a movie, then present some shapes that are either same or different from the original ones.
When I set this up as suggested using a Branch after the movie is done and before the shapes appear the second time there is always a very brief pause when the screen is blank and presented in the default screen colour.
I can not seem to get the shapes to appear the second time immediately after the movie with no gap.
Can you help.

> there is always a very brief pause when the screen is blank and presented in the default screen colour.

That is because some stimulus or all the stimuli are erased. Make sure their /erase attributes are all set to false.
By kev_dent - 3/27/2020

Dave - 3/27/2020

> there is always a very brief pause when the screen is blank and presented in the default screen colour.

That is because some stimulus or all the stimuli are erased. Make sure their /erase attributes are all set to false.

Shows the same behaviour even when the /erase of everything is false

Here is the script I am playing with:

<defaults>
/ screencolor = (255, 0, 0)
</defaults>

<video interference>
/ items = ("DVN1.mp4", "DVN2.mp4", "DVN3.mp4", "DVN4.mp4",, "DVN5.mp4")
/ erase = false
/ size=(960, 960)
/ playthrough = true
/ position = (50, 50)
</video>

<shape blank>
/ shape = rectangle
/ color = (0, 0, 0)
/ size = (100%, 100%)
/ erase = false
</shape>

<item stimulus>
/1="flagbwhite.bmp"
/2="spikebwhite.bmp"
/3="moonbwhite.bmp"
/4="fstarbwhite.bmp"
/5="heartbwhite.bmp"
/6="rhombwhite.bmp"
/7="diabwhite.bmp"
/8="arrbwhite.bmp"
/9="squbwhite.BMP"
/10="nbwhite.BMP"
/11="tribwhite.BMP"
/12="vabwhite.BMP"
/13="cirbwhite.BMP"
/14="crobwhite.BMP"
/15="mushbwhite.BMP"
/16="stabwhite.BMP"
</item>

<picture stimulus1>
/items = stimulus
/ position = (30, 50)
/ erase = false
</picture>

<picture stimulus2>
/items = stimulus
/ position = (50, 50)
/ erase = false
</picture>

<picture stimulus3>
/items = stimulus
/ position = (80, 50)
/ erase = false
</picture>


<trial encode_interfere>
/stimulustimes = [0=blank,stimulus1,stimulus2,stimulus3;1000=interference]
/trialduration = 0
/validresponse = (0)
/ branch = [trial.recall]
</trial>

<trial recall>
/ stimulusframes = [1=blank,stimulus2]
/ validresponse = ("a", "b")
</trial>
By Dave - 3/27/2020

kev_dent - 3/27/2020
Dave - 3/27/2020

> there is always a very brief pause when the screen is blank and presented in the default screen colour.

That is because some stimulus or all the stimuli are erased. Make sure their /erase attributes are all set to false.

Shows the same behaviour even when the /erase of everything is false

Here is the script I am playing with:

<defaults>
/ screencolor = (255, 0, 0)
</defaults>

<video interference>
/ items = ("DVN1.mp4", "DVN2.mp4", "DVN3.mp4", "DVN4.mp4",, "DVN5.mp4")
/ erase = false
/ size=(960, 960)
/ playthrough = true
/ position = (50, 50)
</video>

<shape blank>
/ shape = rectangle
/ color = (0, 0, 0)
/ size = (100%, 100%)
/ erase = false
</shape>

<item stimulus>
/1="flagbwhite.bmp"
/2="spikebwhite.bmp"
/3="moonbwhite.bmp"
/4="fstarbwhite.bmp"
/5="heartbwhite.bmp"
/6="rhombwhite.bmp"
/7="diabwhite.bmp"
/8="arrbwhite.bmp"
/9="squbwhite.BMP"
/10="nbwhite.BMP"
/11="tribwhite.BMP"
/12="vabwhite.BMP"
/13="cirbwhite.BMP"
/14="crobwhite.BMP"
/15="mushbwhite.BMP"
/16="stabwhite.BMP"
</item>

<picture stimulus1>
/items = stimulus
/ position = (30, 50)
/ erase = false
</picture>

<picture stimulus2>
/items = stimulus
/ position = (50, 50)
/ erase = false
</picture>

<picture stimulus3>
/items = stimulus
/ position = (80, 50)
/ erase = false
</picture>


<trial encode_interfere>
/stimulustimes = [0=blank,stimulus1,stimulus2,stimulus3;1000=interference]
/trialduration = 0
/validresponse = (0)
/ branch = [trial.recall]
</trial>

<trial recall>
/ stimulusframes = [1=blank,stimulus2]
/ validresponse = ("a", "b")
</trial>

Then there's nothing that can be done. You can set the screencolor to black, then at least you won't get any easily noticeable flash.
By kev_dent - 3/27/2020


Hmmm, thats interesting.
Yes I set the background to red to illustrate the issue.
Do you know why the software behaves in this way?
Does this mean that inquist 5 is unable to display an image on the very next frame after a movie has played.
Is it possible to find out what the duration of the lag is?
By Dave - 3/27/2020

kev_dent - 3/27/2020

Hmmm, thats interesting.
Yes I set the background to red to illustrate the issue.
Do you know why the software behaves in this way?
Does this mean that inquist 5 is unable to display an image on the very next frame after a movie has played.
Is it possible to find out what the duration of the lag is?

Wait, nevermind -- I missed something about your script.

You're seeing the red flash because you're not running the trials in a block. If you do

<block example>
/ trials = [1=encode_interfere]
</block>

you wont see the red screen color flash between the two trials.

By Dave - 3/27/2020

Dave - 3/27/2020
kev_dent - 3/27/2020

Hmmm, thats interesting.
Yes I set the background to red to illustrate the issue.
Do you know why the software behaves in this way?
Does this mean that inquist 5 is unable to display an image on the very next frame after a movie has played.
Is it possible to find out what the duration of the lag is?

Wait, nevermind -- I missed something about your script.

You're seeing the red flash because you're not running the trials in a block. If you do

<block example>
/ trials = [1=encode_interfere]
</block>

you wont see the red screen color flash between the two trials.


> Do you know why the software behaves in this way?

The long and short of it is that the video window has to be made to go away, and that takes at least a single display frame.
By kev_dent - 3/27/2020

Ok sure this is test script that I'm only just starting to develop.
I will try the block suggestion and see how that works.
By kev_dent - 3/27/2020

I wonder if the movie window could be hidden or overwitten with a new stimulus just in the way we use a blank screen to clear everything before presenting new stimuli in a trial?
By Dave - 3/27/2020

kev_dent - 3/27/2020
I wonder if the movie window could be hidden or overwitten with a new stimulus just in the way we use a blank screen to clear everything before presenting new stimuli in a trial?

No, there's no way to do that.