Millisecond Forums

Jumping frames for the start of the video and the start of the slider bar

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

By xia - 4/24/2014

Hi,
I have a big problem right now. My program includes two parts: video display and slider bar display.

A series of facial expressions will bedisplayed dynamically as short video clips. Each clip will last two seconds and disappear afterwards. After theclip, an intensity rating in three emotion categories (anger, disgust and fear)will be presented. 


The format of the video is mov in mac and wmv in windows. The average size of the video is 160kb. The mac-version program can run quite fluently on mac, however, the win-version can not run fluently on win7. The programs are the same except for the format of the video. 

The problem on win7 is that the start of the video and also the start of the slider bar lose frame. They become black at first and then show the stimuli.

Hope the following language will help you to understand my problem better. Hope to get the reply from you soon. Thanks!

<video a_d>
/items =("f08_a_d.wmv","f22_a_d.wmv","f27_a_d.wmv","m07_a_d.wmv","m28_a_d.wmv","m71_a_d.wmv")
/select = noreplace
/ size = (15%, 100%)
/playthrough = true
/erase = (255,255,255)
</video>

<text fixation> 
/halign = center
/ items = ("+")
/ fontstyle = ("arials",40pt)
/ txbgcolor = (transparent)
</text>

<trial a_d>
/ stimulusframes = [0=fixation;500=a_d]
/ response= noresponse
</trial> 

<surveypage evaluation>
/caption = "In welke mate zag je de volgende emoties op de laatste gezichtsuitdrukking die werd getoond in de clip?"
/fontstyle = ("arials",20pt)
/subcaption = " "
/subcaptionfontstyle = ("arials",50pt)
/questions = [1-3=noreplace(anger,fear,disgust)]
/itemfontstyle = ("arials",15pt)
/itemspacing = 5%
/showpagenumbers = false
/showquestionnumbers = false
/finishlabel = ["next"]
/nextbuttonposition = (80,85)
/navigationbuttonsize = (5,5)
</surveypage>

<block emotion_practice>
/ screencolor = (255,255,255)
/trials = [1,3,5,7,9,11=noreplace(a_d,d_a,a_f,f_a,d_f,f_d);2,4,6,8,10,12=evaluation]
</block>


By Dave - 4/24/2014

> The problem on win7 is that the start of the video and also the start of the slider bar lose frame. They become black at first
> and then show the stimuli.

Neither is reproducible in Inquisit 4.0.5.0 on my Win7 system using your code (which, BTW, has a number of syntax issues you should fix) w/ a bunch of random WMVs I happen to have around. Which makes it likely there's either

- something wrong w/ your WMVs and/or
- your system's codecs.

First, make sure your Inquisit installation is up to date. Second, check whether the issue only happens with (a) your facial expression WMVs or also using (b) other WMVs you have around and (c) other video formats (e.g. any MPG you have available). Please report back w/ the results.
By xia - 4/24/2014

The weird thing is the win-version program can run fluently in my boyfriend's computer, it is also win7. However, it cannot run fluently in my work computer and lab computer, which are also win7.
I have tried downloaded the codec and also converted the wmv to avi, mp4. However, it doesn't help at all.
If this is the problem of video, why the slider bar also has this problem (flash at the start)?
I have already asked many people to help and have spent one day to solve it. However, we have not find a way yet. They thought maybe it is a problem of the computer drive. Hope you could fix it. Thank you so much!

The whole language is below
**********************
stimuli
**********************
<picture instruction1>
/items = ("instruction1.jpg")
/size = (100%, 60%)
</picture>

