why do I get "Error using VideoReader/initReader Too many output arguments"

5 visualizaciones (últimos 30 días)
I use it like this:
clear
pathname = uigetdir()
[file,pathname]=uigetfile(pathname);
filename=strcat(pathname,file);
v = VideoReader(filename);
So I am selecting a file that exists, This seems to be independent of the video file I try to read, as a matter of fact it doesn matter if the file exist or not.
I also get the same error when using mmfileinfo
  2 comentarios
Florian Bidaud
Florian Bidaud el 24 de En. de 2024
Can you show the value of filename before it is inputted in VideoReader ?
Napoleon Leoni
Napoleon Leoni el 24 de En. de 2024
Sure!
%% Select video file
% Initialize variables.
clear
pathname = uigetdir()
[file,pathname]=uigetfile(pathname);
filename=strcat(pathname,file);
disp(filename);
%% read video
v = VideoReader(filename);
The output from this:
>> filename
filename =
'C:\Users\nleoni\Documents\microfluidics\helios\MI1\videos\20230918R2493Unit1038_50s.mp4'
pathname =
'C:\Users\nleoni\Documents\microfluidics\helios\MI1\videos'
C:\Users\nleoni\Documents\microfluidics\helios\MI1\videos\20230918R2493Unit1038_50s.mp4
Error using VideoReader/initReader
Too many output arguments.
Error in audiovideo.internal.IVideoReader (line 136)
initReader(obj, fileName, currentTime);
Error in VideoReader (line 104)
obj@audiovideo.internal.IVideoReader(varargin{:});
Error in videoReaderTest (line 10)
v = VideoReader(filename);

Iniciar sesión para comentar.

Respuesta aceptada

Napoleon Leoni
Napoleon Leoni el 25 de En. de 2024
Editada: Napoleon Leoni el 25 de En. de 2024
Solved,
Hopefully no one spent to much time on this. There must have been another function with a similar name in the path, not sure but maybe from some older work I had done....
After moving the script to a different directory and narrowing the scope of the path it actually works

Más respuestas (0)

Productos


Versión

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by