Iteration of writing videos
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1253972/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1253972/image.jpeg)
2 Commenti
Image Analyst
il 6 Gen 2023
Tell me how many input videos you're going to process and how many output videos you're going to create.
Risposte (1)
VBBV
il 6 Gen 2023
Modificato: VBBV
il 6 Gen 2023
Place the below line
close(cutvideo)
Outside of the outer for loop with index k.
3 Commenti
Image Analyst
il 6 Gen 2023
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
- multiple input videos and wants to stitch them all together into one output video, or
- if he wants an 8 second snippet from multiple input videos and wants an equal number of output videos., or
- if he wants one input video with snippets taken in 8 second chunks going to one output video, or
- if he wants one input video with snippets taken in 8 second chunks going to multiple output videos
VBBV
il 6 Gen 2023
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)
Vedere anche
Categorie
Scopri di più su Get Started with MATLAB in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!