Instead of setting the Movieplayer position in this fasion, do this instead.... ditch the

Dim m as movie

and replace it with

Dim m as editableMovie

It doesn't matter if you do not plan to edit the movie. It is OK to use EditableMovie for playback. Then, f.openasEditableMovie to get your EditableMovie and look at the duration property. What does that give you? Can you set the MoviePlayer to that position and do things line up?

-Erick

On Apr 1, 2006, at 2:32 AM, Jeffrey Mattox wrote:

Well, the plot thickens. I wrote a little program to demonstrate the problem, but I discovered something unexpected. The only files that exhibit this trouble are the Bruce Williams's podcasts.

If anybody else is interested in this, here are the details.

1.  Create a new RB project.

2. Drag a MoviePlayer, a Timer, and a StaticText control into the Window.

3.  For the MoviePlayer1.Open() event:


  Dim f as FolderItem
  Dim m as Movie

  Dim o as OpenDialog
  o = new OpenDialog
  o.PromptText = "Please select an audio file"

  f = o.ShowModal
  if ( f <> nil ) then

    m = f.OpenAsMovie
    if ( m <> nil ) then

      MoviePlayer1.Movie = m

// must do this after loading the movie to make the player clickable (RB bug)
      MoviePlayer1.Top = 10
      MoviePlayer1.Left = 10
      MoviePlayer1.Width = 220
      MoviePlayer1.Height = 16

      MoviePlayer1.Play()
      MoviePlayer1.Position = 100000 // go to the end

    end
  end



4.  For the Timer1.Action() event:

  StaticText1.Text = Str( MoviePlayer1.Position\60 ) + _
     ":" + Format( MoviePlayer1.Position Mod 60, "00" )


5. Use iTunes to download a Bruce Williams podcast. iTunes will say it's 53:00 in length. Do a Command-R to locate the mp3 file, then open the file in QuickTime Player. QuickTimePlayer will also report 53:00 in length.

6. Launch the above RB program and select the Bruce Williams podcast (located in ~Music/iTunes/iTunes Music/Podcats/Bruce Williams/"). The player will advance to the end of the file and the StaticText1 will show the player position (53:15). The durations don't match, but they are the actual time the mp3 will take to play in the respective player.

So, QuickTime Player and RB player treat Bruce Williams podcasts differently. RB plays the files using a slower rate (43892 samples/ second, instead of 44100).

For the record, I'm using RB 2005 Release 4.

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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to