PDA

View Full Version : new lossles codec


FredThompson
14th March 2003, 08:35
OK, a bunch of things to announce here:

I've been chatting with the author of the free screen capture program CamStudio (http://www.rendersoftware.com)

The idea was to use his video grabbing ap (CamStudio) to make pixel-perfect AVIs in NTSC DVD resolution.

Two ways to do that, run in a window and hope you figure out the aspect ratio so things look proper or run the video driver at 720x480. Drivers to do this and also PAL are at Omegadrive's (http://www.omegacorner.com).

Yesterday I received an email saying they've released a lossless codec to work with CamStudio. Source code will be available soon. I've also sent a message to Bruce Eckel (author of programming books) about CamStudio and the codec. He was looking for screen capture recently and I'm hoping he'll promote CamStudio and this codec in his next newsletter. Maybe a compression guru will show up. (Uh, RGB color model only, remember, this is grabbing from a computer monitor.)

Anyhoo, here's the email:

Hi Fred,

After about a week of sleepless nights, we have just released a new lossless codec which I hope will complement CamStudio. This codec operates in RGB and is able to compress 16,24,32 bit RGB images. We zap a few good compression algorithms from the internet and put them into the codec.

My initial test on my system with the LZO algorithm on CamStudio Recorder gives comparable rates with MS Video 1 (70 Quality). It is slightly slower than Huffyuv (Huffyuv is available only in 24bit color mode) but gives very small filesize if the encoding is performed on Desktop/computer images (However, images derived from VCD movies results in much larger filesize).

Testing it with a 16bit webcam movie with the GZIP algorithm (level 6), and temporal compression turned on (Force keyframe every 20 frames in VirtualDub), the compressed size is about 10 times that of DivX at 780 kbps.

BTW, there are some bugs when the codec used with the CamStudio Player 2. It seems some lines are missing in the decompressed movie. On MS Media Player, these artifacts are not present.

You can take a look at the codec at
http://www.rendersoftware.com/products/camstudio/codecs.htm

We will release the source on the site shortly, and hope somebody can improve it. If possible, please list it on the site you are maintaining.

(ed: He means the link lists on Donald Graft's site, http://shelob.mordor.net/dgraft/)

Thank you.

Best regards,
Jacob

Belgabor
14th March 2003, 11:15
This thread fits better in the New A/V Formats forum. Moved.

ChristianHJW
14th March 2003, 11:24
Interesting ... we have plans to start a new opensource project for a lossless video codec on http://corecodec.org .... could you ask them what license they will use for their source code release ?

Sirber
14th March 2003, 14:58
I'll test it.

[edit]

Hufyuv is faster (78 FPS vs 25 FPS) and the filesize is smaller (11 Go instead of 13 Go) for a 800 MB VCD.

Atamido
14th March 2003, 16:13
Would it be possible for you to test it with a short DVD source clip and a TV source clip?

FredThompson
14th March 2003, 20:15
Belgabor: Had to guess which forum. There is one for capturing but it's only analog sources and this is quite different. Thanks, this is a better place to find help with the codec.

ChristianHJW: Yes, I've already asked about licensing terms. I also suggested SourceForge. Don't have a reply yet. Looking forward to your RC3. :D

Sirber: It certainly could benefit from tweaking. Did you get HuffYUV to work with CamStudio? Can't compare a CamStudio capture to a direct conversion because the data to be compressed is different. VCD is encoded in MPEG-1 and doesn't use the RGB color model, correct?

Would be cool to automatically sync CamStudio's "frame grabs" with the refresh of whatever players are running.

CamStudio has no direct relationship with full-screen analog-source video. Until the release of this codec, it had only lossy compression. Now the potential is very real to have lossless capture of computer graphics.

Sirber
15th March 2003, 00:54
@FredThompson

VirtualDub convert in RGB when using Full Processing Mode. So, both codecs compress the same thing (source).

FredThompson
15th March 2003, 01:32
OK, I see what you did, you exported as a test comparing HuffYUV and this new codec.

Yeah, it certainly needs some tune-up for "natural world" video both for size and speed. That's actually how I got started on this, I'm trying to make DVDs of PowerPoint presentations that contain MPEGs of DV footage I shot. Thing is, that's a combination of video so lossy compression makes the sharp edges of computer graphics look like junk.

Cool thing is, the basic framework is there for lossless capture from the computer display. I'm really hoping somebody builds on this. There's all kinds of uses for lossless capture of comptuer displays (or parts thereof, CamStudio does region grabbing, not just full screen.)

Given HuffYUV's source is freely available, seems like it should be fairly easy to put parts of it into this codec. I'm not skilled enough to do it, just seems it should be doable.

Have been wondering if HuffYUV's compression could be improved given CPUs are so much more powerful now than a few years ago. There was some discussion about this in the AviSynth area. Ben's code is supposed to be pretty darn good.

DDogg
17th March 2003, 18:12
Fred, buried down in that meandering thread in Avisynth devel is a codec from markfd you might want to try if you have not:
codec:
http://forum.doom9.org/attachment.php?s=&postid=263985
page 4 of thread
http://forum.doom9.org/showthread.php?s=&threadid=38389&perpage=30&pagenumber=4

FredThompson
17th March 2003, 18:37
Yes, I've seen that and briefly discussed it with neuron2. That same thread has a discussion about Ben's compression code.

This whole project started when I couldn't get HuffYUV to work with 32-bit displays. I thought it was CamStudio but, apparently, HuffYUV doesn't support that depth, only 24 bit. Well, I started bugging Render Software about a codec and that kind fo how we got to here.

What I find really interesting about this new one is solid colors compress better than with HuffYUV, so says Render Software. Nothing against MarcFD, what he's done is really cool, but it's for the YV12 color model. For grabbing screen displays, you really want RGB so it's accurate and also because the conversion from RGB to YV12 will take time.

Granted, at some point you'll probably want to have YV12 because it's quicker to work with. Seems to me that's better done after the capture.

It would be really cool if somebody who's a devotee of Michael Abrash decided this would be fun to tweak. Maybe there's not a way to really improve on Ben's compression but it sure would be nice given there's about 10x the horsepower compared to when he wrote HuffYUV.

FredThompson
24th April 2003, 03:50
The full source for the CamStudio lossless codec is now available.

By any chance, would somebody who knows a lot about data compression and highly-efficient code structures be interested in optimizing this?

phrentec
24th April 2003, 06:18
i have been using the TSCC (techsmith screen capture codec) for a while now and so saw this and had to ask, how does the new lossless codec compare to the TSCC? TSCC also supports 8-bit for bare minimum file sizes and is optimized to a large extent for screen captures.

ChristianHJW
24th April 2003, 06:46
Originally posted by FredThompson The full source for the CamStudio lossless codec is now available.

Links please ?

By any chance, would somebody who knows a lot about data compression and highly-efficient code structures be interested in optimizing this?

As said above, its all depending on the licensing form, we maybe take the existing code and make a project from it on corecodec.org ....

FredThompson
24th April 2003, 06:55
phrentec: Dunno, all I have is CamStudio.

ChristianHJW: Link is in the first post. Here 'tis again: http://www.rendersoftware.com/

I'm hoping for something that will give better-than-HuffYUV compression on combined CGI and "natural" video at 720x480 (forced resolution with OmegaDrive's drivers) to yield lossless full-res source to then compress for DVD. Anything lossy yields artifacting twice (once on capture, again on encode) on sharp edges. That creates a cruddy-looking DVD because the source is muddier than it should be. CPU/storage costs are so low that the system overhead isn't so much an issue anymore except that large files are still a pain in the butt.

