VideoReaderAsync

An asynchronous video reader using ffmpeg as the back-end decoder
7 download
Aggiornato 7 dic 2024

Visualizza la licenza

This is a video reader class that reads audio/video files and loads them into memory as an RGB array. It was written to overcome problems due to slow, blocking loading with MATLAB's built in video-reading utilities.
It provides a variety of useful functionality, such as callbacks for reacting to data loading events, and an optional GUI progress bar.
Note that using this class requires that ffmpeg (open source video encoding/decoding software) is installed and available on the system path. If you open a terminal, type "ffmpeg" and get an error, then VideoReaderAsync will not work. See https://ffmpeg.org/download.html to get ffmpeg. ffprobe is also required, but is typically bundled with ffmpeg.
Example usage:
f = 'path/to/video/file.avi';
vr = VideoReaderAsync(f, 'FramesReceivedCallback', @(src, evt)disp(evt));
while ~vr.Loaded
% Video will continue to load in the background while we do other things
% The callback will be called every time another chunk of frames finish loading.
pause(1);
end
% Display the first frame of video
imshow(vr.VideoData(:, :, :, 1));

Cita come

Brian Kardon (2025). VideoReaderAsync (https://it.mathworks.com/matlabcentral/fileexchange/177014-videoreaderasync), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2022b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.2

Improved example code

1.0.1

Added example usage to description.

1.0.0