Unable to play videos on LÖVE

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.
User avatar
DiegoG
Prole
Posts: 20
Joined: Sat Apr 29, 2017 2:43 am
Location: Venezuela

Unable to play videos on LÖVE

Post by DiegoG »

It's a general problem, they won't play in example_test.love (I assume you all know what that is) and in most projects (made by other people) they either don't play at all (like in example_test.love) or play REALLY bugged
I don't know if this is a hardware problem or not, but here's my dxdiag just in case:
Untitled1.png
Untitled1.png (27.9 KiB) Viewed 7613 times
Untitled.png
Untitled.png (21.78 KiB) Viewed 7613 times
function earth:destroy()
00count=5000
00while count>0 do
0000lg.draw(explosion,math.random(0,600),math.random(0,800))
0000count=count-1
00end
00earth = nil
00print("Earth has been destroyed.")
end
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Unable to play videos on LÖVE

Post by raidho36 »

You're probably missing codecs these videos use.
User avatar
DiegoG
Prole
Posts: 20
Joined: Sat Apr 29, 2017 2:43 am
Location: Venezuela

Re: Unable to play videos on LÖVE

Post by DiegoG »

raidho36 wrote: Thu May 25, 2017 6:47 pm You're probably missing codecs these videos use.
What do you mean?
function earth:destroy()
00count=5000
00while count>0 do
0000lg.draw(explosion,math.random(0,600),math.random(0,800))
0000count=count-1
00end
00earth = nil
00print("Earth has been destroyed.")
end
User avatar
zorg
Party member
Posts: 3446
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Unable to play videos on LÖVE

Post by zorg »

It's the difference between png and jpg images; it's the difference between lua and c code (kinda); it's the difference between mp3 and ogg.
Codecs or coders and decoders are libraries that enable programs to understand/parse files, and make them into a form "fit for human consumption" :3, or in other words, codecs are needed to make files work, in general.

Different files need different codecs, and there are tons of them; most you won't find on your system by default, nor can you get through windows update...

That said, it might still be an issue with you using an HP laptop, but if it's a codec issue, maybe installing one of the packs might work for you (Like the Combined Community Codec Pack... or download VLC, that has tons of codecs, though i'm not sure if those are available for other programs to use, or not.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Unable to play videos on LÖVE

Post by raidho36 »

To decode a specific file coding you need a matching decoder. Obviously. And your system doesn't have one, so a file cannot be decoded. You need to install appropriate video codecs.
User avatar
DiegoG
Prole
Posts: 20
Joined: Sat Apr 29, 2017 2:43 am
Location: Venezuela

Re: Unable to play videos on LÖVE

Post by DiegoG »

zorg wrote: Thu May 25, 2017 7:37 pm It's the difference between png and jpg images; it's the difference between lua and c code (kinda); it's the difference between mp3 and ogg.
Codecs or coders and decoders are libraries that enable programs to understand/parse files, and make them into a form "fit for human consumption" :3, or in other words, codecs are needed to make files work, in general.

Different files need different codecs, and there are tons of them; most you won't find on your system by default, nor can you get through windows update...

That said, it might still be an issue with you using an HP laptop, but if it's a codec issue, maybe installing one of the packs might work for you (Like the Combined Community Codec Pack... or download VLC, that has tons of codecs, though i'm not sure if those are available for other programs to use, or not.
I downloaded and installed CCCP and there's no change, I also already had VLC installed
Also, if it was actually the codecs, wouldn't LÖVE have them either built-in or have them installed when you install the environment?
function earth:destroy()
00count=5000
00while count>0 do
0000lg.draw(explosion,math.random(0,600),math.random(0,800))
0000count=count-1
00end
00earth = nil
00print("Earth has been destroyed.")
end
User avatar
raidho36
Party member
Posts: 2063
Joined: Mon Jun 17, 2013 12:00 pm

Re: Unable to play videos on LÖVE

Post by raidho36 »

Why would it? Users can use any type of video in the game, and codecs are countless. So it is game's responsibility to provide necessary software to play back it's own content.
User avatar
slime
Solid Snayke
Posts: 3142
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Unable to play videos on LÖVE

Post by slime »

love.video uses the Ogg Theora format for video playback. love comes bundled with the necessary libraries for decoding Theora videos.

When you say they play 'really bugged', what does it look like (does a screenshot accurately show what it looks like)?
User avatar
DiegoG
Prole
Posts: 20
Joined: Sat Apr 29, 2017 2:43 am
Location: Venezuela

Re: Unable to play videos on LÖVE

Post by DiegoG »

slime wrote: Fri May 26, 2017 3:10 am love.video uses the Ogg Theora format for video playback. love comes bundled with the necessary libraries for decoding Theora videos.

When you say they play 'really bugged', what does it look like (does a screenshot accurately show what it looks like)?
Thanks for clearing that up; and I can't quite show you a screenshot because it's, well, a video. I'll try to make you a .gif
Anyway; it looks like a compressed 128p video, the sound is not only laggy but cut off; and the video sort of finishes before time while the sound keeps playing.
function earth:destroy()
00count=5000
00while count>0 do
0000lg.draw(explosion,math.random(0,600),math.random(0,800))
0000count=count-1
00end
00earth = nil
00print("Earth has been destroyed.")
end
User avatar
slime
Solid Snayke
Posts: 3142
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Unable to play videos on LÖVE

Post by slime »

What's your CPU usage like (via the Task Manager or similar) while playing the video? What's the resolution and requested framerate (the frame rate that the video is supposed to be playing back at)? It sounds like the video and audio decoding might be doing too much work for your CPU to handle.
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests