Ouch, shots fired.bartbes wrote:I don't know, you do love breaking things.slime wrote: Causing a real love.video to break when this one is used is an odd way to encourage me.
LoveVideo - LÖVE module for playing video
Re: LoveVideo - LÖVE module for playing video
- josefnpat
- Inner party member
- Posts: 955
- Joined: Wed Oct 05, 2011 1:36 am
- Location: your basement
- Contact:
Re: LoveVideo - LÖVE module for playing video
Haha, sorry, the previous examples in this thread are totally bogus;slime wrote:You should update the code to make it use something other than love's namespace – it's bad practice in general to do that, plus if/when a real love.video module gets added to LÖVE then any code that overwrites love.video for its own purposes (such as the above snippet) will cause the real love.video to break horribly.josefnpat wrote:Code: Select all
cool_joe = love.video.newVideo('cool_joe') function love.graphics.draw() love.video.draw( cool_joe ) drawFractal() -- Draw a crazy fractal on top of your video! end
It's not actually in love's namespace, it's just put there in the examples. Here is an example from the readme.md;
Code: Select all
LoveVideo = require "LoveVideo.lovevideo"
bunny = LoveVideo.newVideo("big_buck_bunny")
function love.draw()
bunny:draw(0,0,
love.graphics.getWidth()/bunny:getWidth(), -- x scale
love.graphics.getHeight()/bunny:getHeight() -- y scale
)
end
function love.update(dt)
bunny:update(dt)
end
Honestly, just the example is kind of a joke; I think we should have a video decoder in love. While many may see it as superfluous and useless, it does hamper creativity in some ways. I saw PewDiePie playing the game Roundabout, and I realized that while the example is very silly, it's a very good example of storytelling by cutscenes. I'd be happy to change the example if a love.video emerges in the 0.10+ branch! I by no means want to create a library that would screw with the blessed' namespace.Zilarrezko wrote:Maybe it's a hint that he wants you to implement his library, slime. :awesome:
Cool stuff though, I wish I had the brain capacity to use magic and threads like that. :o
Breaking things is what FOSS is all about! I suppose this module is a challenge for the love team to make love.video a real decoder.bartbes wrote:I don't know, you do love breaking things.slime wrote: Causing a real love.video to break when this one is used is an odd way to encourage me. :P
That's fantastic! Did you find any part of the API lacking? I was hoping someone would make a video player like thing out of this.Shell32 wrote:https://www.youtube.com/watch?v=9sG6eBYT_Ts
My video conversion went bad when I sent it in youtube, btw the second video playing is 1280x720
Last edited by josefnpat on Wed Oct 08, 2014 1:06 pm, edited 1 time in total.
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
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
Re: LoveVideo - LÖVE module for playing video
Heres my version of lovevideo:josefnpat wrote: That's fantastic! Did you find any part of the API lacking? I was hoping someone would make a video player like thing out of this.
http://hastebin.com/xazuxobidu.lua
And the thread thing:
http://hastebin.com/otewulasog.coffee
I refactored your code and did other stuff (out of standard), I added a setSpeed (setPlaybackSpeed), and made your thing to call a function in audio object audio.onDone(), so I can know that the video finished and has stopped, otherwise I need to keep checking isDone everytime.
I optimized some stuff, I really don't remember which, both in thread and loveaudio..
- slime
- Solid Snayke
- Posts: 3166
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: LoveVideo - LÖVE module for playing video
I know. That doesn't make it any better... all of the example code in this thread and on the Github repository will eventually make LÖVE break. :/josefnpat wrote:It's not actually in love's namespace, it's just put there in the examples.
Re: LoveVideo - LÖVE module for playing video
love.video confirmed!
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
- Zilarrezko
- Party member
- Posts: 345
- Joined: Mon Dec 10, 2012 5:50 am
- Location: Oregon
Re: LoveVideo - LÖVE module for playing video
iphone 7 confirmed.
- slime
- Solid Snayke
- Posts: 3166
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: LoveVideo - LÖVE module for playing video
Like this? (note the commit dates): https://bitbucket.org/bartbes/love-expe ... deo.theorajosefnpat wrote:I'd be happy to change the example if a love.video emerges
Re: LoveVideo - LÖVE module for playing video
now with 30% more bend.Zilarrezko wrote:iphone 7 confirmed.
- josefnpat
- Inner party member
- Posts: 955
- Joined: Wed Oct 05, 2011 1:36 am
- Location: your basement
- Contact:
Re: LoveVideo - LÖVE module for playing video
Woooo! Didn't even see this until today!slime wrote:Like this? (note the commit dates): https://bitbucket.org/bartbes/love-expe ... deo.theora :Pjosefnpat wrote:I'd be happy to change the example if a love.video emerges
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
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
Who is online
Users browsing this forum: No registered users and 2 guests