PDA

View Full Version : video compression



tj
10-12-2003, 05:40 PM
Hi

I'm brand new to this site - and self taught when it comes to web design.

I have been working in video graphics for years and want to post animations to my site yet they are extremely slow to load. I have Quicktime Pro, After Effects and flash (but have not learned it yet) but have not found a setting that plays back nicely. My video production buddies say i must have Media Cleaner - but that is very expensive and I am hoping that there might be a way around that $500 expense.

Any suggestions as to compression settings and max sizes would be very helpful.

Thanks

WebCraft
10-13-2003, 10:23 AM
Based on how long your video is, and whether your sound is Mono or Stereo, you can get away with a variety of compressions in Flash.
Frames per second should be around 12 with a stream optimization.

I personally have used 24.000mhz on the sound so that the file does not sound like it was recorded underwater and has loaded and sounded just fine with little to no frame stalling or jumping.

Let us know how long it is.

tj
10-13-2003, 12:39 PM
thanks WebCraft -

most of my clips are under 30 seconds (between 5sec - 30sec). some have audio some do not.

I have never processed video in Flash - and am quite unfamiliar with the program although I own it (MX) and have been meaning to get into it. I will dig out my books --

will I need to imput video already scaled at the 12 frames per second into FLASH or is that an adjustment I make there?

thanks

tj

WebCraft
10-13-2003, 01:03 PM
tj,

I know that in the older version of Flash that I have, you can adjust all the compression in the preferences within the program.
you may want more of a detailed overview from the Flash section of the forums. I know that there is definately a group of people that can answer that more than I could.

I was just relaying my experience as I have encountered it. As far as MX goes, well I cannot help there. Just ask them at the Flash forum.

I wish you best of luck.

Sualdam
10-13-2003, 02:27 PM
You can alter compression setting very easily in Flash MX and depending on the physical dimensions you want you should be able to get your 30 second clips easily down to the 100s of kbs rather than MBs.

In a nutshell, all you do is import the video file and it ends up on the timeline on its own layer.

tj
10-14-2003, 01:03 AM
thanks guys - I will give it a shot in the AM.

tj
10-16-2003, 08:31 AM
You can alter compression setting very easily in Flash MX and depending on the physical dimensions you want you should be able to get your 30 second clips easily down to the 100s of kbs rather than MBs.

In a nutshell, all you do is import the video file and it ends up on the timeline on its own layer.

thanks - I have been trying to inpost a clip and keep getting memory problems - I have bumped the memory alotted to Flash up to 300,000 right now and still having trouble - so I have started to re-render the video clip at a smaller size before importing.

Do you have any size recommendations? for imput or output? the original file was 800mg I have it down to 200mg now (scaled it to about a third of the size which is fine). For audio and video playback, do you think the 12 frames a sec is ok?

sorry for the stupid questions - my MX upgrade did not ever send me the basic books - I have been trying to work with "How to do everything with Macromedia Flash" and it is a bit confusing.

btw - should I re-post this in the Flash section or can one of the mods move it there?

Sualdam
10-16-2003, 09:09 AM
Uh-oh. You're on a Mac.

I can't make any comments about how to resolve Mac issues.

Read this section on Macromedia's site.

http://www.macromedia.com/support/flash/images_video/flash_video/index.html

You can reduce the size of the SWF by changing the physical size of the video, the quality of the video, or both (plus a few other bits).

Most people get greedy and try to keep DVD quality whilst reducing the filesize of huge videos to just a few kb. :) You can't do that.

If you have an 800MB video you aren't going to get it down to much less than a sixth of that size (about 1.5MB-ish) without serious loss of overall quality and/or change in physical size compared with the original.

Basically, you have to change your expectations.

Remember that if you stream then you can play while it is downloading.

tj
10-16-2003, 12:27 PM
thanks Sualdam.

I do not mind compromising. Unfortunately- most examples of what I do are full rez quicktimes for my video clients - I have made a couple small and have attempted to post them on this page but they take forever to load as is - which is the reason I have been asking about compression and format:
http://www.tonicvision.tv/master_pages_html/animation_new.html

I need to re-design and streamline the entire site - so please be gentle with crits :-)[/img]

Sualdam
10-16-2003, 01:24 PM
I've got a feeling you aren't streaming.

There's technically nothing wrong with a large video as long as a) people with wet string and coconut half connections to the Internet are made aware that they might not be able to see it, and b) you stream so that a portion of the video loads into a buffer, then starts to play, and the rest of the video loads in the background.

Transient issues on the web mean that just as you can't expect instantaneous downloads of even text-only pages every visit, neither can you expect jump-free downloads whilst streaming video.

Even if your server and the user has technology that came out of Star Trek, the wet string in the middle (of the USA :) ) can slow it all down.

:)

