Problem with video

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.
Nutte
Prole
Posts: 32
Joined: Sat Feb 27, 2016 1:08 pm

Problem with video

Post by Nutte »

Hi!

I am new to Love, and i try to play a video. But it want play, only a love error window pop up.
I use this code:

Code: Select all

function love.load()
    video = love.graphics.newVideo("myvideo.ogv")
    video:play()
end
 
function love.draw()
    love.graphics.draw(video, 0, 0)
end
 
What i do wrong?
Attachments
Aladdintest.love
Aladdin video test .love file
(2 MiB) Downloaded 48 times
Last edited by Nutte on Sat Feb 27, 2016 3:09 pm, edited 1 time in total.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Problem with video

Post by Robin »

Could you upload the .love (so zip your main.lua with your myvideo.ogv)?
Help us help you: attach a .love.
Nutte
Prole
Posts: 32
Joined: Sat Feb 27, 2016 1:08 pm

Re: Problem with video

Post by Nutte »

Sure!
Attachments
Aladdintest.love
Aladdin video test .love file
(2 MiB) Downloaded 66 times
Nutte
Prole
Posts: 32
Joined: Sat Feb 27, 2016 1:08 pm

Re: Problem with video

Post by Nutte »

Why the video file not play?
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Problem with video

Post by Robin »

Huh, it plays fine for me. If you play the video in your standard videoplayer, does it work normally?
Help us help you: attach a .love.
Nutte
Prole
Posts: 32
Joined: Sat Feb 27, 2016 1:08 pm

Re: Problem with video

Post by Nutte »

Robin, do you run the Aladdintest.love file?
Nutte
Prole
Posts: 32
Joined: Sat Feb 27, 2016 1:08 pm

Re: Problem with video

Post by Nutte »

The videofile "myvideo.ogv" run fine in my standard videoplayer.
User avatar
pgimeno
Party member
Posts: 3548
Joined: Sun Oct 18, 2015 2:58 pm

Re: Problem with video

Post by pgimeno »

The attached .love works fine for me too. What does the error message say?
Nutte
Prole
Posts: 32
Joined: Sat Feb 27, 2016 1:08 pm

Re: Problem with video

Post by Nutte »

Its say:
error
main.lua:2: attempt to call field 'newVideo' (a nil value)

Traceback
main.lua:2 in function 'load'
[C]: in function 'xpcall'

Sorry for my bad english.
User avatar
slime
Solid Snayke
Posts: 3132
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Problem with video

Post by slime »

[wiki]love.graphics.newVideo[/wiki] was added to LÖVE in version 0.10.0, so you'll have to use the latest version (0.10.1 preferably) to make it work.


We host the LÖVE downloads using Bitbucket, but unfortunately they're having issues with some of their downloads today – I've rehosted 0.10.1 for Windows and OS X on Dropbox temporarily:
Mac OS X
Windows installer: 32 bit, 64 bit
Windows zip: 32 bit, 64 bit
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 86 guests