필터 지우기
필터 지우기

appending frames to an existing .avi file

조회 수: 2 (최근 30일)
Giovanni de amici
Giovanni de amici 2018년 2월 9일
댓글: Carl Witthoft 2018년 6월 14일
am trying to figure out a way to append frames to .avi files.
In a simplistic way I want to:
open and set up multiple movie files, close it and then reopen and add more video frames to it.
for i=1:n1
open the moviefile(i) using:
myVideo(i) = VideoWriter (name, option)
open(myVideo(i))
write a title screen to moviefile(i) using:
writeVideo (myVideo(i), plotID)
close moviefile(i) using:
close (myVideo(i))
end
then:
for j = 1:n2
read n1 datastreams from file(j)
process data from file(j) into n1 different plots
for i=1:n1
open myVideo(i)
append plot(i) to myVideo(i)
close myVideo(i)
end
end
It sounds simple, but the second loop on "i" does not work. I can open myVideo(i), but when I write to it, the previous contents are overwritten. I cannot see an option "append" to writeVideo, so I presume there must be some other workaround and/or a different way (other than VideoWriter) to start the whole process. Any help/suggestion will be appreciated.
disclaimer: I have seen the existing answers to a similar question, and neither fit my case because: option 1): I cannot keep all the .avi files continuously open (run out of memory) option 2): only applies to windows machines (I am working on a OSX platform)
  댓글 수: 1
Carl Witthoft
Carl Witthoft 2018년 6월 14일
According to other threads, WriteVideo will not append. There's a thing on FEX called "mmwrite," Windows only, requires DirectX9, that might work. MathWorks is being overly cautious again (since appending mismatched image frame types would be really bad).

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by