Flash Video Playback Problem

sgt_goomba2

Joined: 2009-07-22
Posts: 12
Posted: Thu, 2009-07-30 01:37

Hey guys, I try to stay out of your hair as much as possible, but I'm hitting a roadblock that I think someone familiar with the javascript within the gallery2 flash players may know something about. I'll try to provide as much organized information as possible.

Summary:
Flash video playback speed is inconsistent when the flash is encoded at anything other than 15 FPS. (By speed, I mean it plays in slooooow mooootion).

Details:
In my portfolio site, I'm currently using suprsidr's flash player, but the default player has a similar problem. A movie encoded at 15 frames plays back at normal speed in any browser and at any size. If encoded at any other framerate, all browsers play the movie in slow motion in fullscreen mode. Chrome and firefox play non-15 fps movies at full speed when played at small size. IE plays non-15 fps movies in slow motion no matter what (both small size and fullscreen).

The default player has a similar problem, but slightly different. The only difference: in IE, it plays a non-15 fps movie at full speed when playing at normal size. This, I think, is evidence that the problem lies somewhere within the code for these players.

I have Adobe Media Encoder, and not ffmpeg (server doesn't have it). I use the "FLV, same as source, flash 8" preset as a base, and then just change up the framerate and bitrate. (Just using the basic preset with no change whatsoever doesn't help either)

To demonstrate: here you'll find three movies at the bottom row, each one encoded at a different FPS.
http://koopatorivm.com/sjdesign/index.php?option=com_g2bridge&view=gallery&Itemid=63&g2_itemId=41

Troubleshooting (and other info):
-Probably not a bitrate issue. I've tried encoding as low as 100 kbps. The movies in my example files above happen to be encoded at 700. All show the same issue.
-Probably not a computer performance issue. I have a new gaming laptop. CPU usage never goes up past 30 percent when playing these movies.
-Might be an encoding issue, who knows. However, I've tried very hard to follow best encoding practices.
-15 frames is a poor option, because it looks like crap compared to 30 frames. (as I believe the examples show)
-Again, seems like a javascript thing. For example, it seems like something within the code for supersidr's player triggers for IE that causes non-15 movies to slow, and the same trigger doesn't exist for the default player.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2009-07-30 01:58

Hate to tell ya, they all play the same for me.
IE7 & 8, chrome, safari windows, FF 3.5, and Opera9.64.
Even clearing my cache to make sure they are indeed different.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
sgt_goomba2

Joined: 2009-07-22
Posts: 12
Posted: Thu, 2009-07-30 02:00

ARGH.

Thank you for the quick feedback, sir. Obviously, I must do more testing.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2009-07-30 02:01
 
sgt_goomba2

Joined: 2009-07-22
Posts: 12
Posted: Thu, 2009-07-30 02:45

I'm pretty sure I updated recently, but I just did again to be sure. No help though. Also, I've done some more testing, this time on another laptop.

The issue seems universal with non-15 fps movies shown in fullscreen. Did you try viewing the movies in fullscreen when you tested? You can tell that it's slow because the punch sound should occur exactly when the main character hits the crab.

It looks like I was sorta wrong about the small version playback. In IE, it plays back slowly only with a FLV file encoded at "same as source" fps, which would put it at 60 frames. I'm not going to try to fix that IE behavior because it's probably bad practice to encode a flv at anything above 30 fps anyway. IE plays a 30 fps movie just fine in small size. I did put up the 60 frame flv just because I'm curious about it.

So yeah, it looks like the issue is why non-15 fps movies are slow in fullscreen.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2009-07-30 02:55

I'm sorry, they still play fine.
Are you experiencing slow load/bad internet connection?

You can signup for a free account and upload to your user album on mysite to test as well.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2009-07-30 03:02

flash: 10,0,22,87
FF 3.0.12 on windows as well as IE7.0.5730.11

This : http://koopatorivm.com/sjdesign/index.php?option=com_g2bridge&view=gallery&Itemid=63&g2_itemId=279
plays for about 5 seconds
while this: http://koopatorivm.com/sjdesign/index.php?option=com_g2bridge&view=gallery&Itemid=63&g2_itemId=288
playes for about 15 seconds.
I have zero experience with this so will bow to the expert suprsidr.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2009-07-30 03:07
 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2009-07-30 03:22

