realbasic-nug
[Top] [All Lists]

Re: EditableMovie - Create movie from audio file

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: EditableMovie - Create movie from audio file
From: Jeff Ayling <jeff at wam dot net dot au>
Date: Tue, 31 Jul 2007 17:03:14 +1000
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <FFD76BAE-A962-4FF3-ACD1-AD515324F710 at wam dot net dot au> <CAD608C0-B0F4-4480-A280-DF7A7CAA634F at drivetimeart dot com>
Thanks Greg - yeah I see what you mean.

This section which adds the video does use srctrack.Duration which is  
the duration of the audio file


>>                    desttrackv.InsertVideoTrackSegment srctrackv,  
>> 0.0,_
>>                    srctrack.Duration, Max(0,m.Duration-2), true,  
>> false

....any thoughts of where I should be using the scalemoviesegment here  
to get the pic to stretch for the duration of the audio file?

Cheers


Jeff


On 31/07/2007, at 12:12 AM, Detour wrote:

> Looks likes the still image isn't getting stretched out to fill the
> duration of the audio. I've used ScaleMovieSegment (editablemovie
> method) to stretch a still image to the desired length effectively.
> Maybe process the image first like that, and then insert.
>
> Greg
>
> On Jul 29, 2007, at 6:15 PM, Jeff Ayling wrote:
>
>> Hi all,
>>
>> I'm trying to take an audio file and a jpg and merge them into a new
>> movie file. I'm getting close but I'm not quite there yet.
>>
>>
>>                    Dim desttrackv,srctrackv as QTVideoTrack
>>                    Dim desttrack,srctrack as QTSoundTrack
>>                    Dim m,msound,mpic as EditableMovie
>>                    Dim f as FolderItem
>>
>>                    f= GetFolderItem("Movie.mov")
>>                    m=f.CreateMovie
>>
>>                    desttrack=m.NewSoundTrack()
>>                    msound=getfolderitem 
>> ("track.mp3").OpenEditableMovie
>>                    srctrack=msound.SoundTrack(1)
>>                    desttrack.InsertSoundTrackSegment srctrack, 0.0,_
>>                    srctrack.Duration, Max(0,m.Duration-2), true,  
>> false
>>
>>                    desttrackv=m.NewVideoTrack(p1.width, p1.height,  
>> 32)
>>                    mpic=getfolderitemd("image.jpg").OpenEditableMovie
>>                    srctrackv=mpic.VideoTrack(1)
>>                    desttrackv.InsertVideoTrackSegment srctrackv,  
>> 0.0,_
>>                    srctrack.Duration, Max(0,m.Duration-2), true,  
>> false
>>
>>                    f.launch //open qtplayer
>>
>> Any help to tighten this up would be great - it currently ends up as
>> a mov file with the correct audio but white video.
>>
>> Thanks
>>
>>
>> Jeff
>> _______________________________________________
>> Unsubscribe or switch delivery mode:
>> <http://www.realsoftware.com/support/listmanager/>
>>
>> Search the archives:
>> <http://support.realsoftware.com/listarchives/lists.html>
>>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>