mjpeg player

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: mjpeg player

Post by T-Bone »

But you're only starting one new thread, which does mostly all the work. So the performance obviously won't increase much. Start something like 4 threads that simultaniously render different frames to the buffer, then you'll get seriously improved performance.
User avatar
slime
Solid Snayke
Posts: 3162
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: mjpeg player

Post by slime »

Just be very mindful of thread safety if you ever re-use ImageData - it's possible to have ImageData:mapPixel be working on a different thread while love.graphics.newImage is copying the ImageData from RAM to VRAM at the same time, garbling the resulting graphics image.
User avatar
RedHot
Citizen
Posts: 87
Joined: Mon May 27, 2013 2:43 pm
Location: Poland

Re: mjpeg player

Post by RedHot »

Use Love JIT, use shaders when available. There you go.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: mjpeg player

Post by T-Bone »

I don't see any problem doing a multithreaded approach here. Doing calculations on the GPU is good generally, but I think the heaviest part of calculations come from parsing the images, and that's certainly easier to do with LÖVEs standard functions. With 4 cores, getting 80 FPS even for a decently high res video should be possible (since I get around 20 FPS single core).
jjmafiae
Party member
Posts: 1331
Joined: Tue Jul 24, 2012 8:22 am

Re: mjpeg player

Post by jjmafiae »

can i use this in my commercial project if i credit you?

good job :3

also how do i convert my files into mjpeg files?
DancingPenguin
Prole
Posts: 1
Joined: Sun May 26, 2013 12:39 am

Re: mjpeg player

Post by DancingPenguin »

jjmafiae wrote:can i use this in my commercial project if i credit you?
I wonder the same, what license is this using?
Kind of in a hurry, got a deadline for a gamejam at the end of the month.
But honestly, video in LÖVE. This is the day of glory.
Great job!
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: mjpeg player

Post by T-Bone »

jjmafiae wrote:can i use this in my commercial project if i credit you?

good job :3

also how do i convert my files into mjpeg files?
VLC can convert more or less any video to mjpeg + ogg.
utunnels
Citizen
Posts: 75
Joined: Fri Jan 06, 2012 5:20 pm

Re: mjpeg player

Post by utunnels »

DancingPenguin wrote:
jjmafiae wrote:can i use this in my commercial project if i credit you?
I wonder the same, what license is this using?
Kind of in a hurry, got a deadline for a gamejam at the end of the month.
But honestly, video in LÖVE. This is the day of glory.
Great job!
Hmm, I'm not sure about license thing. It is not so much work actually. So you can just treat it as a free example code. No credits is required.
:ultraglee:
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: mjpeg player

Post by Roland_Yonaba »

utunnels wrote:Hmm, I'm not sure about license thing. It is not so much work actually. So you can just treat it as a free example code. No credits is required.
:ultraglee:
Git it, dude. Git it.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: mjpeg player

Post by Robin »

If you really don't want credits or anything like that, I suggest you waive your rights with CC0, and clearly state that near the download link to the library. That way, it's clear to everyone it's free to use in any way they like without having to credit you.
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Amazon [Bot] and 2 guests