PDA

View Full Version : Serve Frames as Images


csp
3rd November 2005, 06:51
Is there a way to serve single frames as images? BMP format would be ok, but it could also be PNG, JPG, PCX or TGA.
I need to access single frames, like with "Trim 100,100", but I don't want to open an Avi in the client App (blitz3D) for some reason.

I also tried ImageWriter, but I think it's pretty slow to write/read every frame. It would still be some kind of worst case solution. But it should work with all Avi Sources, not only 24 Bit RGB. I tried the EBMP format that works with all color spaces. When I rename it to BMP then I can load it in the client app, but the colors are messed up somehow. Is there a way to convert the Avi source to RGB24 on the fly to make it work with ImageWriter? (I tried ConvertToRGB24(clip) right after the Source command, without success).

Well a real Image server would be real useful, without to write/read it from the harddrive.

Thanks for your help.

foxyshadis
3rd November 2005, 07:03
Are you sure you tried clip=Converttorgb24(clip)?

The best way to be sure (and most efficient) would be to chain it to the ImageWriter.

avisource("...")
#filtering
trim(100,100).converttorgb24().Imagewriter()

That'll write the one frame you want in rgb. I'm sure someone has a better solution, that's just off the top of my head.

Richard Berg
3rd November 2005, 07:31
You'd probably need to write a blitz3D plugin in order to build a real frameserver.

I tried the EBMP format that works with all color spaces. When I rename it to BMP then I can load it in the client app, but the colors are messed up somehow.
EBMP writes raw frame data. If your source clip is YV12 or YUY2, no image program I know of will read it correctly.

Mug Funky
3rd November 2005, 08:27
hmm. blackmagic have a way of reading a 2vuy mov file as an image sequence in photoshop, and on saving images it writes them directly to the mov. but that's mac only and requires the use of a massive uncompressed video file. it's a good idea though.

there's a program for avisynth i think called "LBkiller" that you might be interested in. it may have changed it's name, but a forum search should uncover it.

csp
3rd November 2005, 22:48
Maybe LBKiller can do the job, when used with the commandline, I got to try this.

The reason why I don't want to use ImageWriter is: I have to open the Avi in Blitz3D no matter what, to execute the AVS at all. Blitz3D can play movies using DirectShow. So I don't need to use Imagewriter since I already got that Frame in blitz3d anyway, as an Avi Frame. The problem with movies in Bitz3d is A: it takes some time, about 2 to 3 seconds to access a single frame out of a huffyuff encoded MiniDV Pal sized Avi. I need something faster. B: Blitz3D has a bug, each time I open a movie, it's losing ram, there is a video memory leak. Blitz3D is a win32 compiler with a nice DX7 3D command set, but if the maker of Blitz3D won't fix this bug, I'm doomed. That's why I try to work around this problem. If Avisynth could serve a simple bmp, instead of the Avi stream, that would be great.
I'm working on a Special FX tool for mixing 3D FX and Movie layers. I used MCIsendString, but it's absolutely unreliable.

Well thanks for your help.