Log in

View Full Version : CamStudio Lossless (vs other codecs)


Se
14th June 2014, 14:22
I don't see this codec discussed a lot, but it's in my experience the most efficient lossless codec in terms of compression for desktop recording (a lot of static picture etc.).

I did a simple test with a few other codecs and these are the results:
uncompressed: 1.8GB
Camstudio: 10.9MB
FFV1: 209.3MB
Lagarith: 160.6MB
Ut: 376.8MB

BTW, 7-zip at "ultra" beat all of those at only 1.7MB, but it's obviously not a video codec and it was slower.

Here are the test files for anyone interested:
http://www.mediafire.com/download/u57tet9ny21auri/lossless_desktop_recording_test.7z

If I made a mistake somewhere or if you can do better results with some codec let me know.


However, encoding a busy colorful movie sample (H.264) produced completely different results, with Camstudio doing terribly there:
uncompressed: 1.3GB
Camstudio: 0.9GB
FFV1: 362.2MB
Lagarith: 399.3MB
Ut: 416.1MB



Now, desktop recording is probably of marginal interest for video in general, but couldn't the other codecs be better optimized in this area?
Even the second best (Lagarith) was quite far behind, despite supporting null frames.
But overall Lagarith seems pretty decent and I wonder why some other codecs like Ut get more attention lately. Just better support/more active development?

huhn
15th June 2014, 06:24
BTW, 7-zip at "ultra" beat all of those at only 1.7MB, but it's obviously not a video codec and it was slower.

you can use 7lib for compression in MKV i can get the camstudio down to 3.2 mb with default settings.


you need a non intra frame only codec to compress sources like this more efficient. but these aren't good for editing. and it looks like camstudio is a none intra frame only codec that's why it wins in this situation.

Procrastinating
15th June 2014, 14:16
8-bit x264 --output-csp rgb --preset veryfast --qp 0 gives me 3.12MB, checked and can confirm the output was lossless.

--preset veryslow got me 2.69MB

I wonder how x265 fares.

foxyshadis
16th June 2014, 01:57
You should at least be comparing with ZMBV (DosBox codec), MSS2 (the Microsoft Screen Codec), and other screen codecs. Normal lossless codecs are intra-only by design. The x264 result surprises and amazes me, though.

Se
18th June 2014, 17:17
you can use 7lib for compression in MKV i can get the camstudio down to 3.2 mb with default settings.
I couldn't find much on this. What do you use to encode it?
Also, is the file playable in VLC or MPC-HC?


8-bit x264 --output-csp rgb --preset veryfast --qp 0 gives me 3.12MB, checked and can confirm the output was lossless.
I tried that, but the output wasn't lossless. At least not when playing it in MPC-HC.


You should at least be comparing with ZMBV (DosBox codec), MSS2 (the Microsoft Screen Codec), and other screen codecs.
Any simple way to use to those? I got ZMBV vfw, but it can only encode in 16bit color in Virtualdub.

cyberbeing
18th June 2014, 17:53
I couldn't find much on this. What do you use to encode it?
Also, is the file playable in VLC or MPC-HC?
He means zlib content compression from the MKV specification. With MKVtoolnix you can manually enable it for tracks under extra options. For PC playback, you shouldn't have an issue with enabling zlib in MKV.

Se
18th June 2014, 21:19
Oh, I see. I made it work, but by compressing/muxing the camstudio file this way it doesn't play in either VLC or MPC-HC. (With other codecs it does, but there's not as much size benefit.)

huhn
18th June 2014, 21:51
this is interesting.
mpc-be with disabled internal mkv splitter still uses the internal mkv splitter with a zlib camstudio file and works. my mpc-hc version with lavfilter can't open this.

LAV Splitter Source (internal)::Video

Media Type 0:
--------------------------
Video: CSCD 1920x1080 15fps

AM_MEDIA_TYPE:
majortype: MEDIATYPE_Video {73646976-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {44435343-0000-0010-8000-00AA00389B71}
formattype: FORMAT_VideoInfo {05589F80-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 0
bTemporalCompression: 1
lSampleSize: 1
cbFormat: 88

VIDEOINFOHEADER:
rcSource: (0,0)-(1920,1080)
rcTarget: (0,0)-(1920,1080)
dwBitRate: 0
dwBitErrorRate: 0
AvgTimePerFrame: 666667

BITMAPINFOHEADER:
biSize: 40
biWidth: 1920
biHeight: 1080
biPlanes: 1
biBitCount: 0
biCompression: CSCD
biSizeImage: 0
biXPelsPerMeter: 0
biYPelsPerMeter: 0
biClrUsed: 0
biClrImportant: 0

pbFormat:
0000: 00 00 00 00 00 00 00 00 80 07 00 00 38 04 00 00 ........€...8...
0010: 00 00 00 00 00 00 00 00 80 07 00 00 38 04 00 00 ........€...8...
0020: 00 00 00 00 00 00 00 00 2b 2c 0a 00 00 00 00 00 ........+,......
0030: 28 00 00 00 80 07 00 00 38 04 00 00 01 00 00 00 (...€...8.......
0040: 43 53 43 44 00 00 00 00 00 00 00 00 00 00 00 00 CSCD............
0050: 00 00 00 00 00 00 00 00 ........

foxyshadis
19th June 2014, 01:28
Any simple way to use to those? I got ZMBV vfw, but it can only encode in 16bit color in Virtualdub.

VirtualDub defaults to 24bit, but you have to force 32bit in the output color depth. The codec is unusually picky that way. For Microsoft Screen Capture, you have to use a DirectShow encoder, unfortunately.

He means zlib content compression from the MKV specification. With MKVtoolnix you can manually enable it for tracks under extra options. For PC playback, you shouldn't have an issue with enabling zlib in MKV.

I forgot you could do that for video and audio tracks, too. Cool! Very good for some wasteful codecs, but obviously nev will have to be notified about the error.

cyberbeing
19th June 2014, 17:06
nev will have to be notified about the error.

This has nothing to do with the zlib compression, that works for anything.

I fixed the problem though.

Fix AVI codecs in MKV which require a bit depth value to be set. (https://github.com/Nevcairiel/LAVFilters/commit/a7311780a687dbb5be6c932e2500fa8aaf19dba8) [2] (http://git.1f0.de/gitweb?p=ffmpeg.git;a=commit;h=6d12a9954be2b5a2641924f8ca1fbd743935ba8f)

Se
19th June 2014, 21:42
VirtualDub defaults to 24bit, but you have to force 32bit in the output color depth.
Got it, thanks.
The resulting file is 3.0MB (at max compression) and plays fine in VLC.