Log in

View Full Version : Need a super fast codec


dukey
17th March 2009, 13:18
I am writing an opengl application that renders stereo images to an offscreen render target. Anyway I am using VFW to produce avi's from the contents of the offscreen render target. It works nicely, but I am looking for a codec which can encode as fast as possible ! Something like fraps .. My output format is RGB, not YUV etc.

Any suggestions ?

dukey
17th March 2009, 13:43
just to clarify
the output of my program is RGB or actually BGR. If the encoder converts to YUV (fast) that is fine. Speed is really the priority.

Dark Shikari
17th March 2009, 13:49
How about just ffmpeg MPEG-2 or something of the sort? Should be plenty fast enough (and ffmpeg includes a very fast YUV converter).

Or HuffYUV if you don't care about size.

dukey
17th March 2009, 14:15
does mpeg2 work in AVI files?

I'll try out HuffYUV

Ranguvar
22nd March 2009, 17:50
Yes, but it's not ideal. Why do you need an AVI container?

Sagekilla
22nd March 2009, 21:22
If I had to wager a guess, it's because whatever he needs to use it with happens to support avi nicely. At least he's not using something horrendous like AVC in avi.

dukey
24th March 2009, 02:17
the code i wrote uses video for windows (because its simple) and i dont need things like bidirectional frames for real time capture
Still struggling with the speed of codecs.
HuffYUV is fast but when i start trying to use resolutions like 1280x2048 the files become enormous and i'm not sure a normal hard disk can write fast enough to keep up with that sort of video.
All the ffdshow video for window codecs all seem single threaded :/ and they seem to max out around 20-30 fps. Maybe could double that on my core2duo with some decent threading ..

ChaosKing
24th March 2009, 10:46
You can try lagarith, its multi threaded and has better compression than HuffYUV.

http://lags.leetcode.net/codec.html

avih
27th March 2009, 20:37
Do you need a lossless codec or can live with a lossy one, or close to lossless? can you afford to recompress later ("offline")? How much does the resolution matter? What's your general aim for the target video (web streaming/editing/archive/etc) and what's the general procedure? maybe you could compress lossless, stream it to a dedicated machine, and compress it there in real time? etc.. Please give some more info, so that people can help you better.

2Bdecided
27th March 2009, 21:14
Canopus HQ, Cineform etc are built for jobs like this.

Cheers,
David.

dukey
30th March 2009, 20:41
Do you need a lossless codec or can live with a lossy one, or close to lossless? can you afford to recompress later ("offline")? How much does the resolution matter? What's your general aim for the target video (web streaming/editing/archive/etc) and what's the general procedure? maybe you could compress lossless, stream it to a dedicated machine, and compress it there in real time? etc.. Please give some more info, so that people can help you better.

i just want to record at the native resolution in as good as quality as possible, fast ! It doesn't need to be lossless. The video will probably get recompressed later.

sbp
30th March 2009, 22:07
Hi the fastest encoder I have used (for capturing from a TV-card) is this http://www.hdx4.com/english/index.php

Regards

audyovydeo
31st March 2009, 13:10
just to clarify
the output of my program is RGB or actually BGR. If the encoder converts to YUV (fast) that is fine. Speed is really the priority.

MJPEG ?

when your app is (almost) ready, I'd love to beta-test it

cheers
a/v

Blue_MiSfit
1st April 2009, 20:34
Another vote for MJPEG. FFDShow's VFW component has a very good MJPEG encoder that I use all the time.

I'm not sure how fast it is.. If you need a really fast MJPG encoder, try Morgan MJPG. It's only $20, and does a nice job.

~MiSfit

dukey
4th April 2009, 01:25
thanks for all the suggestions
will give the Morgan mjpeg a spin :)

audyovydeo
4th April 2009, 17:46
thanks for all the suggestions
will give the Morgan mjpeg a spin :)


What is OpenJPEG ?

The OpenJPEG library is an open-source JPEG 2000 codec written in C language. It has been developed in order to promote the use of JPEG 2000, the new still-image compression standard from the Joint Photographic Experts Group (JPEG). In addition to the basic codec, various other features are under development, among them the JP2 and MJ2 (Motion JPEG 2000) file formats, an indexing tool useful for the JPIP protocol, JPWL-tools for error-resilience, a Java-viewer for j2k-images, ...

Who can use the library ?

Anybody. As the OpenJPEG library is released under the BSD license, anybody can use or modify the library, even for commercial applications. The only restriction is to retain the copyright in the sources or the binaries documentation.


cheers
a/v

2Bdecided
4th April 2009, 20:31
Morgan's M-JPEG codec has never worked properly on one of my PC's, and their support is non-existent.

I think JPEG 2000 is slower.

Cheers,
David.

burfadel
22nd April 2009, 08:46
Jpeg 2000 would be slower, its wavelet based :) (a primitive form, but it is still images and is still supposedly twice as efficient as Jpeg)

Esurnir
22nd April 2009, 13:24
Jpeg 2000 would be slower, its wavelet based :) (a primitive form, but it is still images and is still supposedly twice as efficient as Jpeg)

*cough*

I would prefer the term "different".

Personally I find wavelet artifacts more eyebleeding than jpeg

movmasty
5th May 2009, 12:45
i just want to record at the native resolution in as good as quality as possible, fast ! It doesn't need to be lossless. The video will probably get recompressed later.
i think that picvideo mjpg is faster than Morgan, dont know about newer mjpg codecs,

you could also try to lower the fps

easy2Bcheesy
5th May 2009, 12:51
Give this codec a go... it has multiple lossy and lossless options and is light on the CPU (assuming you have a modern dual or quad core).

http://amamaman.hp.infoseek.co.jp/english/top_e.html

A lovely piece of work, I'm surprised more people aren't raving about it. Perhaps because it costs $10 to register.

Reimar
5th May 2009, 22:24
Another vote for MJPEG. FFDShow's VFW component has a very good MJPEG encoder that I use all the time.

I'm not sure how fast it is.. If you need a really fast MJPG encoder, try Morgan MJPG. It's only $20, and does a nice job.

I admit I have not used the Morgan one myself, but MJPEG always seemed really slow to me.
Isn't plain MPEG-4 good enough? With FFmpeg's encoder and -qscale 2 -mbd 0 I got 120 fps encoding with a old single-core Athlon64 for DVD resolution, and you should be able to use multiple threads to take advantage of multi-core.
With the right options and a newer CPU I expect x264 can beat it, but I don't know the right options and it you risk problems in combination with AVI.

Blue_MiSfit
6th May 2009, 01:14
that's MPEG-4 though... and libavcodec's MPEG-4 isn't very good. Not even close to Xvid last time I checked.

My suggestion for MJPG or x264 remains :)

AMT looks very interesting too!

~MiSfit

Reimar
6th May 2009, 08:24
that's MPEG-4 though... and libavcodec's MPEG-4 isn't very good. Not even close to Xvid last time I checked.


I suspect you have used the default options, lavc MPEG-4 should be tunable enough to get (almost) the same quality per bitrate. Anyway, there is (almost) no quality difference with -qscale mode and I assumed bitrate does not matter (-mbd 0 is for realtime encoding, very fast but compression is bad - not going to be worse than MJPEG though IMO).