Empirisoft Support

    Welcome to Empirisoft Support
Results 1 to 14 of 14

Thread: graphic cues superimposed on video sequences

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Hi again, Jarvis,

    I still couldn't get to play the second video on top of the first one, but I did manage to play an animated gif on top of a video. However, I still faced some problems.

    I thought that the best way to avoid the problem of the top video not clearing was to use an animated gif with a transparent frame showing for a long time. However, transparent areas/frames of animated gifs appear solid black. These areas appear transparent in Mozilla Firefox, MS PowerPoint and Open Office Impress.

    Just for the record, there is an image distortion everytime a new loop starts.

    I still couldn't manage to get a second video playing on top of a first one. When I try to do that, DRT freezes and get the following error message: "Empirisoft executeDRT has detected a problem and needs to close". At this point, my screen resolution changes from 1280x800 to 800x600.

    Still, the most critical point would be to get rid of the black rectangle where the animated gif (or eventually the video) was showing.

    Any ideas on how to proceed?

    Best,

    Alvaro

  2. #2
    Join Date
    Nov 2005
    Posts
    3,328
    What version of DirectRT (20xx.x.x.x) are you running and on what version of Windows?

  3. #3
    I'm using version 2010.2.103.1115 on Windows XP.

    Alvaro

  4. #4
    Join Date
    Nov 2005
    Posts
    3,328
    DirectRT v2010 has a new feature where you can launch an executable (.exe) file. You use ^ as the prefix and copy the exe into your stim folder (or perhaps supply the full path if it's elsewhere). E.g., if your exe were called popup.exe, you would simply enter ^popup in the STIM column.

    Haven't experimented with it much yet but this morning I did try to launch an exe after a video and it was more than happy to appear on top of the movie as long as I used a "0" as the clear value in the LOC column. You can use a 0ms delay in the time column after the movie begins or enter an onset time such as "1000" to delay the start of the exe from when the movie begins playing.

    I think this may be a solution. All that is needed is a short exe that simply presents whatever you like and is timed to disappear after a fixed length of time.

  5. #5
    Join Date
    Nov 2005
    Posts
    3,328
    Here is an example. I've attached an exe file that flashes some text on the screen with a clear background. In this case it flashes for about 250ms (could be made more precise and flexible, but keep in mind it's just for an initial demonstration).

    You can unzip it and place it in your stim folder as text.exe. Then in you input file, you simply request ^text in the STIM column (since that the name of the exe file). If you put a delay of say 1000ms after the movie starts, you will see this text appear and quickly disappear without a trace. Just be sure to use *,*,0 as the LOC value for the exe so it won't clear the video file from the screen.

    Note that the text could be replaced with anything--an image, a video, an animated gif, a website, or whatever.
    Attached Files Attached Files
    Last edited by jarvis24; 03-09-2011 at 08:36 PM.

  6. #6
    Hi Jarvis,

    Since I have no experience in programming started to investigate how to create a exe file. The solution I came with was to create a bat file and then convert it to an exe one. However I faced some problems. If I call a program for playing a video a frame still shows (the program skin). Your solution seems to be the answer. Do you think you could post some basic instructions on how to create the exe file? (Not sure if this is the place to ask such a thing, but would be really important for me to be able to create those files myself, and most likely this could help other researchers).

    Thanks in advance!

    Alvaro

  7. #7
    Join Date
    Nov 2005
    Posts
    3,328
    Here are two samples two start you off. They both display a stimulus with a clear background for 250ms. eatPopcorn is written in Visual Basic 6.0, and beHappy is written in Visual Basic Express 2010. Many people still have VB6 kicking around and like it so there's that. VB Express is actually free from Microsoft and the programming for a task like this is surprisingly easy. In the latter, you'll see there is simply a form with an image (a "smiley face" and a text label "be happy!". Then if you click on the form you'll see its properties. I set a bunch of them to do this but the critical one is "set transparency color" (or something like that). I made the background green ("lime" actually) and defined that as the transparent color. Added a timer that starts automatically and closes the form after 250ms. That's pretty much it. The VB6 version is very similar--you would just open "clearBackground.vbp" as the project file.

    If you download VB Express, you would simply open the beHappy.sln file, make edits and then request VB to "build the solution". This will produce the exe file.

    Let me know if you have any questions!

    Note to you programmer types (you know who you are!): These programs of course could also be made WAY more efficient by using dynamic stimuli rather than having fixed text or images. But again, this makes for a nice simple demo I think. And a non-programmer could make separate exe's for various stimuli without getting into anything more complex--just change the text, add a picture, or other stimulus and re-build the exe under a new name. If that's the case, it probably wouldn't take the use more than 5-20 minutes to make any desired changes.

    Finally, technical thingee: For the VB Express version (beHappy), the .NET 4.0 redistributable package is required to be installed. This can be obtained from http://download.microsoft.com. VB Express will probably install it automatically, but you may need to install it on other machines running your experiment.

    All feedback, comments, suggestions, improvements welcome! Feel free to post improved or modifed versions with some explanation if you think other users would like to see them in action!
    Attached Files Attached Files
    Last edited by jarvis24; 03-10-2011 at 03:01 PM.

Similar Threads

  1. Loading sequences between questions slow V2008.1.33
    By BHCRC204 in forum MediaLab Older Versions: Troubleshooting
    Replies: 1
    Last Post: 02-01-2011, 03:25 PM
  2. Disabling system key sequences
    By jarvis24 in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 06-23-2010, 11:14 AM
  3. If video completes, ask questions; if space bar, skip to next video?
    By jgalvin in forum MediaLab Older Versions: How Do I...
    Replies: 1
    Last Post: 03-25-2010, 08:43 PM
  4. Incorporating cues into case scenarios
    By dca4 in forum MediaLab Older Versions: How Do I...
    Replies: 3
    Last Post: 04-16-2009, 02:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •