Ways around No Video Playback

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Andynonomous
Prole
Posts: 13
Joined: Sat Sep 20, 2014 7:42 pm
Location: Ottawa Canada

Ways around No Video Playback

Post 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!
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Ways around No Video Playback

Post 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
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
User avatar
Andynonomous
Prole
Posts: 13
Joined: Sat Sep 20, 2014 7:42 pm
Location: Ottawa Canada

Re: Ways around No Video Playback

Post 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!
User avatar
josefnpat
Inner party member
Posts: 955
Joined: Wed Oct 05, 2011 1:36 am
Location: your basement
Contact:

Re: Ways around No Video Playback

Post 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.
Missing Sentinel Software | Twitter

FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
User avatar
Andynonomous
Prole
Posts: 13
Joined: Sat Sep 20, 2014 7:42 pm
Location: Ottawa Canada

Re: Ways around No Video Playback

Post 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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 4 guests