dcsimg
A Flash Developer Resource Site

Results 1 to 14 of 14

Thread: Frame Rate Issues: .swf playing too fast in browser

  1. #1
    Senior Member
    Join Date
    Jul 2000
    Posts
    373

    Frame Rate Issues: .swf playing too fast in browser

    Got a 31fps .swf that when I play it in Flash from Test Movie plays at the proper speed. However, when I test it in a browser, the .swf plays about twice as fast. The movie does load a H.264 .m4v video at frame one so I'm wondering if that has something to do with it. Does anyone know of a way I can force the .swf to play at 31 fps?
    Adam Bell
    dzign@datatv.com
    --
    Over 90% of all websites
    suck......
    Join the minority.

  2. #2
    Senior Member
    Join Date
    May 2008
    Posts
    332
    I'm curious about the 31fps speed. Any reason for that particular choice... just seems kind of unusual.
    Is the video player all in one frame or does it stretch out over several frames?
    I think that if the player is in just one frame, then using a different frame rate than the video shouldn't be a problem.
    To test, you could always set the frame rate to the same as the video and see if that makes a difference.
    Best wishes,
    www.cidigitalmedia.com

  3. #3
    Senior Member
    Join Date
    Jul 2000
    Posts
    373
    I picked 31 based on the fact it seems the defacto standard these days for Flash movies is either 21 or 31 frames per second it seems to be optimized. Even so, reducing it to 30 didn't change anything.

    The m4v video itself is set at 29.97 fps but when I place it in the movie, it drastically increases the speed of the movie to around 110fps. Delete the FLVPlayback component from the stage and it plays around 31fps second. Which is what I want.

    So the culprit is the video. That's the cause. But what's the solution? Using an .flv instead? A different frame rate? Even adding stage.frameRate = 31; doesn't change a thing. It still plays four times as fast as it should.
    Adam Bell
    dzign@datatv.com
    --
    Over 90% of all websites
    suck......
    Join the minority.

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Posts
    373
    Forgot to mention, the FLVPlayback component is in just one frame. It's a one frame .swf calling movie clips which are already on the stage.
    Adam Bell
    dzign@datatv.com
    --
    Over 90% of all websites
    suck......
    Join the minority.

  5. #5
    Senior Member
    Join Date
    May 2008
    Posts
    332
    Can you post a link to the video?
    EfV

  6. #6
    Senior Member
    Join Date
    Jul 2000
    Posts
    373
    Here's the one using the .m4v file:
    http://www.datatv.com/flashkit/moneyshot5.html
    and the video
    http://www.datatv.com/flashkit/EndSlate_720p.m4v

    and the one using the .flv file:
    http://www.datatv.com/flashkit/moneyshot5.html
    and the video
    http://www.datatv.com/flashkit/EndSlate.flv

    The flv plays at a much closer rate than the m4v. It's no contest. However, it's still twice as fast.
    Adam Bell
    dzign@datatv.com
    --
    Over 90% of all websites
    suck......
    Join the minority.

  7. #7
    Senior Member
    Join Date
    Jul 2000
    Posts
    373
    Sorry, the one using the flv is:
    http://www.datatv.com/flashkit/moneyshot6.html
    Adam Bell
    dzign@datatv.com
    --
    Over 90% of all websites
    suck......
    Join the minority.

  8. #8
    Member
    Join Date
    Dec 2009
    Location
    UK
    Posts
    35
    Both versions run identically on my PC, 31-33fps.

    Quote Originally Posted by databell View Post
    I picked 31 based on the fact it seems the defacto standard these days for Flash movies is either 21 or 31 frames per second it seems to be optimized. Even so, reducing it to 30 didn't change anything.
    Anymore info on this? I've never heard it mentioned before.

    Cheers,
    Rob

  9. #9
    Senior Member
    Join Date
    May 2008
    Posts
    332
    I don't understand exactly how this .swf was created. So bare with me if I ask some dumb questions....
    Where is the .flv? Why are you loading a .flv into a simple animation like that? Are you using a preloader? There seems to be a distinct jump in the fade-in which occurs after the animation starts to run. Slow fade..BAM the blue water is there. Is that intentional?
    The animation seems to run fine, in fact it's pretty slow for an ad.
    How are you displaying the frame and framerate data?
    Since I don't understand why you would use video in this and
    So the culprit is the video
    Can you post a link to the video (.flv) file?
    Have you tested the .flv in another player to see if there are problems with it?
    How as the .flv created? Was it transcoded using some non-Flash software?
    Still lookin'....
    Eye for Video
    www.cidigitalmedia.com

  10. #10
    Senior Member
    Join Date
    Jul 2000
    Posts
    373
    First off, Rob: Thanks for the test. It's interesting as both me and my clients are testing it on Macs and you're on a PC there would be such a drastic difference.

    Now onto the explanations. This was a client call. They wanted the background animation to mach exactly the background in their TV commercial. I originally suggested using a bitmap object and a displacement map in Flash, but they had no interest in that. Thus the video. Used Squeeze for the encoding and converting. There is a preloader but I didn't use it here since it's another .swf and it doesn't affect the issue I'm having. Would it have been better to directly embed the video in the .swf instead of remotely accessing it? That's what I've always been told.

    Just a note, I also encoded a similar flv using Adobe Media Encoder. No difference.

    I already posted the link to the videos in a previous post.
    Adam Bell
    dzign@datatv.com
    --
    Over 90% of all websites
    suck......
    Join the minority.

  11. #11
    Senior Member
    Join Date
    May 2008
    Posts
    332
    I don't see any video to download at either of the link in the post above, just a corrupted file or page or something. Can you actually download the .flv from the link above?
    To solve this I think you'll need to determine if the problem is in the .flv or if it's in the way that the .swf is playing the .flv.
    I'm still confused about why you would use a .flv for this project. The entire thing is just an animation isn't it? Was it created in After Effects or a Video Editing program and then rendered as .flv? If not, what software program was used to create the animation and what format was it before you "converted" it?
    Have you tried to play the .flv in another player, one you know works. With a good link to directly download the .flv, I'd be glad to test it and break open the .flv (it's just a container format) and check the file/files inside.
    EfV

  12. #12
    Senior Member
    Join Date
    Jul 2000
    Posts
    373
    I can get it. If you're on a Mac like I am, you just control-click the link and from the contextual menu, you click on Save Link As and then download the .flv to your hard drive. On a PC, I don't know how that would work.
    Adam Bell
    dzign@datatv.com
    --
    Over 90% of all websites
    suck......
    Join the minority.

  13. #13
    Senior Member
    Join Date
    May 2008
    Posts
    332
    Yeah I can right click and "Save Target As" but it shows a file type of .htm.
    So what about the original creation software? what was it and what was the output file type that you had to convert?
    Have you tested the .flv in another player?
    If you don't have one, here's code for a really simple player to directly play .flv files. One frame, just a "new video" on the stage.
    Create a new Flash doc, next the library title panel are 3 small line and a down arrow, open, choose new video and drag a new video onto the stage (actionscript controlled) give it an instance name of "video_screen", size it to whatever size you need.
    Then put this in your actiosn layer:
    /
    Code:
    * Video player created by CI Digital Media for educational purposes */
    
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    
    var ns:NetStream = new NetStream(nc);
    video_screen.attachVideo(ns);
    /* Name of your video, with correct path, goes here */
    ns.play("video1.flv");
    Save in same folder as your.flv, edit name to match your file name.
    If the .flv is not corrupt, it will play. If it doesn't play... then you have problems with the .flv file.
    EfV

  14. #14
    Junior Member
    Join Date
    Jul 2008
    Posts
    4
    Ever find a solution for this?
    I have a similar problem here although its not just a browser issue.
    When the ad has been hosted by ad server it displays at at least double speed, but only on mac, plays fine on pc.
    Yet when I host it myself it plays fine on mac!
    Going mad here trying to figure out why this is.

    Any ideas?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center