About video compression

Started by Andail, Thu 01/12/2005 18:45:30

Previous topic - Next topic

Andail

I've been editing film using Premiere for quite some time, and I'm rather proficient with it. However, I can never manage to render material with both good quality and low size. What compressions/codacs do you use?
How can ordinary full length movies be around 700 mb, and still look almost perfect in quality, when small clips I save reach several hundred mbs and turn out crap?

HillBilly

I use DivX, which is used by most 700mb movies. They look good on the computer, but isn't much on the grand slam television itself. You could give it a shot though, if you haven't already. If you have, I got nothing.

SSH

Heh, funnily enough I have a job interview at a company who does this on Tuesday, so I might implement a codec sometime soon, albeit in hardware. Anyway, H264 is the best compression, I believe. http://en.wikipedia.org/wiki/H264
12

AJA

I always first render the video as a normal dv quality avi and then compress it using virtualdub.

You should check some guides on doom9.org to an idea of the "best settings" for divx and xvid:
XviD: http://www.doom9.org/xvid-guides.htm
DivX: http://www.doom9.org/gknot-main3.htm

-EDIT-

http://www.divx.com/support/divx/guide.php

InCreator

#4
Definetly XVid - the one pirated movies use. (It's Windows only, afaik)
I don't know why people still use DivX, it's larger in size, though technology used is quite similar - MPEG4 Part 2.

But otherwise, there seems to be very little of difference.

XVid is a bit difficult to to set up, I suggest older versions, like 4.12, newer compiles give most likely a headache instead of quality.

For sound compression, don't go with PCM formats. Best choice is ATRAC-3 encoder, which strongly reduces sound size but has still acceptable bitrates. If not AC3, choose LAME MP3 encoder and you'll be fine (though few (hundred?) megabytes poorer).

Rendering the edited, final version of video will actually look best if you use properly configured VirtualDub. Especially if you want to eliminate interlacing completely. And it's free.

Deinterlacing, btw, is a science of it's own. I've got best results using progressive scan...

Also pay attention to framerate and resolution. MiniDV camcorders usually capture at 50 fps. These 700mb movies have either 25 or 23 fps. That's like 2 times less image content. Anything below 23 fps will lag, so don't get lower than this.

Bitrates: for video, bit rate around 130-230 kbps will look sufficent, for sound, 128-320 kbps.

Colors: I render mine at 24bit. 700mb movies usually use 12bit.
Difference: noticeably less colors (gradients get dithered look!) and a little bit (ok, not that little  :P) of smaller size, but I'd still stick to 24bit.

For Video editing, Premiere isn't that good. Only 2 video tracks? You must be kidding... And it's hell of a figuring out what and where to click whatever you need to do, like capturing something from MiniDV for example. It also often fails to recognize FireWire...

I switched over to Sony Vegas 5. And I'm really happy with this choice.

AJA

Quote from: InCreator on Thu 01/12/2005 22:46:16Bitrates: for video, bit rate around 130-230 kbps will look sufficent

A 2 hour 14 minute movie (699MB) with DivX4:
Size: 640x288 @ 25 fps
Video bitrate: 608 kb/s
Audio bitrate (mp3, 2ch): 128 kb/s, 48000 Hz

The second half (59 minutes) of a two cd movies (701MB) with DivX 3.11:
Size: 640x272 @ 23.976 fps
Video bitrate: 1203 kb/s
Audio bitrate (ac3, 5ch): 448 kb/s, 48000 Hz

Star Wreck in the Pirkinning (1h 45min, 541MB) with XviD:
Size: 640x272 @ 25 fps
Video bitrate: 597 kb/s
Audio bitrate (mp3, 2ch): 128 kb/s, 48000 Hz
(The video quality was excellent. Sadly, I've never managed to get such good results. :-\)


That should give some idea of the correct video bitrates. With a bitrate more than 700-800 kb/s the quality should be good enough if the other codec settings are set correctly.

edmundito

Usually, I export the movie as DV-AVI and then encode it with the lastest version Windows Movie Maker.
The Tween Module now supports AGS 3.6.0!

Nikolas

#7
A simmilar question:

As mentioned to another thread I have done work in a documentary with a duration of 9'32".

Now the files I got from the director were the following two: film.2mv (580 Mb0 and film.wav (100 Mb). It seemed a little big.

Never the less I managed to combine them into a super CD in which the size of the mpg is 170 Mb (it does make more sense doesn't it?)

Anyway I plan on extracting a small part (about 45") and have it in my website (this ghost site, that has not yet been constructed yet...). What kind of compression should I use? Note that I have it also in QuickTime format (again in 600 Mb). It should be small for downloading purposes...

Any idea?

EDIT: Well after reading the above posts (which I had done but not closely), you obviously have an idea. Sorry for that!

InCreator

Isn't it answered already? For a teaser, try lower res mpeg, and yeh, why not one of mentioned codecs?

seaduck

#9
Hey, video compression is sort of my "area of expertise"!

Well the video coded you should employ definitely depends on what type of video you are trying to compress.

Real-life video

The general video codecs (like MPEG, DivX, Xvid, Theora, WMV and the like) work are best for real movies, and work fine for cartoons, too. Roughly said, I'd divide these into two categories: MPEG - older codec, lower compression ratio, but much less CPU load, the rest - newer, higher compression ratio, more CPU load.

If you experience bad quality/size ratio with these codecs, it's usually due to poor quality of the source material. These codecs are VERY sensitive to (white)noise in the source, as white noise contains a huge amount of data and they will try to encode it.

My experience: A quality full-length widescreen(=less picture area) movie (e.g 2 hours from a DVD) can be compressed with DivX into resolution as high as 480xsomething and fitted on a single 700MB CD (~500kbit/s)

A quality full-length 4:3 movie recorded from DVB-T, in 720x576 resolution compressed with DivX can be fitted on 2CDs (actually 2CDs are much more than enough) (~1mbit/s)

Both with great quality.


On the other hand when recording from analog TV air-broadcast with ATI-All-in-Wonder, I had to reduce the resolution down to 352x288 and use bit rates as high as 1mbit/s to keep the visibility of artifacts reasonable (but they would still be perceivable and the quality being just ok, but not very good)

As for different versions, I only have long experience with DivX, and I can tell you, that DivX 4.1x is the ultimate version. The later versions brought nothing really beneficial (no crucial bugs fixed, still can't encode some video dimensions), on the other hand the licencing policy changed, and many useless features were introduced.

Computer game animation is a whole different story

The codecs listed above usually have problems with the crispness of computer-game animation.

For limited animation, like used in most adventure games, i'd say the best is a non-lossy compression, in the spirit of FLI,FLC or GIF. (FLI/FLC use RLE compression, which is VERY fast, but not very high compression ratio, GIF uses LZW compression which has higher compression ratio, and is still quite fast to decompress - actually it's insanely fast comparing to such monsters as DivX)

As for VfW (that is AVI, which you can use in AGS?) there is a codec called Microsoft RLE, but, to be honest, I never tried it, but I suppose it might be equivalent to FLI/FLC.

Alas I don't know of any VfW codec that would use LZW or something similar.

Curse of Monkey Island

Now if you recall Curse of Monkey Island, it had great FMV, which was a sort of cross between game-animation and cartoon animation. It looked fantastic! LucasArts apparently did a great job of creating a special codec for this kind of video.

In areas of the picture that were changing rapidly, it used some sort of lossy compression, and in the relatively stationary ones it gradually improved the picture until perfection.

The results look just amazing. Unfortunately I know nothing closer than what I deduced from observing the videos, and I don't know of any publicly available codec that would be capable of such things.

Conclusion

Anyway, if there would be interest, I might look into this problem. If I can find out how to create a VfW codec, I would be (100% sure) able to create one with GIF-like compression.

As for CMI-like videos, I can't say anything. If it employs techniques similar to MPG and the likes, I would probably not be able to produce anything similar, since it's just too difficult to get it right. On the other hand, there are simpler (but much MUCH less compression ratio) lossy compression schemes, like Microsoft Video 1, or the very similar texture compression in modern graphic cards.


EDIT:

lossy compression (MPG,...) => higher compression ratio
lossless compression (FLI,...) => perfect crispness

Shane 'ProgZmax' Stevens

I would suggest you look into Gordian Knot and the tools package with it.  It combines the best of the freeware tools to let you get the best possible xvid/divx results.  In fact, most scene releases in those format are made using Gordian Knot.  It does take getting used to but the sheer number of options you have with video and audio encoding are great.  Don't confuse this with Auto Gordian Knot, which is no longer updated.

http://www.doom9.org/index.html?/gknot-main2.htm

FractalCore

InCreator said: "For Video editing, Premiere isn't that good. Only 2 video tracks? You must be kidding..."

From the start, Premiere has had up to 99 video and 99 audio tracks. Maybe more, but who's ever needed that many?


seaduck said: "Now if you recall Curse of Monkey Island, it had great FMV... The results look just amazing. Unfortunately I know nothing closer than what I deduced from observing the videos, and I don't know of any publicly available codec that would be capable of such things."

Here's a publicly available codec called Bink http://www.radgametools.com/
I believe CMI either used this or something like it. It's specially designed for game cinematics. Everyone was using it until DivX etc came out, now, I don't know how popular it is. It makes an exe, so you don't need to download any codecs or special players to play the videos made with it. That also makes it useless for AGS cinematics, and it's not that good for distributing your movies online, people tend to get a bit suspicious of .exe's claiming to be videos :)

SMF spam blocked by CleanTalk