Originally Posted by Licaon
ok, so what multiplatform lossless codec should i use? (that has such good performance too)
If you need a standardised solution, H.264 Predictive lossless coding is probably the best choice, an alternative is FFmpeg's lossless codec, FFV1 which is known to have a good speed/size tradeoff. Both codecs can be decoded by libavcodec (meaning they should be available on every platform I can think of), and both should have significantly better compression than bz2 for real videos (as compared to white noise).
As you found out, both are not supported by VDPAU.
If you need VDPAU support, you could use x264 or libavcodec's MPEG-2 encoder with a constant quantiser of 2 which means significantly smaller files with minimal quality loss.