LoveVideo - LÖVE module for playing video

Showcase your libraries, tools and other projects that help your fellow love users.
jjmafiae
Party member
Posts: 1333
Joined: Tue Jul 24, 2012 8:22 am

Re: LoveVideo - LÖVE module for playing video

Post by jjmafiae » Tue Oct 07, 2014 1:31 pm

bartbes wrote:
slime wrote: Causing a real love.video to break when this one is used is an odd way to encourage me. :P
I don't know, you do love breaking things.
Ouch, shots fired.

User avatar
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

Post by josefnpat » Tue Oct 07, 2014 1:46 pm

slime wrote:
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
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.
Haha, sorry, the previous examples in this thread are totally bogus;

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
So s/love\.video/not_love_video/gc?
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
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.
bartbes wrote:
slime wrote: Causing a real love.video to break when this one is used is an odd way to encourage me. :P
I don't know, you do love breaking things.
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.
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
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.
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

User avatar
Shell32
Prole
Posts: 6
Joined: Wed Jun 26, 2013 12:24 am
Location: Bebedouro, Brazil
Contact:

Re: LoveVideo - LÖVE module for playing video

Post by Shell32 » Tue Oct 07, 2014 3:41 pm

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.
Heres my version of lovevideo:
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..

User avatar
slime
Solid Snayke
Posts: 2869
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: LoveVideo - LÖVE module for playing video

Post by slime » Tue Oct 07, 2014 4:04 pm

josefnpat wrote:It's not actually in love's namespace, it's just put there in the examples.
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. :/

davisdude
Party member
Posts: 1154
Joined: Sun Apr 28, 2013 3:29 am
Location: North Carolina

Re: LoveVideo - LÖVE module for playing video

Post by davisdude » Tue Oct 07, 2014 10:13 pm

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

User avatar
Zilarrezko
Party member
Posts: 345
Joined: Mon Dec 10, 2012 5:50 am
Location: Oregon

Re: LoveVideo - LÖVE module for playing video

Post by Zilarrezko » Wed Oct 08, 2014 12:14 am

iphone 7 confirmed.

User avatar
slime
Solid Snayke
Posts: 2869
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: LoveVideo - LÖVE module for playing video

Post by slime » Wed Oct 08, 2014 1:30 am

josefnpat wrote:I'd be happy to change the example if a love.video emerges
Like this? (note the commit dates): https://bitbucket.org/bartbes/love-expe ... deo.theora :P

jjmafiae
Party member
Posts: 1333
Joined: Tue Jul 24, 2012 8:22 am

Re: LoveVideo - LÖVE module for playing video

Post by jjmafiae » Wed Oct 08, 2014 5:32 am

Zilarrezko wrote:iphone 7 confirmed.
now with 30% more bend.

User avatar
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

Post by josefnpat » Wed Oct 08, 2014 1:07 pm

slime wrote:
josefnpat wrote:I'd be happy to change the example if a love.video emerges
Like this? (note the commit dates): https://bitbucket.org/bartbes/love-expe ... deo.theora :P
Woooo! Didn't even see this until today!
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

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests