Welcome! Log In Create A New Profile

Advanced

mp4 not supported for TaskObject mov

Posted by PatrickM 
mp4 not supported for TaskObject mov
May 23, 2022 09:35PM
I was attempting to make a task involving a video.
In the docs for TaskObject one of the supported types was listed as "mp4".
I put a video titled 'a.mp4' in the same folder as my task.m file, along with the conditions file.
Frustratingly, it kept throwing the error "can't find 'a' ", despite it being in the folder.
After a bit of investigation, I found that on line 132 in the 'mlconditions.m' file that parses the conditions file, mp4 is not listed as a supported type.

case 'mov' % mov(filename,Xpos,Ypos[,looping])
tokens = regexp(str{m},'^([a-zA-Z]{3}) *\( *''?([^'',]+)''? *, *(-? *(?:\.\d+|\d+(\.\d*)?)) *, *(-? *(?:\.\d+|\d+(\.\d*)?)) *(?:, *)?(\d+)?(?: *)?\)','tokens');
if ~isempty(tokens)
[p,n] = find_ext(obj,tokens{1}{2},{'.avi','.mpg','.mpeg','.gif'});

If I blindly add '.mp4' to the list, and save, and run it, it will instead say "unsupported file type".
Can you fix this in the next update? In the meantime I'll simply convert my videos.
Or simply just remove mp4 from the TaskObject doc, so nobody else has my same problem.
Thanks for the help!
Re: mp4 not supported for TaskObject mov
May 23, 2022 09:38PM
My bad, it appears I have a year old version of MonkeyLogic on my computer.
It appears in the latest versions mp4 is supported. I'll just leave this here in case somebody else has the same problem as me on an older system.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.