Page 2 of 3

Re: mjpeg player

Posted: Tue Jun 25, 2013 6:00 am
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.

Re: mjpeg player

Posted: Tue Jun 25, 2013 6:14 am
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.

Re: mjpeg player

Posted: Tue Jun 25, 2013 2:51 pm
by RedHot
Use Love JIT, use shaders when available. There you go.

Re: mjpeg player

Posted: Tue Jun 25, 2013 3:06 pm
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).

Re: mjpeg player

Posted: Tue Jun 25, 2013 4:48 pm
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?

Re: mjpeg player

Posted: Tue Jul 09, 2013 12:24 am
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!

Re: mjpeg player

Posted: Tue Jul 09, 2013 6:48 am
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.

Re: mjpeg player

Posted: Tue Jul 09, 2013 7:04 am
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:

Re: mjpeg player

Posted: Tue Jul 09, 2013 8:15 am
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.

Re: mjpeg player

Posted: Tue Jul 09, 2013 10:00 am
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.