PDA

View Full Version : Good Codecs for PD/GEM


si1ver
29th August 2003, 05:05 AM
hi,
what are good codecs for vj loops? I'm using a mixer i've built in pd/GEM and i am struggling with codec choice. I've resigned myself to using 320x240 res clips in order to mix 3/4 layers of video at around or above 20fps (how many layers of video at 20fps should i be able to mix with 12' G4??)- but my lap top struggles when playing the clips in reverse. I presume this is something todo with temporal compression/difference frames that most video codecs utilise to reduce file size and while the codecs decompression algorithms work with minimal computational overhead when playing forwards the same is not true of clips playing in reverse- all those nasty difference frames. Do I need to make every frame a keyframe? Or should I use photo-jpeg compression, storing each frame as JPEG as suggested in the Jitter manual.
Also I was wondering if any codecs surpport alpha transparency- so a clip could be saved with areas of transparency already defined (using keying on final cut for instance) and remove the need to key live, as this is quite a big convolution to be done in realtime. I know JPEG does'nt do transparency of this kind but PNG will and quicktime provides an option for formatting video clips as a stream of PNGS but PNG is not really suited to photo realisitic content (alot of my clips are of more natural scenes). I imagine the table bassed look up of PNG files is not the easiest thing for a computer to do. Obviously decoding one 320x240 PNG file is easy, but what about doing almost 100 each second + all the other stuff.
this codec dilema has been a concern of mine for several months now and i am a firm believer that good codec choice is crucial to fluid high frame rate playback. to this end i have been expirmenting but with no definte conclusive evidence (appart from avoiding MPEG4 with it's oodles of compression). i would be grateful for any insights.

cheers tim.

HuoLong
16th September 2003, 09:11 PM
hi,

try a search like "gem codec" in the mailing list archives of PD&Co at:
http://iem.kug.ac.at/mailinglists/pd-list/

i was very happy with "MotionJPEG" codec(s) under windoze, but i'm on linux now and havnt had time to compile pd&co yet(again)...

cheers
-huolong

ps. for video under PD i would recommend PDP+PiDiP, but theyre only for linux :(
http://ydegoyon.free.fr/pidip.html

gemdev
8th November 2003, 04:48 PM
I'm using a mixer i've built in pd/GEM and i am struggling with codec choice. I've resigned myself to using 320x240 res clips in order to mix 3/4 layers of video at around or above 20fps (how many layers of video at 20fps should i be able to mix with 12' G4??)-

Hi, I am one of the developers of GEM. You should be able to play 2 720x480 DV clips on that powerbook and lots and lots of 320x240 photo-jpeg clips. I think your problem might be that you have an old version of GEM - where did you get it from? The builds from the last 6 months are about as fast as you can get video to go on a Mac and we've even built versions for the G5 that play 1080 HD just fine.

One of the critical things about real-time video is color-space. Almost every codec stores pixels in some form of YUV, but most software uses RGB for processing. GEM can use either RGB or YUV for processing, and the YUV path has lots of Altivec in it, which can give 4-10x the throughput of RGB.

Also, you can change the internal processing rate of GEM by sending a message like 'frame 60' to the gemwin. After setting this you can use the counter object to playback .movs with pix_film at any rate, yet still have smooth GL running at 60fps. On the OSX version VBL sync is enabled for tear-free display so setting the GEM render rate at the refresh rate of your display device will often give the best results.

You can find a fairly recent build of GEM here. (http://taproot.dyndns.org/~cgc/downloads/index.html)

Also, you will get a much faster response by posting questions to the pd-list (http://iem.kug.ac.at/cgi-bin/mailman/listinfo/pd-list)

A point release of GEM with lots of new goodies is coming soon, so keep an eye out for that.