dcsimg
A Flash Developer Resource Site

Results 1 to 19 of 19

Thread: FLVs imported worked, then started stuttering.

Hybrid View

  1. #1
    Junior Member
    Join Date
    Jun 2003
    Posts
    27

    FLVs imported worked, then started stuttering.

    I have a Flash™ AS2 (Using Flash CS4) file that required some video imports.

    The videos were shot at 1280x720 at 29.97 fps against a green screen.

    I brought the 1-minute clips into Adobe After Affects, keyed out the green screen, and exported as an FLV with the following set-up:
    • codec: On2 vP6
    • Max Data Rate: 400 kbps
    • Frame rate: 24
    • Audio: MP3 64 kbps (mono)


    The files were then imported into the 960x700 Flash™ file at their original file dimensions, using "Load external video with playback component".

    After uploading to an online test site, the original testing worked great with no glitches on any of the 4 test PCs.

    Then I received several more ( same set-up) videos... did the exact same exporting and importing... and now the video stutters horribly.

    I've tried adjusting the output (After Effects) to output at a Max Data Rate: 150 kbps, as well as bringing the output dimensions down to 960x540 (not proportion constrained, I know), and this helped a lot.

    But why did the stuttering happen to begin with? It worked the first time... and with bigger (dimension) FLVs.

    I'm so stumped trees shun me.

    Any suggestions from the FlashKit Gurus?

    Thanks in advance!

    Chad
    Last edited by secretw; 12-22-2009 at 10:47 AM.

  2. #2
    Senior Member
    Join Date
    May 2008
    Posts
    332
    Just a few things that don't seem to make sense:
    29.97 fps transcoded to Frame rate: 24
    Then a
    1280x720 video...imported into the 960x700 Flash™ file at their original file dimensions
    Then from
    Max Data Rate: 400 kbps down to 150 kbps
    and
    dimensions down to 960x540
    So it's really hard to tell what problems have been introduced into the video. An actual link to the site with the videos would be most helpful.
    However, hare are a couple of observations.
    First, for a 1280 or a 960 video or whatever it is, a bitrate of 400kbps is much too small for quality display. For high quality you would need a bitrate in the thousands (2-4000kbps) for really high quality video. But that is much to high to expect delivery over the Internet. You'd be much better off outputting your video at 720 X 405 (16:9) at 1000kbps.
    A bit rate of 150kbps is satisfactory for a 160 X 120 display, but not much more than that.
    My advice, don't change frame rate, downsize the output dimensions to about 720 x 405 and keep the correct aspect ratio. Then you'll have some good video files to work with. If there are problems after that, they will be much easier to fix.
    Best wishes,
    Eye for Video
    www.cidigitalmedia.com

  3. #3
    Junior Member
    Join Date
    Jun 2003
    Posts
    27
    Thanks for taking the time to respond, Eye. I really appreciate it. I've read some of your other insightful responses. FlashKit is lucky to have someone like you on here.

    I'm sorry I wasn't clear! Too much red wine- if there is such a thing!

    The original 1280x720 video fps was 29.97... when I exported the video (to FLV) from After Effects I chose the 24 fps on export. I figured: less frames, less file size, less stutter.

    I have a working Flash document in which the stage measures 960 x 700 (actually 980 instead of 960). I imported the (24 fps) FLV into this flash document.

    The "Max Data Rate" is an option within the FLV Export on After Effects. Medium Quality is considred (according the AE presets) 400 bps.

    Here's my tests:
    http://www.chadaustin.com/client_tes...ng/index2.html

    Tomorrow morning, I'll try your advice. I do appreciate your efforts!

    Thanks,
    Chad

  4. #4
    Senior Member
    Join Date
    May 2008
    Posts
    332
    Thanks for sendng the link, it gives a better idea of what you are doing.
    As for the frames per second issue, it's actually the less frames, the more stutter. That's because each frame image is on the screen longer and it's easier to tell when that frame changes. Just imagine looking at the old type of cartoon animations where they flipped from one frame to another. If the flipping was really slow (low frame rate) each image is stationary for a longer period of time, then it's interrupted by the page flipping to the next image. Now compare that to a fast flipping cartoon (hight frame rate). Each image is displayed for a much shorter time and before we can really focus on a static image (which is really what video is), it changes slightly, creating the illusion of movement. So for best results, keep the framerate same as original.
    The bitrate of a video is the amount of data that is required to continually display the video, without interruption. But the bitrate is directly linked to the size of the display. Think of that data as a can of paint. With a 1 quart can you might be able to provide good coverage over a 32 X 24 foot area. But would you get the same good coverage if you had to spread that same ammount of paint out over a 1280 X 720 foot area? No, you'd end up with a really weak, poor quality job.
    So when AE lists 400kbps for a certain quality, that's true, but only for one size video display, which would be about 320 X 240. A larger display requires a higher amount of data coming in (the bitrate of data in other words), to produce that same quality level.
    Now since you are green screening and eliminating some of the data, you will have to play with the bitrate somewhat, but remember, the higher the bitrate, the better the quality.
    So I'd say reduce your display size down to 720 or so and up the bitrate to a rate that does not overwhelm most of your viewers Internet connection speed (probably 1000kbps or less).
    Best wishes,
    EfV

  5. #5
    Junior Member
    Join Date
    Jun 2003
    Posts
    27
    Hey Eye! Thanks again for so much insight! I got carried away with Holiday the last three days and haven't had a chance to try anything but I have a good idea of what you were suggesting. Hopefully tomorrow will allow to try your suggestions!

    Let's discuss greenscreen, if I may. If I have a display of 720 (width), but knocked out the greenscreen area to where only about 40% of the video was showing- is that 40% only what I need to be concerned with? I suppuse I'm asking if the alpha channel has any bearing on the video being displayed? I'm not sure if my termonolgy is accurate, but hopefully you get the idea.

    Thanks,
    Chad

  6. #6
    Senior Member
    Join Date
    May 2008
    Posts
    332
    I don't know that you can make an exact 1:1 ratio of 40% of display (greenscreen plus alpha channel) so you only need 40% the normal bitrate. My guess is that you cannot reduce the bandwidth that much, but perhaps some. In determining optimum bitrate, every video has variations. For example, it takes a much higher bitrate to correctly display a camera pan (horizontal movement) than it does to display a static picture. That's because in a pan, every pixel on the entire screen is changing for as long as the pan lasts. It takes a higher bitrate to display your stage person walking onto the stage than once he is stationary and just a "talking head", far fewer pixels needing to be changed every frame.
    So I think you'll still have to experiment a little to see what bitrate works best for you. Play close attension to maintaining correct aspect ratio and original framerate.
    Let us know how this turns out for you.
    Best wishes,
    EfV

  7. #7
    Junior Member
    Join Date
    Jun 2003
    Posts
    27
    OK- I understand. I also think I asked the incorrect question! (I've been notorious for doing that- ha)

    Does the bitrate of the alpha transparency area influence anything?

  8. #8
    Senior Member
    Join Date
    May 2008
    Posts
    332
    I don't know the exact answer.
    My guess is that the influence is not zero. But since the alpha channel is part of the video with the man walking onto the stage, how could you control that bitrate separately?
    Best wishes,
    EfV

  9. #9
    Senior Member
    Join Date
    Apr 2000
    Location
    Minneapolis
    Posts
    2,127
    Hi,
    I had a look at your video, it seems to me that you must have a pretty large area of alpha channel. Is your video shot with a horizontal camera? 1280 wide x 720 high?

    If so that implies maybe as much as half of your frame is unoccupied. As this is Flash and not TV you have no set aspect ratio restrictions. If your speaker never enters an area of the frame lose that whole area, either side and above.

    Can you crop the video so that it is a size that just allows the speaker to be seen. You would have to export at a custom size from after effects.
    the smaller the frame the smaller the bitrate required.

    Also a slight resize (not the crop) may help smooth the edges of your alpha channel. Try scaling the whole frame down a little.

    Mark

  10. #10
    Junior Member
    Join Date
    Jun 2003
    Posts
    27
    Hi Eye- Good point. I don't know about controlling the bitrate separately, but I was thinking that since the alpha is a part the screen doesn't have to re-draw, that it would help in playback. I'm a newbie on Flash™ video so my process of thinking may not be the most practical. I will say, however, I tried the suggestions at higher bitrate @ 720, same ratio (I have another going up in a few minutes @ 1280) you mentioned and it didn't seem to help on the test PCs. Darn it.

    Mark, yes- the video was shot at 1280 x 720. I thought the exact same thing (in terms of cropping), but I can't seem to figure out how to crop out just the area I want. It isn't as intuitive to me as say Photoshop, but I will give it another try in a second.

    Also, the video clip samples that you're watching: they all are Masked by a layer in Flash... kind of the same "cropping idea", but done in Flash instead of After Effects.

    Thanks for all your suggestions- both of you.

  11. #11
    Senior Member
    Join Date
    Apr 2000
    Location
    Minneapolis
    Posts
    2,127
    afraid I am not sure how to crop it in after effects.
    I know you could export to quicktime then convert to flv in adobe media encoder.
    There you can crop quite easily.

    Masking is one of the most processor intensive things in flash player.
    So masking your video in Flash could cause playback issues.

  12. #12
    Senior Member
    Join Date
    May 2008
    Posts
    332
    I'd be curious to see a clip of the original video, with the greenscreen still visible rendered as a .flv just to compare quality before and after chroma-keying. Could you do that?
    So far I think 13 is about the best. Also wondering why you want to mask anything, since you've already done the chroma-key and you're including the alpha channel?
    Best wishes,
    EfV

  13. #13
    Junior Member
    Join Date
    Jun 2003
    Posts
    27
    mgason- you know, I took out the Masking layer and examples 9, 10 & 11 went much, much more smoothly on the test PC (cheapo machine). As a matter of fact, #11 showed no jerkiness at all.

    Eye for Video, I'll get you a version up within a day (rendering for you now). The original, just in case you were wondering, was shot on $35K HD camera by a very, very professional (and multi-award winning) company. The original QT they sent me was just over 29MB.

    The reason I tried masking anything was to "mask" any alpha processing not needed, if that were happening... same prinicpal as "cropping", but on a Flash level.

    I really appreicate both of your efforts & suggestions.

  14. #14
    Junior Member
    Join Date
    Jun 2003
    Posts
    27
    Hi Eye,

    http://www.chadaustin.com/client_tes...ng/index2.html

    Test 16. And this is nothing compared to the orginal quality. Cheers! The file size is sooo small without the alpha channel encoded.

  15. #15
    Senior Member
    Join Date
    May 2008
    Posts
    332
    Well now we know how much the alpha channel affects file size!
    I'd still say that as the man's image becomes larger, the quality decreases. When his image is smaller, the imperfections are not as noticible, quality seems better.
    Best wishes,
    EfV

  16. #16
    Junior Member
    Join Date
    Jun 2003
    Posts
    27
    isn't that crazy? Who would have thought the the alpha channel- where nothing shows- would take up so much file weight (size)?

    the craziest thing of all is why the original tests displayed no issues, yet now there are.

    And while this may be a totally superfluous statement, I believe the PC viewing the video as well as network (Internet, Intranet) connections to be a big factor in the display. My PC here is a monster... no problems on any tests. But the test PC- while on the same network in my home is probably 5-6 years old. And that's where I can see all the stuttering and inconsistant playback.

    I guess there's a reason for the Flash Video Server afterall.

    I appreciate all your suugestions!

  17. #17
    Senior Member
    Join Date
    Apr 2000
    Location
    Minneapolis
    Posts
    2,127
    You have to have a alpha channel obviously.

    looks like you could crop about 30 percent of the right side of your video off, and even a little off the top, every little bit will help.

    Green screen is not very well lit which is giving you trouble.

    I would scale the video down just a little after doing the alpha channel, this will soften the edge.

    can you export a quicktime with alpha channel resized to about 90 percent of original?
    I would be interested to play with that.

  18. #18
    Junior Member
    Join Date
    Jun 2003
    Posts
    27
    Quote Originally Posted by mgason View Post
    You have to have a alpha channel obviously.

    looks like you could crop about 30 percent of the right side of your video off, and even a little off the top, every little bit will help.

    Green screen is not very well lit which is giving you trouble.

    I would scale the video down just a little after doing the alpha channel, this will soften the edge.

    can you export a quicktime with alpha channel resized to about 90 percent of original?
    I would be interested to play with that.
    Sorry- had a client fire that has taken my attention away for a day...

    First, I started a new project in After Effects last night... but made it so that only the video area I needed to display would be visible on the "stage"... that "cropped" the 30+% I didn't need of the 1280 video.

    Then I rendered it at about 70% instead of the suggested 90%... just wanted to see if it made any difference.

    This is test #17 at http://www.chadaustin.com/client_tes...ng/index2.html

    The file size was cut down almost 75%! But the video playback is still jerky and stuttering on the piece of crap testing machine (as well as the clients' unfortunately).

    Mgason... is that (the test link I provided) what you needed? Or did you want me to try something else? Thanks for your input!

  19. #19
    Senior Member
    Join Date
    Apr 2000
    Location
    Minneapolis
    Posts
    2,127
    Hi,
    With an alpha channel you may think you are subtracting info from the file, making a blank area with no video, thus making the file smaller.

    That's not what is happening, what you are doing is saving an extra channel of information. The video is all still there, plus the alpha channel which is a complex animated mask basically. You are adding to the file size.

    Think of it like masking a photo in flash. You have the complete photo and the mask movie clip adding to the final swf size.
    You are doing that 29 times a second!

    Is your audio mono, it should be. Try Mono, Frequency 44hz, bitrate 96.
    You could even get away with going lower as its only talking, its subjective, you just have to try reducing settings until it sucks.

    180 for a bitrate is very low, what is your max set to?
    I would imagine you are using the max for that size.

    Counter intuitively sometimes compressing too much is more of a problem than file size. If you are using 2 pass on your compression, try 1 pass. Increase your minimum and max bitrates. Sometimes it is the decompressing that causes the machine trouble, not the actual displaying of the video.
    For example you may find a really high quality quicktime will play back smoothly on that machine, it is huge, but not very compressed.

    Check out this site with your crappy machine, let me know what the "bandwidth" and "bitrate" text boxes above the video say. It is a test site for something I am working on.
    http://www.gasolicious.com/OrangeUpload/index.html

    Mark

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