フィルターのクリア

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 Center および File ExchangeAudio and Video Data についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by