MP4 Poor Video Playback

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
CenturyMan1979
Posts: 86
Joined: Tue May 15, 2012 5:56 pm

MP4 Poor Video Playback

Post by CenturyMan1979 » Fri Aug 24, 2012 9:03 pm

Hey All,

When playing back a 1280x720 MP4 in livecode I notice very poor playback performance. When I run the same video in the quicktime player it looks fine. Am I missing a property in the player object that would result in the poor playback performance.

Thanks for any input.

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: MP4 Poor Video Playback

Post by shaosean » Fri Aug 24, 2012 9:05 pm

Maybe the alwaysBuffer property?
Setting a player's alwaysBuffer to true always increases memory usage, and may make movie playing more jerky.

CenturyMan1979
Posts: 86
Joined: Tue May 15, 2012 5:56 pm

Re: MP4 Poor Video Playback

Post by CenturyMan1979 » Fri Aug 24, 2012 9:54 pm

I should of mentioned that I have tried the alwaysBuffer property and there is no performance improvement.

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: MP4 Poor Video Playback

Post by shaosean » Sat Aug 25, 2012 1:21 am

Are you playing the video from disk or was it imported in to your project?

CenturyMan1979
Posts: 86
Joined: Tue May 15, 2012 5:56 pm

Re: MP4 Poor Video Playback

Post by CenturyMan1979 » Sat Aug 25, 2012 4:58 am

It is an external video that I am loading into a player object at runtime. Here is my code so far,

Code: Select all

on importVideo pVideoData
   create invisible player
   local tID, tShortID
   put the long id of the last player of me into tID
   put the short id of the last player of me into tShortID
   set the width of tID to pVideoData[width]
   set the height of tID to pVideoData[height]
   set the loc of tID to pVideoData[x],pVideoData[y]
   set the filename of tID to pVideoData[file_path]
   set the visible of tID to true
   set the looping of tID to true
   start player id (tShortID)
end importVideo
The other thing I have noticed is that avi & wmv files will not play through the player object. I am working on windows and not sure if this is a mac issue also. I have tried using,

Code: Select all

play vc "/path/to/file" at 100.100


which seems to play a wmv file but I was wondering if there are more properties that can be used with this method as I can't seem to find it in the documentation. The other main settings I am looking for are width, height & looping. Any help would be appreciated.

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: MP4 Poor Video Playback

Post by shaosean » Sat Aug 25, 2012 6:10 am

Not too certain why your video is jerky, perhaps setting the qtIdleRate property..

Also, you may want to look at using the templatePlayer to set up the properties of your player object..

Code: Select all

on importVideo pVideoData
   set the width of the templatePlayer to pVideoData[width]
   set the height of the templatePlayer to pVideoData[height]
   set the loc of the templatePlayer to pVideoData[x],pVideoData[y]
   set the filename of the templatePlayer to pVideoData[file_path]
   set the visible of the templatePlayer to true
   set the looping of the templatePlayer to true

   create player
   start player id (the short id of the last player of me)
end importVideo

Klaus
Posts: 14189
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: MP4 Poor Video Playback

Post by Klaus » Sat Aug 25, 2012 11:41 am

Hi guys,

I hate to say, but video playback IS JERKY for bigger sized MP4 movies in LiveCode!
Even on my MacMini "i7" 2.7 Ghz, 8 GB Ram and a FAST SSD!
This is not question of hardware but the implementation of QuickTime in LiveCode I'm afraid.

Open a MP4 movie in QuickTIme Player and play it fullscreen -> smooth display
Do the same with a player object in LiveCode -> JERKY display, no matter what properties you set!

RunRev needs to change its multimedia playback engine soon, since there will NOT be QuickTime f
or Windows anymore*** some time in the future!

*** In the "Read Me" of the latest update of iTunes for Windows I was suprised by this sentence:
"Hint: iTunes does not need or install QuickTime anymore" :shock:

Best

Klaus

Post Reply