Same result on mysite, 60 fps plays funky on my netbook, but they all play fine on my desktop.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
sgt_goomba2

Joined: 2009-07-22
Posts: 12
Posted: Thu, 2009-07-30 03:35

I signed up for your website suprsidr. http://www.flashyourweb.com/media/index.php?g2_itemId=39806
Again, the video should last exactly 5 seconds, and the punch sound should match the strike.
Also, music should last throughout the video. (On my end, the sound always plays at normal speed, which leaves a silent gap at the end of a slow video).

On suprsidr's site:
I put up 60 fps, 30 fps, and 15 fps versions of the video.
The 60 fps version plays slow in both the small and fullscreen versions. But I'm not concerned with this case because it's probably not good to encode past 30 fps.
The 15 fps version plays at normal speed in both small and fullscreen.
The 30fps version plays at normal speed when small, and slow when put into fullscreen.

This is the same behavior I'm getting on my own site.
For some reason, the 30 fps fullscreen slowdown isn't AS slow as on suprsidr's site.
Maybe because the fullscreen is slightly smaller?? Anyway, that was the only difference I noticed.

All the browsers were the same, except that Chrome and Firefox (latest versions) have no problem with a 60fps file in it's small version.

I'm really curious as to why suprsidr can't replicate the error, so I'm going to grind out some more tests on another laptop or something.

 
sgt_goomba2

Joined: 2009-07-22
Posts: 12
Posted: Thu, 2009-07-30 03:59

OKKKKAY,
NOW all videos up to 30 fps play fine at any size on supridr's site (but not on mine), whereas before they did not. I just love screwy intermittent errors.
I'll try to find something more concrete (I do apologize since I wouldn't have posted if I didn't think my error was concrete).

 
sgt_goomba2

Joined: 2009-07-22
Posts: 12
Posted: Thu, 2009-07-30 06:36

I have some information:

On my end, fullscreen is always slow on my site, in every browser, with anything other than 15 fps. This includes the one other laptop I have to test with.
On suprsidr's site, fullscreen is fine with everything except 60 fps.

It's hard to reproduce these errors exactly because I'm pretty sure it's a performance issue. Video memory or something like that, who knows.

Evidence:
1) Fullscreen videos on suprsidr's site tax my cpu 10 - 20 percent less than the same videos on my site.
2) My screen resolution is normally set at 1920x1200. When I bump my screen resolution down, my fullscreen videos play fine.

The question still remains why suprsidr's fullscreen is more resource efficient than my fullscreen, seeing as we're using the exact same player.

 
sgt_goomba2

Joined: 2009-07-22
Posts: 12
Posted: Thu, 2009-07-30 09:49

I hate to double double post, but I'm making interesting progress.

I found the handy dandy options in the code for installing other players. I went with flowplayer because it looks slick as hell.

Unfortunately, the handy dandy code happened to be obsolete for flowplayer 3, so I fixed it. I'll post it once I polish the implementation.

Observations: flowplayer 3 plays even the 60fps flv at fullscreen with no slowdown whatsoever. That's crazy!
I'm not entirely certain why I had suprsidr/G2default issues. My guess is that the stock G2 players aren't as memory/cpu efficient, which makes them
unpredictable at higher framerates.
Again, this is only a guess, and I think suprsidr's player is equally as slick, and would be proud to use it for my site if I knew
how to remedy the slowdown on my end.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2009-07-30 12:35
Quote:
My guess is that the stock G2 players aren't as memory/cpu efficient

My players have several transparencies and overlays which make them look slick, but also hurts performance on slower machines.

Quote:
we're using the exact same player

Mine would be the latest build. If memory serves me I was adjusting the video smoothing/deblocking functionality.
Adobe builds in two functions for enhancing video: Smoothing and deblocking - both of which are cpu intensive.
I believe my latest build disables both for fullscreen in favor of performance.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2