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


Author
Message
wuaham
wuaham
Respected Member (419 reputation)Respected Member (419 reputation)Respected Member (419 reputation)Respected Member (419 reputation)Respected Member (419 reputation)Respected Member (419 reputation)Respected Member (419 reputation)Respected Member (419 reputation)Respected Member (419 reputation)
Group: Forum Members
Posts: 38, Visits: 170
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  
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
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>

wuaham
wuaham
Respected Member (419 reputation)Respected Member (419 reputation)Respected Member (419 reputation)Respected Member (419 reputation)Respected Member (419 reputation)Respected Member (419 reputation)Respected Member (419 reputation)Respected Member (419 reputation)Respected Member (419 reputation)
Group: Forum Members
Posts: 38, Visits: 170
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!
kev_dent
kev_dent
Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)
Group: Forum Members
Posts: 47, Visits: 153
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.

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
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.
kev_dent
kev_dent
Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)
Group: Forum Members
Posts: 47, Visits: 153
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>

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
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.
kev_dent
kev_dent
Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)Partner Member (726 reputation)
Group: Forum Members
Posts: 47, Visits: 153

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?

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
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.


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
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.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search