How to compress a line graphic video
April 18, 2010 4:48 AM   Subscribe

Any video compression mavens in the house? Is there a specific codec which excels in compressing line graphics? I'm trying to compress three videos for the web. The first two look fine, but the third looks absolutely awful. The ones that look fine are filmed, with actors; The one that looks terrible is entirely comprised of a line graphic and scrolling text. Upon compression, the bottom half of the screen looks blocky and jumbled... See here (uncompressed at right, compressed at left). I used H.264 encoding and 700 kbps, as instructed... But I also experimented with higher bit rates and quality, to no avail.

I hope this is all the info that's needed, but please ask if you need any more...
posted by Silky Slim to Computers & Internet (8 answers total) 5 users marked this as a favorite
 
XviD has a cartoon mode that could help with this.
posted by SNACKeR at 5:28 AM on April 18, 2010


When you say "for the web", are you eventually sending this to YouTube?
posted by effugas at 6:01 AM on April 18, 2010


Here's a pretty good analysis of encoding animation as well as what encoders and settings to use. Looks like x264 is a winner, but if you are encoding for the web, it looks like Elecard has the best H.264 encoder. (Video quality chart from the same page)

Also, If you are trying to his a certain filesize, you can also try dropping the resolution down and increase the bitrate.
posted by wongcorgi at 7:20 AM on April 18, 2010


Looks like x264 is a winner, but if you are encoding for the web, it looks like Elecard has the best H.264 encoder.

No. x264 baseline is the simplest profile, and less complex than you are allowed to use for Flash. Veryfast and Ultrafast are sets of options that mostly control the degree of analysis used, while Baseline limits the compression techniques available but not the analysis possibilities. x264 remains the best H.264 encoder for a variety of content.

x264 should do pretty well at a reasonable bitrate even without tuning. But if you find that the fine details of the lines are getting blurred, you may want to lower the alpha and beta deblocking values to bias x264 toward detail over smooth macroblock edges.
posted by Inspector.Gadget at 7:50 AM on April 18, 2010


Hmm.. I recall seeing a relatively uncommon (but free) codec that works really well for screencasts, it works great for line art so that might work for you. But I'm at work and I can't get on my home machine to see what the codec is. So I'm dropping you a note, sort of as a placeholder to follow up in a few hours when I get home.
posted by charlie don't surf at 12:28 PM on April 18, 2010


As effugas says if this is for YouTube then you don't really have much control over this. The most you can do is to provide a clean source video so make sure that the video is deinterlaced because line art/cartoons are often drawn at half-speed and then interpolated between frames.

If you're self-hosting however then you can control the bitstream and there are many codec options to tweak. If it's available use a chroma improvement for motion detection (aka Cartoon Mode which XviD and Theora have). RealVideo (ugh) is also quite good at cartoon-like graphics though I don't know why.

There are also various playing filters that you can add to flatten colours while viewing.
posted by holloway at 3:01 PM on April 18, 2010


Can you give more information as to your work flow.
Where the source videos came, what are you editing and compressing the files with?
posted by jade east at 7:16 PM on April 18, 2010


I just thought I'd follow up, I still haven't found the codec I am looking for. It was used in a bunch of online training DVDs but I can't remember which ones. I have been spending so much time at work, I haven't had more than a few minutes to look for the codec at home. Sorry.
posted by charlie don't surf at 8:41 PM on April 19, 2010


« Older Kuala Lumpur to UK avoiding closed airspace?   |   Best camcorder to interface with Final Cut Express Newer »
This thread is closed to new comments.