1
\$\begingroup\$

Say I have a short video and want to play the video in a game scene, but I can't use the MovieTexture for whatever reason. Is it technically possible and feasible to dynamically load images (in a flip book fashion) in order to emulate a video being played in a scene?

\$\endgroup\$
  • \$\begingroup\$ In what language? I think I've seen something like this in some Away3D demo. \$\endgroup\$ – Markus von Broady Oct 1 '12 at 7:58
  • \$\begingroup\$ How long is the video? Framerate? \$\endgroup\$ – Marco Martinelli Oct 1 '12 at 8:26
1
\$\begingroup\$

It is possible, the limitation is not in the software. Depends on the resolution of the video and the total amount of frames, it could use a lot of memory. The reason a video is not saved as collection of jpeg's or png's is compression.Raw video data in a resolution of 512 x 512 and a frame rate of 10fp that lasts about one minute would take about:

3 bytes * (512 * 512)res * 10 fps * 60 seconds = 500 MB

That does not sound like a reasonable way to handle it.

If you had only 3 seconds of 256 x 256 a the same rate, it would still take around 5 MB so I would only use it as a workaround in cases where I felt it was necessary.

Once the raw data is in memory, it is possible to display it as a texture.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.