<text instruction2> 
/ hjustify = left
/ items = ("Dit is het einde van het oefenblok. 

Als je klaar bent, druk dan op ENTER om te beginnen met het eerste testblok.")
/ size = (80%,5%)
/ fontstyle = ("arials",20pt)
/ txbgcolor = (transparent)
/ vposition = 40%
</text>

<text instruction3> 
/ hjustify = left
/ items = ("Dit is het einde van het eerste testblok. 

Als je klaar bent, druk dan op ENTER om te beginnen met het tweede testblok.")
/ size = (80%,5%)
/ fontstyle = ("arials",20pt)
/ txbgcolor = (transparent)
/ vposition = 40%
</text>

<text instruction4> 
/ hjustify = left
/ items = ("Dit is het einde van het tweede testblok. 

Als je klaar bent, druk dan op ENTER om te beginnen met het derde testblok.")
/ size = (80%,5%)
/ fontstyle = ("arials",20pt)
/ txbgcolor = (transparent)
/ vposition = 40%
</text>

<text instruction5> 
/ hjustify = left
/ items = ("Dit is het einde van het derde testblok. 

Als je klaar bent, druk dan op ENTER om te beginnen met het vierde en laatste  testblok.")
/ size = (80%,5%)
/ fontstyle = ("arials",20pt)
/ txbgcolor = (transparent)
/ vposition = 40%
</text>

<text instruction6> 
/ hjustify = left
/ items = ("Dit is het einde van het experiment. 

Hartelijk dank voor je medewerking!")
/ size = (80%,5%)
/ fontstyle = ("arials",20pt)
/ txbgcolor = (transparent)
/ vposition = 40%
</text>

<text fixation> 
/halign = center
/ items = ("+")
/ fontstyle = ("arials",40pt)
/ txbgcolor = (transparent)
</text>

<video a_d>
/items =("f08_a_d.wmv","f22_a_d.wmv","f27_a_d.wmv","m07_a_d.wmv","m28_a_d.wmv","m71_a_d.wmv")
/select = noreplace
/ size = (15%, 100%)
/playthrough = true
</video>

<video d_a>
/items =("f08_d_a.wmv","f22_d_a.wmv","f27_d_a.wmv","m07_d_a.wmv","m28_d_a.wmv","m71_d_a.wmv")
/select = noreplace
/ size = (15%, 100%)
/playthrough = true
</video>

<video a_f>
/items =("f08_a_f.wmv","f22_a_f.wmv","f27_a_f.wmv","m07_a_f.wmv","m28_a_f.wmv","m71_a_f.wmv")
/select = noreplace
/ size = (15%, 100%)
/playthrough = true
</video>

<video f_a>
/items =("f08_f_a.wmv","f22_f_a.wmv","f27_f_a.wmv","m07_f_a.wmv","m28_f_a.wmv","m71_f_a.wmv")
/select = noreplace
/ size = (15%, 100%)
/playthrough = true
</video>

<video d_f>
/items =("f08_d_f.wmv","f22_d_f.wmv","f27_d_f.wmv","m07_d_f.wmv","m28_d_f.wmv","m71_d_f.wmv")
/select = noreplace
/ size = (15%, 100%)
/playthrough = true
</video>

<video f_d>
/items =("f08_f_d.wmv","f22_f_d.wmv","f27_f_d.wmv","m07_f_d.wmv","m28_f_d.wmv","m71_f_d.wmv")
/select = noreplace
/ size = (15%, 100%)
/playthrough = true
</video>
************************************************************
trial
************************************************************
<slider anger>
/ labels = ("helemaal geen boosheid","heel veel boosheid")
/ range = (0, 100)
/ slidersize = (60%, 5%)
/showtooltips = false
</slider>

<slider fear>
/ labels = ("helemaal geen angst  ","   heel veel angst")
/ range = (0, 100)
/ slidersize = (60%, 5%)
/showtooltips = false
</slider>

<slider disgust>
/ labels = ("helemaal geen walging ","heel veel walging")
/ range = (0, 100)
/ slidersize = (60%, 5%)
/showtooltips = false
</slider>

<trial instruction1>
/ validresponse = (28)
/ stimulusframes = [1=instruction1]
/ recorddata = false
</trial>

<trial instruction2>
/ validresponse = (28)
/ stimulusframes = [1=instruction2]
/ recorddata = false
</trial>

<trial instruction3>
/ validresponse = (28)
/ stimulusframes = [1=instruction3]
/ recorddata = false
</trial>

<trial instruction4>
/ validresponse = (28)
/ stimulusframes = [1=instruction4]
/ recorddata = false
</trial>

<trial instruction5>
/ validresponse = (28)
/ stimulusframes = [1=instruction5]
/ recorddata = false
</trial>

<trial instruction6>
/ validresponse = (28)
/ stimulusframes = [1=instruction6]
/ recorddata = false
</trial>

<trial a_d>
/ stimulustimes = [0=fixation;500=a_d]
/ response= noresponse
</trial> 

<trial d_a>
/ stimulustimes = [0=fixation;500=d_a]
/ response= noresponse
</trial> 

<trial a_f>
/ stimulustimes = [0=fixation;500=a_f]
/ response= noresponse
</trial> 

<trial f_a>
/ stimulustimes = [0=fixation;500=f_a]
/ response= noresponse
</trial> 

<trial d_f>
/ stimulustimes = [0=fixation;500=d_f]
/ response= noresponse
</trial> 

<trial f_d>
/ stimulustimes = [0=fixation;500=f_d]
/ response= noresponse
</trial>  
************************************************************
block
************************************************************
<surveypage evaluation>
/caption = "In welke mate zag je de volgende emoties op de laatste gezichtsuitdrukking die werd getoond in de clip?"
/fontstyle = ("arials",20pt)
/subcaption = " "
/subcaptionfontstyle = ("arials",50pt)
/questions = [1-3=noreplace(anger,fear,disgust)]
/itemfontstyle = ("arials",15pt)
/itemspacing = 5%
/showpagenumbers = false
/showquestionnumbers = false
/finishlabel = ["next"]
/nextbuttonposition = (80,85)
/navigationbuttonsize = (5,5)
</surveypage>

<block emotion_practice>
/ screencolor = (255,255,255)
/trials = [1,3,5,7,9,11=noreplace(a_d,d_a,a_f,f_a,d_f,f_d);2,4,6,8,10,12=evaluation]
</block>

<block emotion1>
/ screencolor = (255,255,255)
/ trials = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71=noreplace(a_d,d_a,a_f,f_a,d_f,f_d);2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72=evaluation]
</block>

<block emotion2>
/ screencolor = (255,255,255)
/ trials = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71=noreplace(a_d,d_a,a_f,f_a,d_f,f_d);2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72=evaluation]
</block>

<block emotion3>
/ screencolor = (255,255,255)
/ trials = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71=noreplace(a_d,d_a,a_f,f_a,d_f,f_d);2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72=evaluation]
</block>

<block emotion4>
/ screencolor = (255,255,255)
/ trials = [1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,65,67,69,71=noreplace(a_d,d_a,a_f,f_a,d_f,f_d);2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72=evaluation]
</block>

<block instruction1>
/ screencolor = (255,255,255)
/ trials = [1=instruction1]
</block>

<block instruction2>
/ screencolor = (255,255,255)
/ trials = [1=instruction2]
</block>

<block instruction3>
/ screencolor = (255,255,255)
/ trials = [1=instruction3]
</block>

<block instruction4>
/ screencolor = (255,255,255)
/ trials = [1=instruction4]
</block>

<block instruction5>
/ screencolor = (255,255,255)
/ trials = [1=instruction5]
</block>

<block instruction6>
/ screencolor = (255,255,255)
/ trials = [1=instruction6]
</block>
************************************************************
experiment
************************************************************
<expt >
/ blocks = [1=instruction1;2=emotion_practice;3=instruction2;4=emotion1;5=instruction3;
6=emotion2;7=instruction4;8=emotion3;9=instruction5;10=emotion4;11=instruction6]
</expt>

By Dave - 4/24/2014

> If this is the problem of video, why the slider bar also has this problem (flash at the start)?

I don't know and I'm not seeing that problem on my Win7 systems. Taken together with the fact the issues also don't happen on your friend's Win7 box (as you report), suggests that it's something about your office / lab machines.

Asking again, because you haven't said anything about it: Have you made sure you are using the same, up-to-date Inquisit version on all machines?

Also, I'm confused about the code you posted. The full script in your last reply doesn't match the earlier excerpts. E.g.

Then:
<video a_d>
/items =("f08_a_d.wmv","f22_a_d.wmv","f27_a_d.wmv","m07_a_d.wmv","m28_a_d.wmv","m71_a_d.wmv")
/select = noreplace
/ size = (15%, 100%)
/playthrough = true
/erase = (255,255,255)
</video>

Now:
<video a_d>
/items =("f08_a_d.wmv","f22_a_d.wmv","f27_a_d.wmv","m07_a_d.wmv","m28_a_d.wmv","m71_a_d.wmv")
/select = noreplace
/ size = (15%, 100%)
/playthrough = true
</video>

With that in mind, you'll also want to make sure that you're not running different revisions of your script on the various machines.
By xia - 4/24/2014

Yes, all the computers use inquisit 4. The computers include my colleagues' computers and the labs' computers. The first version is that I try to fix the problem, but adding erase doesn't help. So I keep the original version.
By Dave - 4/24/2014

> Yes, all the computers use inquisit 4.

That doesn't mean anything. Inquisit 4 has been updated several times, the current release is 4.0.5.0 (see Help -> About...). All machines should run the same, latest version. Could you please check that?

By xia - 4/24/2014

I am wondering what is the problem of the computer about my colleagues and the labs, they are quite good indeed. The mode is Benq XL2420T. The refresh rate is 60hz.
By xia - 4/24/2014

Thank you for your quick reply. I will check it tomorrow. Hope this is the key to solve this problem.
By Dave - 4/24/2014

> The mode is Benq XL2420T. The refresh rate is 60hz.                               

That's a monitor model and the refresh rate it's running at. It says nothing about the machines' general performance characteristics, their display adapters (graphics cards) or possible driver and codec issues which may be at play here.
By xia - 4/24/2014

I really doubt the computer of the lab is worse than my friend's computer. And most probably, my colleagues and I use the same version of inquisit (4.0.5.0). Because we belong to the same university. Whatever, I will check it tomorrow. Hope it works. Because I have to run experiments soon and this is a big problem.
By xia - 4/24/2014

Hi Dave, my friend use inquisit 4.0.0.0, the program runs fluently oh his win7. My colleagues use inquisit 4.0.4.0. It runs jerky. It seems that the latest version doesn't help to solve the problem. Hope to hear from you soon.
By xia - 4/24/2014

I have already updated the inquisit to version 4.0.5.0. It doesn't help. Could you give me more advice?
By Dave - 4/24/2014

Next step: Check whether the machine's graphics card driver is up-to-date. If not, update it to the latest version available from the vendor.
By xia - 4/24/2014

I have already updated the graphics card drivers. It doesn't work.
By Dave - 4/24/2014

Might be a codec issue then. You can try working with a tool like

http://www.codecguide.com/download_other.htm#codectweaktool

to try to detect / fix broken codecs and re-register the base DirectShow filters or set the system to use an alternative decoder (if available). I strongly recommend creating system restore points prior to making any changes.

En- or disabling hardware acceleration for video rendering via your display adapter's settings may also help.

While only partly applicable to the problem at hand, the video playback issues FAQ at http://www.codecguide.com/faq_playback_issues.htm may offer some additional ideas.
By xia - 4/24/2014

I have already tried the codec yesterday. It doesn't help.
By Dave - 4/24/2014

> I have already tried the codec yesterday. It doesn't help.                               

What exactly did you do? It's entirely unclear what "trying the codec" is supposed to mean.
By xia - 4/24/2014

I have already done this yesterday. Download the codec from internet and install on the computer. It doesn't work.
By Dave - 4/24/2014

Which codec? From where? Please be specific. And there should be no reason one would have to download a codec for properly encoded WMVs on Win7 -- Win7 has those natively. It is thus unlikely that whatever you did would have any positive effect, it might even make things worse.
By xia - 4/25/2014

It is from the same place that you offered. Believe me, I have already asked many people to help include the experiment assistant in the lab. He told me maybe I should choose another software to fix this problem, for example, presentation or pyschopy. That is my last option, I am still looking forward your suggestion.
By Dave - 4/25/2014

I did not point you to any codec download. I pointed you to a tool that allows you to manipulate your system's existing codec settings. You still haven't specified exactly what you did. Since I have virtually no information to work with, I'm afraid I can't offer further suggestions at the moment.
By xia - 4/25/2014

I have downloaded this codec "K-Lite Codec Pack Basic 10.4.5".

By Dave - 4/25/2014

> I have downloaded this codec "K-Lite Codec Pack Basic 10.4.5"

It's not a codec. It's a codec *pack* (many codecs bundled). And unless you specifically tell it to use an alternative codec (during setup or by using one of its configuration tools) -- specifically DirectShow filter -- for WMVs it won't change anything.
By xia - 4/25/2014

What codec should I use?
By Dave - 4/25/2014

Try different ones and see if any of them improves the situation.
By xia - 4/25/2014

I have tried finalcodec and other codecs. It doesn't help. It is really weird that both the video and the slider bar flashes. Even I have downloaded the perfect codec, it cannot solve the flash of slider bar. I give up.