Seems to me it would be easy enough to shoehorn the full HuffYUV compression into this codec so the performance would be at least as good as HuffYUV on 24bit, better on simple CGI stuff. I'm not skilled enough to do this, however.

The challenge seems to be finding somebody who is skilled at data compression/runtime optimization and is also interested in lossless video capture. If such a person is found, the codec could be improved. (Michael Abrash, where are you?!?!)

Actually, tell ya what, I'll provide a full copy of my archive of editing sites to anyone who will get this done. That's about 14G of files. The primary list is at http://shelob.mordor.net/dgraft/ but I've also got a lot of additional test video, logos, things like that. I guess it would have to be split across 3 DVDs as the only efficient way to distribute that many files (unless that person sends me a HD to copy them to, preferably NTFS. It would actually be better that way because of how the sites are interlinked.)

Would be really cool if somebody figured out how to put a wrapper around the free Binktools (http://www.radgametools.com) so they'd work like a standard codec...

Here's an excerpt from an email conversation with RenderSoft while I was pushing them to develop the codec:

After about a week of sleepless nights, we have just released a new lossless codec which I hope will complement CamStudio. This codec operates in RGB and is able to compress 16,24,32 bit RGB images. We zap a few good compression algorithms from the internet and put them into the codec.

My initial test on my system with the LZO algorithm on CamStudio Recorder gives comparable rates with MS Video 1 (70 Quality). It is slightly slower than Huffyuv (Huffyuv is available only in 24bit color mode) but gives very small filesize if the encoding is performed on Desktop/computer images (However, images derived from VCD movies results in much larger filesize).

Testing it with a 16bit webcam movie with the GZIP algorithm (level 6), and temporal compression turned on (Force keyframe every 20 frames in VirtualDub), the compressed size is about 10 times that of DivX at 780 kbps.

BTW, there are some bugs when the codec used with the CamStudio Player 2. It seems some lines are missing in the decompressed movie. On MS Media Player, these artifacts are not present.

phrentec
24th April 2003, 10:15
Dunno, all I have is CamStudio.
well then you can get the TSCC lossless codec from

http://www.techsmith.com/products/studio/codec.asp

regards.