Forum
Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
GLP

Junior Member
Registered:
Posts: 7
Reply with quote  #1 
Hi there,

I'm trying to use ML for eye calibration and I would like to use a small movie (small x,y dimensions) for that purpose. I assume that ML works only with .avi files, but after many attempts I still fail to use a video file for that purpose. I get an error that this is an unsupported video type (although I use a .avi format - I also tried other formats), but no format I've tried seems to work. I think it may have something to do with the frame rate, but I'm not certain.


Thank you!
0
Jaewon

Senior Member
Registered:
Posts: 344
Reply with quote  #2 
I assume you tried with NIMH ML, since the original ML doesn't support movies for eye calibration.

The movie file formats that ML supports are AVI and MPG. However, AVI is just a container format and, to play the contents of the video, you need a codec that can uncompress the video. Try again after installing some codec. K-Lite codec is one of the popular codecs.

http://www.free-codecs.com/download/k_lite_codec_pack.htm
0
GLP

Junior Member
Registered:
Posts: 7
Reply with quote  #3 
Thanks for the reply. Yes, I do use the ML version that supports video files for fixation. The problem is that although I can load the video file, when I try to start running my experiment it crashes . I think it has to do with the dimensions of the video (960 x 540). Any suggestions on that?




0
Jaewon

Senior Member
Registered:
Posts: 344
Reply with quote  #4 
How big is the movie file? Can you send one to me?
0
GLP

Junior Member
Registered:
Posts: 7
Reply with quote  #5 
Please find attached. Thanks!

 
Attached Files
zip example.zip (196.72 KB, 3 views)

0
Jaewon

Senior Member
Registered:
Posts: 344
Reply with quote  #6 
Hi GLP,

I looked at the file. Your video is compressed in the H264 format. The AVI container does not work with H264/H265, because it does not support the bi-directional frame that those particular formats use. I guess that the original video is MPEG4 (maybe downloaded from YouTube) and just saved as AVI without the contents being trans-coded.

Some video players may still play your video by using a hack, but I don't have a plan to take that much trouble, since ML is not a video player. You can transcode your video to a more friendly format. I use avidemux. The attach is the one I converted to XVID4.

http://fixounet.free.fr/avidemux/

 
Attached Files
zip 1080p-2 - Small copy.zip (108.14 KB, 6 views)

0
GLP

Junior Member
Registered:
Posts: 7
Reply with quote  #7 
Hi,

Yes, your assumptions were correct about the origin of the file. I tried the transformed version you sent but still I can't play it - the program crashes. I get the 'Error' screen attached with the '1 degree' label at the bottom. Any suggestions on how this could be fixed?


Thanks! error_pic.jpg

0
Jaewon

Senior Member
Registered:
Posts: 344
Reply with quote  #8 
Any error ends up with that screen. You should provide more information. Do you see any error message on the command window?

If you loaded the movie correctly, your main menu should look like this. Try the test button.

movie.png 
 

0
GLP

Junior Member
Registered:
Posts: 7
Reply with quote  #9 
I installed k-Lite as suggested above.
0
Jaewon

Senior Member
Registered:
Posts: 344
Reply with quote  #10 
What about the main menu? Does the movie show up like the figure I attached above?
0
GLP

Junior Member
Registered:
Posts: 7
Reply with quote  #11 
Yes, the movie does appear as you pointed out. I hit test and I get ***Unable to initialize video***

On MATLAB's command screen I get the following errors pointing that it can't find the movie but I'm not sure what goes wrong:

Error using mgladdmovie (line 14)
Cannot find the movie file!!!

Error in monkeylogic>create_taskobjects (line 1481)
id = mgladdmovie(C(obnum).Name);

Error in monkeylogic (line 1028)
[TaskObject,Screen.ActiveVideoBuffers,StimulusInfo] = create_taskobjects(C, Screen, DAQ,
TrialRecord, MLPrefs.Directories);

Error in mlmenu (line 2208)
monkeylogic(condfile, datafile, testflag);

Error using mlmenu (line 2913)
Error while evaluating UIControl Callback.




Attached Images
jpeg error_pic2.jpg (33.47 KB, 2 views)

0
Jaewon

Senior Member
Registered:
Posts: 344
Reply with quote  #12 
I don't maintain the old version any more, but this is my fault, so I am fixing it for you.

Open monkeylogic.m and add the red part to Line 1432 like the following.

----- Line 1428-1433 of monkeylogic.m -----
            case {'fix','dot'}
                [imdata,~,modality] = load_cursor(Screen.FixationSpotImageFile, Screen.FixationSpotShape, Screen.FixationSpotColor, Screen.FixationSpotSize);
                switch modality
                    case 1, C(obnum).Type = 'pic';
                    case 2, C(obnum).Type = 'mov'; imdata = []; C(obnum).Name = Screen.FixationSpotImageFile;
                end
----- End of the code -----

0
GLP

Junior Member
Registered:
Posts: 7
Reply with quote  #13 
Thank you, Jaewon. It works now.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation: