How can I decrease the frame rate of a video?
Mostra commenti meno recenti
I'm displaying a video, but it's automatically speeding it up. The default frame rate is 30, How can I decrease the frame rate? If this is not possible, what are ways to go around it? I've tried slowing down the input video itself before loading it with no luck.
Here is the code:
%% Play a Video File
% Read video from a file and set up player object.
videoReader = VideoReader('testing.mov')
videoPlayer = vision.VideoPlayer('Name','Testing');
% Play video. Every iteration reads another frame.
while hasFrame(videoReader)
frame = readFrame(videoReader);
step(videoPlayer,frame);
end
% Close the video player.
release(videoPlayer);
Risposta accettata
Più risposte (1)
Image Analyst
il 23 Ott 2021
0 voti
You could write a new video with the same frames but specify a different frame rate property.
I'm attaching a demo of how to create a new movie from an existing one but I don't change the frame rate so you'd have to add that line of code.
Categorie
Scopri di più su Audio and Video Data in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!