views:

166

answers:

2

Please describe some of the best practices for delivering video over the web through Flash Player. For example I am encoding video in FLV at 320x240 pixels, this seems to be the best size for reasonable quality and best filesize. When playing back I have a number of different video components that play the video in a few different sizes.

  • Are there any best practices for selecting the dimensions that the video is shown at?
  • Will Flash player do a decent job of smoothing the pixels of the video?
  • I am using Flash 8 swfs. I am also showing some video in full screen mode, what are the best options here? should I change the size of the video component when moving to full screen, does full screen just zoom in on the swf and so just zoom in the pixels? Is this a matter for the graphics card on the end machine?
  • When moving to fullscreen should i load a higher quality video? NB Im not using Flash Media Server which I know uses dynamic bandwidth detection.
  • Does hardware acceleration (GPU) help with the quality of the picture in video playback?

Any other advice welcome - cheers all.

+1  A: 

Wow! A lot of good questions for video. Unfortunately I didn't have to deal with Flash Video to much, but here is what I've used to get the job done ( decently encoding FLV for progressive download) :

Best Practices for Encoding Video with the VP6 Codec, the table at the bottom of the article for High and Low Motion are really handy.

Optimal Frame Dimensions for Flash Video and Robert Reinhardt's New Flash Video (FLV) Bitrate Calculator with the MAC and WIN projects on that page and the updated ( AVC/H.264 ) AIR version of the app here.

Have a look on Robert Reinhardt's blog/books/etc.

I hope these resources are a good start.

George Profenza
+2  A: 
  • Are there any best practices for selecting the dimensions that the video is shown at?

Yes, many. I'll sum up a few that I tend to care about personally: a) stick to the same aspect ratio, b) try to keep the target resolution a whole multiple of the source: e.g.: 640x480 --> 320x240

  • Will Flash player do a decent job of smoothing the pixels of the video?

Yes. You will want to worry more about the codec and encoding parameters. ffmpeg, and other encoders, will give you "enough rope to hang yourself with", as they say. More of an art than a science.

  • I am using Flash 8 SWFs. I am also showing some video in full screen mode, what are the best options here? should I change the size of the video component when moving to full screen, does full screen just zoom in on the swf and so just zoom in the pixels? Is this a matter for the graphics card on the end machine?

Not sure if I get you fully. I'd suggest using FLV for the actual video files. When you go to full screen, the video will not be stretched. Rather, if it cannot fill the screen, you will get black borders either on bottom & top (if the video is wider than the screen) or on the sides (if the video is taller than the screen...this scenario is unusal.)

  • When moving to fullscreen should i load a higher quality video? NB Im not using Flash Media Server which I know uses dynamic bandwidth detection.

If you do you will encounter buffering. As I understand it, the dynamic bandiwdth detection means that the highest quality video will be displayed for the client's Internet connection. Therefor, you won't want to mess with trying to programatically force a higher quality.

  • Does hardware acceleration (GPU) help with the quality of the picture in video playback?

In most modern machines on Windows and OS X with decent drivers? Yes, depending on the codec. Linux is going to be hit and miss. Widely implemented codecs will have a better chance of success. E.g.: h263 (FLV), h264(MP4).

Stu Thompson
Thanks Stu, re question 3 (video and fullscreen) I am using FLV for the video files and noticing that when I go to fullscreen mode the video appears more blocky, you are right it does not stretch and maintains aspect ratio. However I am wondering wether I should allow Flash to zoom the video up to full screen or set the scale property to false and write some code that resizes the FLV Playback component to fit the new screen size and if this results in smoother, less blocky video. Same goes for images really, should I resize images on screen .... but this is another question
undefined
A more blocky video would be to be expected, in a sense. 320x240 is 320x240, and your screen is likely much larger. If you encode at a higher quality then it will look less blocky. My experience has been that trial and error works best. There is a seemingly infinite set of encoding parameters that you could use, and you need to find that sweet-spot that works for you. Could you edit your question to include more specifics on the encoding? Like the parameters and codec and whatever else you can think of? These little details matter. :) *PS: An up-vote would be greatly appreciated!* ;)
Stu Thompson
Can you describe the source video in more detail too? How much motion, detail, etc. I am really curious to see your input parameters.
Stu Thompson