Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mgsam error - Expected input type different (Matlab2015b Windows) #15

Open
shockmonger opened this issue Jun 13, 2016 · 6 comments
Open

Comments

@shockmonger
Copy link

mgsam = mgvideosample(mg,'Sampling',[2,2]);
Error using mgvideosample (line 35)
Expected input to be one of these types:

char

Instead its type was double.

@benlyyan
Copy link
Owner

hi, Teja
Try mgsam = mgvideosample(mg,[2,2]) without 'Sampling' to see if error again

@shockmonger
Copy link
Author

Hi!
This time im getting this:
mgsam = mgvideosample(mg,[2,2]);
_sampling video_
Warning: No video frames were written to this file. The file may be invalid.

In VideoWriter/close (line 267)
In VideoWriter/delete (line 202)
In mgvideosample (line 19)
Undefined function or variable 'progmeter'.

Error in mgvideosample (line 42)
progmeter(i,numf);

@benlyyan
Copy link
Owner

benlyyan commented Jun 13, 2016

I run it ok.But your question is important...
try to see if function progmeter is in you MGT. If not, add it
to see what's wrong, you can check if mg.video.obj.CurrentTime = 0, if not, set it 0. Try it again.
if still errors, try to run mgsam = mgvideosample(mg,[2,2],'newvideo.avi');
Please tell the results later

@benlyyan
Copy link
Owner

It could be something like if you reuse sampled mg to down sample it again without giving sampled video new name, matlab can not read videoframe from the sampled video, since the function by default initiate new vieo named samplevideo.avi again.

@shockmonger
Copy link
Author

the problem seems to be with progmeter, as you said, although the progmeter
error comes only when i remove the 'sampling' argument from the function.

I tried to run passing the 'newvideo.aiv' also, but it didn't work, neither
with 'newvideo.avi'.

Tried setting current time to 0 also, it just seems to reset itself after i
run the function, and produces the same error. Is it a dependency problem
on some libraries? I'll try to look into it more as well.

On Mon, Jun 13, 2016 at 2:40 PM, benlyyan [email protected] wrote:

It could be something like if you reuse sampled mg to down sample it again
without giving sampled video new name, matlab can not read videoframe from
the sampled video, since the function by default initiate new vieo named
samplevideo.avi again.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#15 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/ADOZjf8uX8t5jdaL4D0mvUJhxzYHJN_3ks5qLU_RgaJpZM4I0IE_
.

@benlyyan
Copy link
Owner

It should be nothing to do with progmeter. Other functions like mgvideocrop, mgvideoadjust, etc have progmeter called inside. You can simply run other functions(mgvideocrop) to see if progmeter has problem. I see that the problem is VideoWriter failing to write.
I will be IMV tomorrow, if you are free sometime, we can check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants