Button to forward and rewind Videos

2 ビュー (過去 30 日間)
Alicia Wüst
Alicia Wüst 2021 年 7 月 24 日
コメント済み: Nikos Korobos 2022 年 4 月 22 日
Hi everyone,
for my Bikefitting App I've implemented a Button to read in a Videofile and display it on an UIAxes. By know, it is possible to start and stop the Video. I'd like to implement two buttons to go forward and rewind frame by frame. Does anyone know how to implement this ?
Here is my Code so far:
function selectn_videoPushed(app, event)
[file, path] = uigetfile('.mp4', 'Bikefitting_rot_.mp4');
if isequal(file, 0)
disp('User selected cancel');
else
disp(['User selected ', fullfile(path,file)]);
app.basicwaitbar;
%Displaying Video on Axes
input_video_file = fullfile(path,file);
app.vidObj = VideoReader(input_video_file);
app.Play_Stop.Visible = 'off';
app.Play_Stop_2.Visible = 'on';
app.frame = readFrame(app.vidObj);
imshow(app.frame, 'Parent', app.UIAxes);
app.BacktoLiveModeButton.Visible = 'on';
  1 件のコメント
Nikos Korobos
Nikos Korobos 2022 年 4 月 22 日
Did you get this to work?

サインインしてコメントする。

回答 (1 件)

Chunru
Chunru 2021 年 7 月 24 日
This can be accomplished by "timer class" (https://www.mathworks.com/help/matlab/ref/timer-class.html). On each timer event, you can check the pause button to decide if the playing should be paused or not.

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by