cut's video to give start and end postion in matlab

7 ビュー (過去 30 日間)
Irfan Hussain
Irfan Hussain 2020 年 4 月 4 日
コメント済み: Geoff Hayes 2021 年 12 月 14 日
hello ,
I have 5 video's length 18 sec each. i want code to cut each video which starting form 10 sec and 18 sec ending time.
All videos have same frames rate.
Any body help !!!

回答 (1 件)

Geoff Hayes
Geoff Hayes 2020 年 4 月 5 日
Irfan - try using the videoreader to load the video and read only the frames that you are interested in. The videoreader object will tell you the frame rate and from that you can figure out which set of frames to extract (those correspondng to the 10-18 second period). For example,
v = VideoReader('myVideo1.mp4');
fs = v.FrameRate;
frames = read(v,[(9*fs+1) Inf]); % read from 10-18 seconds
  2 件のコメント
Anurag Paul
Anurag Paul 2021 年 12 月 14 日
isn't working, could you please check again?
Geoff Hayes
Geoff Hayes 2021 年 12 月 14 日
@anurag paul - please clarify what you mean by it "isn't working". Are you using the above code? Are you observing an error? If so, what is it?

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by