Markkos

Hello, i'm writting a directshow application that gets frames from a survillance ip-camera at 30 fps, I'm trying to write that stream of images ,through a custom source filter, in an AVI and at the same time, to encode them in an MPEG2, for example. Is it possible to write the file and encode at the same time

Thank you.


Re: DirectShow Development Possible to encode at 30 fps?

Thore Karlsen

Yes, that's perfectly possible. 30fps shouldn't be a problem unless you have a really slow computer, a slow encoder, or you're working with very high resolutions. I assume the frames from the camera are JPEG frames If you try to write uncompressed frames to an AVI file you might run into problems writing all that data to disk.





Re: DirectShow Development Possible to encode at 30 fps?

Markkos

Yeah, actually I'm getting a stream of MJPEG that I parse and then I get stream of JPEGS, which I convert to BMP . So I wanto to push this bmp's in the graph and write them in a compressed AVI in some compression format.




Re: DirectShow Development Possible to encode at 30 fps?

Thore Karlsen

That's all perfectly doable. I do the exact same thing, and on modern systems you can do very high framerates if you have an efficient JPEG decompressors and an efficient compressor. Another option is to just write the JPEGs directly into the AVI without recompressing them, but that depends on what your needs are.





Re: DirectShow Development Possible to encode at 30 fps?

Markkos

Well, the decision of getting the bmp's from the parsed jpeg's is because I'm getting the bmp's from a picturebox of a windows form, which forces me to use the common language runtime, so I had to extract the headers and picture bytes from the image of the picturebox, yeah, i sounds really complicated. Wink