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: Detour <detour at drivetimeart dot com>
Date: Mon, 30 Jul 2007 07:12:15 -0700
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>
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>


From  Mon 30 Jul 2007 08:17:06 -0600
Return-Path: <realbasic-nug-bounces at lists dot realsoftware dot com>
X-Original-To: listarchive at realsoftware dot com
Delivered-To: listarchive at realsoftware dot com
Received: by xmail.realsoftware.com (Postfix, from userid 1037)
        id 8D9F237E7DAD; Mon, 30 Jul 2007 07:17:15 -0700 (PDT)
X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on 
        www.realsoftware.com
X-Spam-Level: 
X-Spam-Status: No, score=-3.1 required=4.5 tests=ALL_TRUSTED,AWL,BAYES_00,
        NO_REAL_NAME autolearn=ham version=3.1.1
Received: from lists.realsoftware.com (m.realsoftware.com [66.116.103.65])
        by xmail.realsoftware.com (Postfix) with ESMTP id 8F3E337E7DA3;
        Mon, 30 Jul 2007 07:17:14 -0700 (PDT)
Received: from real-software-mini.local (localhost [127.0.0.1])
        by lists.realsoftware.com (Postfix) with ESMTP id 805C04E0B8D;
        Mon, 30 Jul 2007 09:17:02 -0500 (CDT)
X-Original-To: realbasic-nug at lists dot realsoftware dot com
Delivered-To: realbasic-nug at lists dot realsoftware dot com
Received: from mail.verex.com (mail.verex.com [66.116.103.197])
        by lists.realsoftware.com (Postfix) with ESMTP id E9AAF4E0B82
        for <realbasic-nug at lists dot realsoftware dot com>;
        Mon, 30 Jul 2007 09:16:58 -0500 (CDT)
Received: from [66.116.103.197] (localhost [127.0.0.1])
        by mail.verex.com (Postfix) with SMTP id E33B9795EF7
        for <realbasic-nug at lists dot realsoftware dot com>;
        Mon, 30 Jul 2007 08:17:06 -0600 (MDT)
Date: Mon, 30 Jul 2007 08:17:06 -0600
Subject: Re: Prepare Statements in Realbasic
From: joe at strout dot net
To: realbasic-nug at lists dot realsoftware dot com
In-Reply-To: <F0496F7F-3B8A-40EA-A616-593D2B1EE01C at natgine dot org>
X-Mailer: VerEx Email Gateway
Message-Id: <20070730141706 dot E33B9795EF7 at mail dot verex dot com>
X-BeenThere: realbasic-nug at lists dot realsoftware dot com
X-Mailman-Version: 2.1.9
Precedence: list
Reply-To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: realbasic-nug-bounces at lists dot realsoftware dot com
Errors-To: realbasic-nug-bounces at lists dot realsoftware dot com

On Jul 30, 2007, at 06:10 UTC, RB-n00b wrote:

> I searched a lot but couldn't find anything useful about prepared  
> statements in Realbasic. You know, I mean stuff like"SELECT * FROM  
> sometable WHERE id = ?" and then assigning a value to the ? before  
> starting the query.

Sure, there are lots of ways to do this.  The simplest is something
like:

 rs = db.SQLSelect("SELECT * FROM sometable WHERE id = " + str(myID))

If your query is complex, you may find it helpful to compute it first
and then execute it, so that you can log it, examine it in the
debugger, etc.:

  Dim sql As String = _
    "SELECT * FROM sometable WHERE id = " + str(myID)
  rs = db.SQLSelect( sql )

You could also use ReplaceAll, where maybe your select statement is in
a constant kQuery, and defined as "SELECT * FROM sometable WHERE id =
%id", and then do:

  rs = db.SQLSelect( ReplaceAll( kQuery, "%id", str(myID) ) )

Basically, you've got a full language here, with lots of ways to
manipulate strings -- do it however makes sense to you.

> Basically I don't like the use of this databinder-controls in the GUI
> because it violates the MVC-principle.

They're just a convenience; you don't have to use them if you don't
like them.

Best,
- Joe

--
Joe Strout -- joe at strout dot net
Strout Custom Solutions, LLC

_______________________________________________
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>