Is there a way to get the current frame number of a video while playing in implay?

17 ビュー (過去 30 日間)
Gavin Scott
Gavin Scott 2017 年 8 月 30 日
コメント済み: Gavin Scott 2017 年 9 月 1 日
I have video files in a .MP4 format. I can play them using
video = 'C0004.MP4';
h = implay(video);
Is there a way to begin playback via the command line? And once playback has started, is there a way to get the current frame number of the movie at a particular instance, or when the video has paused?

回答 (1 件)

Sailesh Sidhwani
Sailesh Sidhwani 2017 年 9 月 1 日
Hi Gavin,
You can get the Current frame number when the video is paused as follows:
1. Play the video
fig = implay('Test.avi')
fig =
UnifiedScope with properties:
InstanceNumber: 1
Specification: [1x1 iptscopes.IMPlayScopeCfg]
MessageLog: []
DataSource: [1x1 matlabshared.scopes.source.FileSource]
Visual: [1x1 iptscopes.VideoVisual]
Parent: [1x1 Figure]
2. Pause the video.
3. Get the current frame number
CurrentFrameNumber = fig.DataSource.Controls.CurrentFrame
CurrentFrameNumber =
953
  1 件のコメント
Gavin Scott
Gavin Scott 2017 年 9 月 1 日
Thank you. Is there any documentation on programmatically utilizing the implay Movie Player?

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by