tj
10-17-2003, 12:24 AM
do you really think streaming will make a difference? Another thing to look up and figure out how to make it happen.

I have so much to learn re web design.

thanks

Sualdam
10-17-2003, 02:43 PM
Streaming makes ALL the difference :)

Sometimes (in fact, most of the time) a huge video can only be 'compressed' to a certain point without becoming horribly pointless. Nine times out of ten, that point is still a pretty big file. Even if you get down to a few hundred kbs it is still too big for dial-up users...

...if you force them to download the whole thing first before starting it playing.

If you stream, it can start playing straight away.

Theer ARE things to bear in mind as I said - the connection speed and amount of buffering you do will affect the jumpiness of the playback.

If the movie plays the buffer contents, but the connection is poor and no more has loaded, the video will stop until more has loaded.

It's quite easy really - why don't you give it a go on a test movie? If it works, you can then just drop it into your main movie/page.

weskit
10-19-2003, 01:51 AM
Hi

I'm brand new to this site - and self taught when it comes to web design.

I have been working in video graphics for years and want to post animations to my site yet they are extremely slow to load. I have Quicktime Pro, After Effects and flash (but have not learned it yet) but have not found a setting that plays back nicely. My video production buddies say i must have Media Cleaner - but that is very expensive and I am hoping that there might be a way around that $500 expense.

Any suggestions as to compression settings and max sizes would be very helpful.

Thanks

I haven't found any free alternatives to Media Cleaner on Macs at least. In QT Pro, I'd use export settings of:

compression: H.263
Quality: med
fps: 12
key frame: 12
limit data to: 50

That really degrades the quality but I got your "live dangerously" video down from 1.3 MB to 596 KB. Also with H.263 format your video can be played by older QT Players.

tj
10-19-2003, 02:31 AM
thanks Kyle - I will give it a shot.
tj

amorphic8
10-28-2003, 12:16 AM
on a Mac? YAY!!!! Good for you.

Quicktime Pro is probably all you need to generate good enough sample clips of your videos. Don't see a point in using Flash for this: it will be more trouble for you than it will be worth. Seems many people think Flash is the superhero for solving all the problems that pertain to anything that moves or makes a sound. It definitely has strong points, I use it extensively and know it well, but for simple video delivery in a web page, it is absurd to even consider Flash.


Using the settings suggested above should help get your file sizes down. When dealing with multimedia on the web, compromise is the rule. You can't expect your video to play like TV without streaming, but you can still achieve decent quality from an http server, provided you follow some guidelines.

Reduce the size of the video. Standard web playback of video is rarely over 320 pixels wide, and the reason for this is to reduce the file size while still maintaining quality.

Sound is important. Unless the soundtrack absolutely MUST be in stereo, reduce it to mono. This setting will sum the left and right channels into one single channel that will playback through both speakers. By doing this, you can cut the file size of the sound by 1/2.
If it is still too big, reduce the sampling rate, but be careful. CD audio is recorded at 44kHz for a reason. Reducing the sampling rate will cause high frequencies to sound 'mushy' or squashed. If the soundtrack is complex, reducing the sampling rate too much may make it sound unclear. However, if the sound is only speech, there is a setting in QT Pro that reduces the sound band to only include the frequencies present in normal speaking.

Quicktime is you best bet for delivery from an http server, due to the 'progressive download' ability. What this means is that the video file will buffer enough of the clip to begin playback (without having to wait for the whole file to download).
You can also consider the Helix Producer from Real Networks....it is another free encoder that sometimes produces better results than QuickTime. There is currently no OS X version, but you can download the OS 9 version. If you are running OS X, it will operate fine in classic mode.

Embed the video in the webpage using the <object> and <embed> tags as in the sample code below. If you must, create a seperate window to 'pop out' of the web page that holds the video. You can do that by using JavaScript.
I did that on a site I recently created:
http://www.liquidassetsnj.com/ghost.html

Check out the sourcecode of the .../ghost.html page to see the Javascript function I wrote to pop the window out. Check the sourcecode of the movie player window to see how the files are embedded.

Here is some sample code for using <object> and <embed> with Quicktime:


<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="320" height="240" codebase="http://www.apple.com/qtactivex/qtplugin.cab>
<param name="src" value="PATH TO YOUR .mov FILE HERE">
<embed src="PATH TO YOUR .mov FILE HERE" width="320" height="240" pluginspage="http://www.apple.com/quicktime/download/"></embed>
</object>


If you plan on doing more of this in the future, consider paying a web host for a streaming server. Also check out the "Streaming Media Bible" by Steve Mack. I use this book in the class I teach at NYU, Sound Design for the Web. You can also consult the page I set up for the class for more information, links, and help.

http://homepages.nyu.edu/~rjc223/SoundDesign

If it is too much trouble for you to learn all of this, try using a professional service. Consider, my company, .:amorphicmedia:., for example.

hope this helps.