Page 1 of 1

Ways around No Video Playback

Posted: Mon Feb 16, 2015 1:05 am
by Andynonomous
Hi there,

So I spent a bunch of time in blender making myself a cool splash screen with a company logo, but then I guess lua can't do video playback. I wanted to talk about the methods I'm considering to get around this and hopefully get some advice about which is the best way to go.

Loading individual PNG's
I thought about doing this but it seems like a lot of loading to do considering my video is almost 480 frames. If I do go this route I was thinking I'd load 24 frames at a time and then release them as they play so that I don't have to load all 480 images. Is this viable? Will the loading speed keep up with the playback speed?

Calling out to C to do the work
Would it be possible to load and play a video by calling out to C with lua? I know C doesn't allow playback explicitly, but if I got some library that allows video playback are there major obstacles to running that C code from within lua? I can see complications with this because C wouldn't be outputting the video to the window LOVE has created for me, maybe it isn't a viable plan.

Any other way around this
I love lua and I want to program games with it, but I also want my cool splash screen plus the ability to create cut scenes. If anybody has any ways around this problem other than the approaches I mentioned above that'd be great. Thanks in advance folks!

Re: Ways around No Video Playback

Posted: Mon Feb 16, 2015 1:46 am
by josefnpat
I do a very optimized version of loading individual png's as dds files with montaging.

Take a look at the thread here: viewtopic.php?f=5&t=78830

Re: Ways around No Video Playback

Posted: Thu Feb 19, 2015 10:24 pm
by Andynonomous
Thanks a lot for this! I'm trying to adapt it for my video and I worked past a few initial bugs, and now it plays the sound and runs, but I don't see any video. Question, is there a maximum size for the frames because mine are 1920x1080. Also, what do the rows and columns numbers mean in info.lua and how do I know what they should be set at?
Thanks!

Re: Ways around No Video Playback

Posted: Fri Feb 20, 2015 5:40 pm
by josefnpat
Andynonomous wrote:Thanks a lot for this! I'm trying to adapt it for my video and I worked past a few initial bugs, and now it plays the sound and runs, but I don't see any video.
If you find any bugs, please post them in the issue tracker here: https://github.com/josefnpat/LoveVideo/issues
Andynonomous wrote:Question, is there a maximum size for the frames because mine are 1920x1080.
Depends on your hardware. You'll have to figure out your texture max, otherwise it shouldn't be a problem. If you post a .love, I can probably help you.
Andynonomous wrote:Also, what do the rows and columns numbers mean in info.lua and how do I know what they should be set at?
Those are for montaged images. If you have one frame per image, use 1 row & 1 column.

Re: Ways around No Video Playback

Posted: Thu Feb 26, 2015 5:53 am
by Andynonomous
Thanks again!

I see some video now so I made progress once I fixed the row and column values. Now however it doesn't seem to be playing all the frames. I'm only seeing about a second of it before it goes black. I'll post a .love but for some reason I can't create them properly with my laptop (they stubbornly remain zip files) so Ill have to do it from home tomorrow.