benlyyan / MGT

5 stars 4 forks source link

Problem with mgread #2

Closed alexarje closed 8 years ago

alexarje commented 8 years ago

@benlyyan #bug

Trying to load a video file:

>> mg=mgread('dance.mp4')
Output argument "mg" (and maybe others) not assigned during call to "mgread".

Also tried to run

>> mg=mginitstruct

but same problem.

alexarje commented 8 years ago

One more problem:

>> mgread('Video')
please select a video file .mp4,.m4v,.mpg,.mov,.avi
Error using VideoReader/init (line 619)
Could not read file due to an unexpected error. Reason: Unable to initialize the video obtain properties

Error in VideoReader (line 172)
            obj.init(fileName);

Error in mgvideoreader (line 29)
    obj = VideoReader(fn);

Error in mgread (line 32)
        mg = mgvideoreader(file);
benlyyan commented 8 years ago

​I guess Matlab 2016 has changed some perporties of videoreader object. So it causes often the same error when initiate a video object. I will try that in Matlab 2016.

krisny commented 8 years ago

I agree on ARJ's first comment here that it would be nice if it was possible to use mgread(filename), or maybe mgread(typestring, filename) makes the implementation easier.

benlyyan commented 8 years ago

I think if we want input video,audio,motion data at the same time, it will be more conveninent.

benlyyan commented 8 years ago

I add one function mgread1 in source code folder, which works like mg = mgread(videofile), mg = mgread(videofile,audiofile,mocapfile),etc.