Iteration of writing videos

조회 수: 3 (최근 30일)
Ryan Sumida
Ryan Sumida 2023년 1월 6일
댓글: Ryan Sumida 2023년 1월 6일
Hello! My the purpose of my code is to cut out 8-second scenes from a video from specific time stamps. I'm having an issue where the first 8-second video comes out good but it cannot make anymore and just cycles through the loop. Heres the code thank you
  댓글 수: 2
Image Analyst
Image Analyst 2023년 1월 6일
Tell me how many input videos you're going to process and how many output videos you're going to create.
Ryan Sumida
Ryan Sumida 2023년 1월 6일
I am trying to create 20 separate 8-second long videos that all stem from one 6 min video

댓글을 달려면 로그인하십시오.

답변 (1개)

VBBV
VBBV 2023년 1월 6일
편집: VBBV 2023년 1월 6일
Place the below line
close(cutvideo)
Outside of the outer for loop with index k.
  댓글 수: 3
Image Analyst
Image Analyst 2023년 1월 6일
That's why I asked the question above. "fileName" is the same on every iteration. So I don't know if he made a mistake there and really wants
  1. multiple input videos and wants to stitch them all together into one output video, or
  2. if he wants an 8 second snippet from multiple input videos and wants an equal number of output videos., or
  3. if he wants one input video with snippets taken in 8 second chunks going to one output video, or
  4. if he wants one input video with snippets taken in 8 second chunks going to multiple output videos
VBBV
VBBV 2023년 1월 6일
Yes. you are right. The filename appears to be same for each iteration. In such case, the line reading filename needs to be modified as
fileName = sprintf('%d.10.07.2022 lool before 3,4.mp4',k)
v = VideoReader(fullfile(rootDirectory),fileName)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by