fast video encoding

Marcus Wanner marcusw at cox.net
Wed Jul 29 08:23:14 EDT 2009


On 7/29/2009 4:14 AM, gregorth wrote:
> Hi all,
> 
> for a scientific application I need to save a video stream to disc for
> further post processing. My cam can deliver 8bit grayscale images with
> resolution 640x480 with a framerate up to 100Hz, this is a data rate
> of 30MB/s. Writing the data uncompressed to disc hits the data
> transfer limits of my current system and creates huge files. Therefore
> I would like to use video compression, preferably fast and high
> quality to lossless encoding. Final file size is not that important.
Try googling realtime greyscale video codec...
> Because of the hardware I am bound to WinXP.
There's always a way to run linux :p
> 
> I already tried pymedia for encoding to mpeg2, however I only managed
> to get a framerate of about 30-40fps (on a 1.8GHz dual core). There is
> still room for improvements in my code, but before trying hard I want
> to ask for advices or other possibilities. I also found gstreamer with
> pygst python bindings, which seems to be more modern (and performant?)
> package than pymedia. I did not yet try it, especially since I didn't
> find a simple code example of how to use it for my use case. Can
> somebody give me a hint?
Video encoding is not my specialty, but my recommendation here is to 
drop python because of its slow speed and work in c as much as possible.
> 
> I also found huffyuv or lagarith which is provided as a directshow
> codec for Windows. Can somebody give me a hint how to use a directshow
> codec with python?
Not me, sorry :(
Never worked directly with directshow (no pun intended).
> 
> I am a novice with video encoding. I found that few codecs support
> gray scale images. Any hints to take advantage of the fact that I only
> have gray scale images?
Greyscale PNG or BMP compression.
> 
> Thanks for any help
Don't know if this counts as help, but you're welcome!
> 
> Gregor
> 
Marcus



More information about the Python-list mailing list