Hello,
I made a little test program, to figure out how I can insert video from a
movie, into another editablemovie I just created.
It seems to work, save for the fact that the movie gets inserted both at the
beginning _and_ the end of the movie when I would just like to append it at
the end.
It could be due to the fact that I cannot figure how to get the duration of
the editableMovie I created (once I added a few images to it).
I included my test code below, so maybe you or someone on the list can have
an idea of what I'm doing wrong.
Louis
--------------
dim movieToInsert, m as EditableMovie
dim f as FolderItem
dim track as QTVideoTrack
dim trackFromTheMovie, trackFromToInsert as QTTrackMBS
dim srcIn, srcDuration, dstIn as Integer
dim j as Integer
f=SpecialFolder.Desktop.Child("testMovie_1.mov")
if f.Exists then f.MoveFileTo(SpecialFolder.Trash)
m = f.CreateMovie
track=m.NewVideoTrack(1280, 720, 32)
movieToInsert =
SpecialFolder.Desktop.Child("movieToInsert.mov").OpenEditableMovie
trackFromToInsert = movieToInsert.GetVideoTrackMBS(1)
trackFromTheMovie = m.GetVideoTrackMBS(1)
//add a few still images trackFromTheMovie here
for j=1 to 96
track.appendpicture hundertwasser
next
if trackFromTheMovie<>nil and trackFromToInsert<>nil then
srcIn = 0
srcDuration = trackFromToInsert.Duration*m.TimeScaleMBS
// not sure how to find duration of created movie I always get 0,
// no matter what I appended to the movie before
dstIn = (m.Duration)*m.TimeScaleMBS
trackFromToInsert.InsertTrackSegment(trackFromTheMovie, srcIn, srcDuration,
dstIn)
end if
f.launch
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info