[GEM-dev] GEM Linux and video codecs

Etienne Desautels titi at sat.qc.ca
Thu Jun 2 05:33:24 CEST 2005


Hi list,

I'm developing a patch in PD/Gem on Linux where I'll have to play many 
hi-res videos at the same time. I did some research to find the best 
codec with the lowest CPU usage on Linux. I found that there's not a 
lot of well optimize codecs on Linux. Patrick via Ben B. told me that 
after a lot of testing he found that MPEG2 was the best choice. After 
some testing I found mostly the same thing: MPEG2 or MPEG4 are the most 
optimize codecs on Linux. I did also some testing with different 
libraries for playback. LibMPEG2 (MPlayer is using that one for MPEG2) 
is the fastest one for MPEG2 follow by FFMPEG. In my case I'll only 
play the file from start at normal speed, so it's not a problem if the 
codec have temporal compression. Just to give you an idea, I can play a 
800x440 px, 24fps at a really good quality and using less then 15% of 
CPU on an P4 2,6GHz in MPEG2 with LibMPEG2 !

So here's my questions. I tried to compile Gem with FFMPEG support and 
it always fail in one manner or another. Or it doesn't build at all, or 
it build but when I load Gem I got this error message (undefined 
symbol: ogg_stream_init   Gem: can't load library), or everything seems 
OK but when I try to load a movie, any type, in pix_film, FFMPEG always 
say that it doesn't support this format. So I can't play MPEG2 or MPEG4 
in Gem, except with other less (very less) efficient libraries (it take 
around 50% CPU to play the same file with LibMPEG3). I did my 
compilation test on Unbuntu (Debian) and I try with the distro 
installation of FFMPEG and also with a version I compile myself (this 
one is more efficient in CPU usage). I tried with both Gem 0.90 and the 
CVS version. Same result. Could someone help me compiling Gem with a 
working FFMPEG ? I'm using PD 0.37

Also, what I would really prefer is to had support in Gem for LibMPEG2. 
Do you think it could be difficult to do ? Is it about creating a 
filmMPEG2.cpp and filmMPEG2.h files with the good function calls to the 
library and add the reference into the pix_filmNEW.cpp ?

And I would like to know what's the best container (.mov, .avi, .mpg, 
raw) to playback video in Gem.

One last thing, I was not able to use FSAA. My video card is an ATI 
9600 and I'm using the binary driver with x.org. I put the lines to 
enable FSAA in my X86-config-4 file without any success. Any ideas ?

Thanks and sorry to ask so much questions in one time.

Etienne





More information about the GEM-dev mailing list