Real Software Forums
http://forums.realsoftware.com/

[QT..MBS] Adding Audio Track ?
http://forums.realsoftware.com/viewtopic.php?f=20&t=46920
Page 1 of 1

Author:  grabiller [ Tue Feb 12, 2013 9:01 am ]
Post subject:  [QT..MBS] Adding Audio Track ?

Hello,

So far I'm able to create a Quicktime Movie from scratch, add an image sequence to it and encode/save it by choosing the right codec.

I'm using something as simple as:
Dim oPic As Picture
Dim oQTMov As EditableMovie = oQT.CreateMovie()
Dim oQTTrack As New QTPictureMovieTrackMBS()
oQTTrack.CompressionCodec = "rle " ' or jpeg, etc..
oQTTrack.FrameDuration = 1.0/24.0 ' 24 fps;
oQTTrack.Depth = 24 ' no alpha
If oQTTrack.CreateTrack( oQTMov, 1280, 720 ) Then
' I'm loading a sequence of images and for each image I do:
oQTTrack.AddPicture( oPic )
' Once all images have been added:
oQTTrack.CloseTrack()
End If

This is working perfectly well.

But now I have to add audio to my movie files. I have *.wav files each with the exact same length of each image sequence.

Could someone be kind enough to explain to me, from the code above, how could I add the audio to each image sequence track.

Also, how then do I add several image sequences with audio into one movie file ?

Thanks a lot in advance.
Cheers,
Guy.

Author:  MonkeybreadSoftware [ Tue Feb 12, 2013 9:42 am ]
Post subject:  Re: [QT..MBS] Adding Audio Track ?

Please open your wav file as movie and copy track over to new video.
We have some methods for copying track segments.

Greetings
Christian

Author:  grabiller [ Tue Feb 12, 2013 10:02 am ]
Post subject:  Re: [QT..MBS] Adding Audio Track ?

Hey Christian,

Thanks for your answer, but I have no idea how to "../.. copy track over to new video ../.." and how to add several 'segments' (with audio) one after the another one.

By any chance, do you have any working example/code ?

Thanks in advance.
Cheers,
Guy.

Author:  MonkeybreadSoftware [ Tue Feb 12, 2013 10:12 am ]
Post subject:  Re: [QT..MBS] Adding Audio Track ?

Movie.AddMovieSelectionMBS(sourcemovie as movie) as integer
movie.InsertMovieSegmentMBS(dest as movie, srcIn as integer, srcDuration as integer, dstIn as integer) as integer

there are various methods.
You could simply add the track from one movie to other.

if you want to have sound and video start the same time, please use QTTrackMBS class and set TimeOffset to zero for both, so they start at the beginning of video.

Greetings
Christian

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/