Error running VideoWriter in R2022b
Show older comments
I am not able to create a basic VideoWriter object as described in the documentation, for example:
video = VideoWriter('newfile.avi');
returns "Not enough input arguments."
as does
video = VideoWriter('newfile.avi','Motion JPEG AVI');
However, adding a sample third argument:
v = VideoWriter('newfile.avi','Motion JPEG AVI','test');
returns
Error using VideoWriter: Too many input arguments.
Has anyone else experienced this or know of what the problem might be?
8 Comments
Walter Roberson
on 12 Mar 2023
What shows up for
which -all VideoWriter
Colin
on 13 Mar 2023
Walter Roberson
on 13 Mar 2023
That looks reasonable.
Could you post the complete message, including the traceback ?
Colin
on 13 Mar 2023
Walter Roberson
on 13 Mar 2023
When you call
video = VideoWriter('newfile.avi');
then the only time that you can get a message such as
error using VideoWriter
Not enough input arguments.
with no further message, is the case where you are invoking a built-in (pre-compiled) function -- but we can see from the results of which that a regular function is being invoked.
When a regular function is invoked, you get messages such as
Not enough input arguments.
Error in bwmorph (line 90)
validateattributes(bwin,{'numeric' 'logical'},{'real' 'nonsparse' '2d'}, ...
Notice the traceback showing the line of code inside bwmorph in which the problem was detected. The details of the line number and the text of the line can help a lot in tracking down what the problem is.
(Note: this is a different situation than the case in which a function is being called with too many input arguments. When too many input arguments are used, then depending how the function is coded, MATLAB might be able to detect the problem before running the function at all. But in the case of too few input arguments, MATLAB needs to run the function, as the function might be able to handle the situation where not all parameters were passed in.)
Colin
on 13 Mar 2023
Walter Roberson
on 13 Mar 2023
The problem is that you have a third party erase.m in your path
Colin
on 13 Mar 2023
Accepted Answer
More Answers (0)
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!