View Full Version : lossless realtime opensource codecs?
wereHamster
22nd July 2006, 12:32
There seems to be a lot of new codecs, especially lossless ones and a few for screen capturing. That's great! But none of them is opensource or even runs under linux, which is what I'd need.
I've written 'Fraps for Linux', first using the ffmpeg libs but those are so badly documented, it's a horrible to use them. Now I'm saving the data nearly lossless, I only convert it from RGBA to YUV.
But saving 1280x1024@25 is the best I can do without any compression, that's ~50-70MB/s and that almost requires RAID (preferably on a separate computer and a GBit network, which I have, but not everyone has that). I'd love to use soem king of compression, but as said, ffmpeg is pain in the a** to use and I haven't found any other codec.
Is there an lossless codec that can encode at least 1600x1200@25 in realtime? Preferably opensource or at least one that is available as a library under linux?
CruNcher
22nd July 2006, 18:21
1600x1200@25 uff not without a really fast pc even Cineforms HD codec wich is near lossless and one (if not the) of the fastest in the comercial world would have problems i suppose with that resolution, didn't tried it higher then 720p here on my 2.4 Ghz AMD Singlecore in 720p it works realtime, for you i think LocoCodec in one of the near lossless modes might be the answer (source available) but i didn't made any tests @ this high resolution with it yet. But who knows maybe something new is coming in the near lossless sector that's gonna beat Cineforms Codec soon (in decodingspeed/size/quality and encoding time) :D *twinkers to someone*
easy2Bcheesy
24th July 2006, 10:11
Is there an lossless codec that can encode at least 1600x1200@25 in realtime? Preferably opensource or at least one that is available as a library under linux?
Try huffyuv 2.1.1. I can capture 1280x768 at 60fps with no lost frames using this compressor. That's a pixel throughput almost 20% higher than what you need.
wereHamster
24th July 2006, 10:35
Try huffyuv 2.1.1. I can capture 1280x768 at 60fps with no lost frames using this compressor.
The source code contains a lot of win32 specific parts and I can't find a linux version. But I'm not really into porting it. And ripping out the code from the ffmpeg library would be as muchy work as porting the original sourcecode.
mahsah
25th July 2006, 19:18
CorePNG maybe? Don't know about the speed on that though...
foxyshadis
25th July 2006, 20:13
PNG is sloooooooow. Slower than the main MSU lossless.
zmbv and huffyuv are the only fast ones I can think of for linux, although someone knowledgeable might be able to port lagarith to linux. Oh, lavc has its own huffyuv, so you can use it from mencoder and other apps, no need to port anything.
wereHamster
25th July 2006, 21:57
lavc has its own huffyuv, so you can use it from mencoder and other apps, no need to port anything.
I do NOT want to use lavc because it's a bitch to use: undocumented API, very few sample files with almost no comments and when there is a comment it doesn't explain much.
Ripping huffyuv out of lavc is as much work (I did that with ffv1) as porting the original huffyuv source, more or less I'd imagine.
Soulhunter
29th July 2006, 13:15
Why (Huff)YUV and not (Huff)YV12? Should be faster as you have to process less data, and most destination formats are YV12 anyway, no?
Bye
wereHamster
2nd August 2006, 12:06
I don't know whether its YUV or YV12 or what else format there is. It's the format that x264 accepts as input, I think it's called YUV 4:2:0.
Soulhunter
2nd August 2006, 15:46
Oh yeah, YUV 4:2:0 should be YV12 afaik!
Bye
wereHamster
2nd August 2006, 21:07
So.. the original HuffYUV has assembler in the source code which I don't like and don't even know how I could port to linux, and ffmpeg's huffyuv code is ugly as usual and hard to rip out of the whole project, does anyone know any other HuffYUV implementation? maybe from another project?
foxyshadis
2nd August 2006, 21:46
You don't need to port inline Intel asm syntax to AT&T, you just pass a flag to gcc and it'll happily compile it. How much of the rest of it needs updating I wouldn't know (maybe squid_80 can help, since he recently fiddled with multithreading it).
wereHamster
2nd August 2006, 21:49
maybe squid_80 can help, since he recently fiddled with multithreading it
Sounds cool, did he post the code somewhere?
foxyshadis
3rd August 2006, 00:08
Not yet, try asking in PM or in the huffyuv MT (http://forum.doom9.org/showthread.php?t=113889) thread.
wereHamster
3rd August 2006, 10:51
Unfortunately the original huffyuv works on packed pixels and a depth of 16bpp, my pixels have 12bpp and are planar. And since I am not yet so good in assembler I don't have the choice and I'll have to take the implementation from ffmpeg as my base :(
conando
3rd August 2006, 14:12
So there's no (free/open) alternative to Cineform in sight somewhere?!
wereHamster
20th August 2006, 15:39
well.. I've learned assembler and ported the HuffYUV assembler to amd64 (with little tweaks etc.) and now I compress the frames with it: a simple prediction mechanism and the huffman encoder written in assembler let's me compress at about 120MB/s to 50%.. nothing great, but it helps to cut down the video size...
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.