Movie playback speed

Blitz3D Forums/Blitz3D Programming/Movie playback speed

chaos51(Posted 2012) [#1]
Hi,

I think I know the answer, but I thought I better double check first.

Can you control the playback speed of the movie? I am making an application where this is critical, and I am wondering if I can do it in Blitz (I prefer to do so since I really like Blitz3d).

If the answer is no. Then, is it possible to get somehow access to the DirectX surface, and draw on it from an external DLL?
(last time I asked it was not, but things might have changed since then..)

Thanks
Regards
C51


Kryzon(Posted 2012) [#2]
If it's not a .GIF file then you can't control the speed. AVI and MPEG play automatically.

Trying to hook the DirectX context to obtain control of the [obscure] video support will most likely be a daunting task.

-> You're better off converting your material to a sequence of JPEG images, loading them all as frames of a single AnimImage and then playing them in sequence as you want.


chaos51(Posted 2012) [#3]
Thanks.

That would be an options, allthough quite a daunting/impossible task. This is because I am talking about half an hour of footage or so, in 800x600 minimal resulution.

It could not fit possibly in memory as the nr of image would just be too big, so it would have to be loaded on the fly. I think that will just kill my framerate... Allthrough no harm doing some experiments with the idea.
IF I only had direct access to the direct x buffer once more, then I could have a DLL do that, as a thread instead.

I wonder if I should consider using the blitz sdk instead, there surely you would have access directly to the directx surfaces? Does anyone know, or should I repost this question on that forum instead....

-C51


Kryzon(Posted 2012) [#4]
Unfortunately the SDK won't enable you to access the internals.
Have you given BlitzMax a try? it natively supports threads. 'Streaming' your sequence of images - which is needed in your case - would be a viable way.

You can also convert your material to OGG and use BlitzMax's free, third-party video modules:

- TheoraPlayer (I think it's cross-platform)

- TheoraPlayer OpenAL (for Windows)

(Theora reads OGG files which are an open standard, perfect for independent developers.)