546 posts
Location
Wageningen, The Netherlands
Posted 03 May 2015 - 12:51 PM
[media]
http://www.youtube.com/watch?v=aDWMpTl4qpw[/media]
This is a full music video playing in ComputerCraft.
Download:
http://www.mediafire...1eaczwnd4n/demoI've sped the Minecraft footage up 2.5 times and I've put the music behind it.
The demo will run at 20fps on a normal screen and at 10fps or more on a 0.5 scale 8x6 block Advanced Monitor (184x81 pixels).
The renderer is powered by the Surface API 1.5.3.
It's 30.7 MB, so I couldn't upload it to Pastebin.
To run this demo, you must first set the maximum drive space to at least 33 MB in the file %appdata%\.minecraft\config\ComputerCraft.cfg:
I:computerSpaceLimit=100000000
Then simple copy and paste the file into your ComputerCraft computer folder and run the file.
Move Your Feet original music video:
https://www.youtube....h?v=R54ndOpLYIc
Edited on 03 May 2015 - 08:49 PM
797 posts
Posted 03 May 2015 - 01:22 PM
This is by far the coolest thing I've seen done in CC. I mean Bomb Bloke's GIF renderer was awesome, but this has music with it! You've turned a video you liked (judging by your YouTube channel) into a video that can be played with no lag inside CC. Awesome!
546 posts
Location
Wageningen, The Netherlands
Posted 03 May 2015 - 01:26 PM
This is by far the coolest thing I've seen done in CC. I mean Bomb Bloke's GIF renderer was awesome, but this has music with it! You've turned a video you liked (judging by your YouTube channel) into a video that can be played with no lag inside CC. Awesome!
This doesn't have music with it, I put it on the YouTube video.
But thanks nevertheless!
It's really fun to test the boundaries of ComputerCraft.
7083 posts
Location
Tasmania (AU)
Posted 04 May 2015 - 01:16 AM
That, plus the difference in frame-rate between the actual game and this video is also quite notable.
You could probably speed it up a bit by pre-calculating all your px/pys, and placing them in a table prior to doing the actual animation. No point in repeating the same mathematical operations for every single frame.
Still, this is very, very impressive! You've got it synced beautifully! That video's going in my archive. :)/>
By the way, what was your method of capturing the video data? Anything to do with
this?
546 posts
Location
Wageningen, The Netherlands
Posted 04 May 2015 - 07:47 AM
That, plus the difference in frame-rate between the actual game and this video is also quite notable.
You could probably speed it up a bit by pre-calculating all your px/pys, and placing them in a table prior to doing the actual animation. No point in repeating the same mathematical operations for every single frame.
Still, this is very, very impressive! You've got it synced beautifully! That video's going in my archive. :)/>/>/>
By the way, what was your method of capturing the video data? Anything to do with
this?
Thanks for the feedback! :D/>
I used a video to JPG converter and then I ran my own converter which I made in C#.
The color algorithms were copied from my RGB API.
Maybe I'll make a video player in the future.
Edited on 04 May 2015 - 05:51 AM
2679 posts
Location
You will never find me, muhahahahahaha
Posted 04 May 2015 - 10:26 AM
Wow, this is truly amazing. Here get a +1. Pushing CC to the limits
7083 posts
Location
Tasmania (AU)
Posted 04 May 2015 - 12:55 PM
So I thought to myself, "I wonder if that could be downloaded onto a CC computer without adjusting the config?", and tried converting the video to a GIF.
Still a meg and a half, but
here it is, if you're interested.
524 posts
Location
Cambridge, England
Posted 05 May 2015 - 11:43 PM
This is my new favourite thing!
70 posts
Posted 06 May 2015 - 12:11 PM
Wow. Very cool, but can't read the code. Sublime Text and Notepad++ crash on load :D/>
How long had you worked on it? :D/>
2679 posts
Location
You will never find me, muhahahahahaha
Posted 06 May 2015 - 10:38 PM
When I run it, the PC shutsdown. Sublime text fails to load it.
7083 posts
Location
Tasmania (AU)
Posted 07 May 2015 - 03:01 AM
What command are you using to run it, what sort of computer are you running it on, and what version of ComputerCraft are you using?
546 posts
Location
Wageningen, The Netherlands
Posted 09 May 2015 - 07:20 PM
Wow, this is truly amazing. Here get a +1. Pushing CC to the limits
Thanks!
I had a lot of fun making it.
So I thought to myself, "I wonder if that could be downloaded onto a CC computer without adjusting the config?", and tried converting the video to a GIF.
Still a meg and a half, but
here it is, if you're interested.
That is very impressive!
It's cool to see that you can make GIFs from minute long videos.
This is my new favourite thing!
Thanks!
I would like to thank you for making ComputerCraft.
I think it's the best mod ever made (and I've played a lot of them).
I have a lot of fun making programs and interacting with the community,
and that, of course, wouldn't be possible without you.
546 posts
Location
Wageningen, The Netherlands
Posted 09 May 2015 - 07:28 PM
Wow. Very cool, but can't read the code. Sublime Text and Notepad++ crash on load :D/>
How long had you worked on it? :D/>
Thanks!
I worked on it for about 4 hours.
The first hour was spent on downloading the video and converting it to around 5000 JPGs.
The second hour was spent on writing my own converter which takes JPGs, downscales them,
converts them to ComputerCraft colors and then saves them to a file.
The last two hours were spent on writing, testing and optimizing the player.
I mostly tested it on a 8x6 block 0.5 scale monitor with 164x81 pixels, which really tests the limits of ComputerCraft and my scaling algorithms.
Loading the file in Notepad++ seems to work but it only responds every 10 seconds xD
When I run it, the PC shutsdown. Sublime text fails to load it.
This program is really demanding and maybe ComputerCraft can't handle it on your system.
It is also around 30.7 MB so it will most likely not load on Sublime text or Notepad++.
147 posts
Location
My Computer
Posted 12 May 2015 - 11:39 AM
So theoretically you could do this with any music video, no matter how pixelated?
546 posts
Location
Wageningen, The Netherlands
Posted 12 May 2015 - 12:25 PM
So theoretically you could do this with any music video, no matter how pixelated?
Yes.
3790 posts
Location
Lincoln, Nebraska
Posted 12 May 2015 - 03:18 PM
This is great! I love the conversion you've done. Though I see a few color gradient issues, it's near perfect. Seems like some of the areas between different colors are a bit overprocessed, and it kind of blurs the difference between the colors. But other than that, I'm amazed at this!
Sorry, I seem to point out the itty bitty things that aren't absolutely perfect, but most people wouldn't notice.
546 posts
Location
Wageningen, The Netherlands
Posted 12 May 2015 - 03:40 PM
This is great! I love the conversion you've done. Though I see a few color gradient issues, it's near perfect. Seems like some of the areas between different colors are a bit overprocessed, and it kind of blurs the difference between the colors. But other than that, I'm amazed at this!
Sorry, I seem to point out the itty bitty things that aren't absolutely perfect, but most people wouldn't notice.
Thanks!
No need to apologize, I know too that it isn't perfect.
I used a video to jpg converter which compresses things a little so there are small artifacts around borders.
And the gradient issues are caused by the algorithm that converts RGB colors to CC colors , which basically checks for the lowest distance between CC colors in RGB and the RGB color in 3d space.
Edited on 12 May 2015 - 01:41 PM
3790 posts
Location
Lincoln, Nebraska
Posted 12 May 2015 - 03:46 PM
Ah, I thought that might be the case. Otherwise, it's rather impressive. I tried to get a copy of the song's midi file, so I can make it into a noteblock song, but nothing seems to work, due to the fact that the tempo won't fit within Minecraft's tick limit.
546 posts
Location
Wageningen, The Netherlands
Posted 12 May 2015 - 05:26 PM
Ah, I thought that might be the case. Otherwise, it's rather impressive. I tried to get a copy of the song's midi file, so I can make it into a noteblock song, but nothing seems to work, due to the fact that the tempo won't fit within Minecraft's tick limit.
Yeah the tick limit is really limiting if you want to make music.
It would be awesome to have this song play in CC :D/>
3790 posts
Location
Lincoln, Nebraska
Posted 12 May 2015 - 08:46 PM
Yeah, when I tried importing the music, I kept getting a tickrate of 7.5 t/s, which is just outside of the range that Minecraft can do, which is 5, 10, or if you use Note, 6.66
546 posts
Location
Wageningen, The Netherlands
Posted 12 May 2015 - 08:49 PM
Yeah, when I tried importing the music, I kept getting a tickrate of 7.5 t/s, which is just outside of the range that Minecraft can do, which is 5, 10, or if you use Note, 6.66
So it can either go 1.5x faster or 0.75x faster (or 8/9 times faster if you use Note), which isn't ideal :P/>
Edited on 12 May 2015 - 06:52 PM
3790 posts
Location
Lincoln, Nebraska
Posted 12 May 2015 - 10:46 PM
Yep. I've had so much trouble trying to transcribe songs for Minecraft.
7083 posts
Location
Tasmania (AU)
Posted 13 May 2015 - 02:43 AM
It may or may not help to know that the script is playing a video intended for rendering at 25 FPS (0.04s between frames), but due to the exact same limitation imposed on Note (that being the MineCraft server tick rate), it caps out at 20 FPS (0.05s between frames) - 4/5, or 80%, speed.
To complicate matters further, it always sleeps after rendering each frame, regardless as to the time already taken to render it. So if it takes more than a tick to get a frame drawn (which it almost certainly will when scaling over a full-sized external monitor), then that time + a 0.05 sleep = 40% speed (10 FPS). Ideally the script would keep tabs on the clock to work out whether it needs to use a timer or just instantly yield/resume before getting on with the next image…
There are 4967 frames, so at full FPS it plays for ~3:18, whereas in MineCraft it plays for at least ~4:08.
Edited on 13 May 2015 - 12:43 AM
546 posts
Location
Wageningen, The Netherlands
Posted 13 May 2015 - 07:40 AM
It may or may not help to know that the script is playing a video intended for rendering at 25 FPS (0.04s between frames), but due to the exact same limitation imposed on Note (that being the MineCraft server tick rate), it caps out at 20 FPS (0.05s between frames) - 4/5, or 80%, speed.
To complicate matters further, it always sleeps after rendering each frame, regardless as to the time already taken to render it. So if it takes more than a tick to get a frame drawn (which it almost certainly will when scaling over a full-sized external monitor), then that time + a 0.05 sleep = 40% speed (10 FPS). Ideally the script would keep tabs on the clock to work out whether it needs to use a timer or just instantly yield/resume before getting on with the next image…
There are 4967 frames, so at full FPS it plays for ~3:18, whereas in MineCraft it plays for at least ~4:08.
Yep, you're exactly right.
It took me around 8 minutes to record the video because it only ran at 10fps (8x6 block 0.5 scale monitor).
I didn't do any time calculations in the demo, so that's what's causing the problem.
I may make an update so that it includes timing calculations.
56 posts
Location
SwitchCraft
Posted 14 May 2015 - 05:33 PM
This is absolutely awesome.
How long did this take to make?
2679 posts
Location
You will never find me, muhahahahahaha
Posted 14 May 2015 - 06:02 PM
4 hours. It is mentioned above
546 posts
Location
Wageningen, The Netherlands
Posted 14 May 2015 - 07:07 PM
This is absolutely awesome.
How long did this take to make?
Thanks!
I worked on it for about 4 hours.
The first hour was spent on downloading the video and converting it to around 5000 JPGs.
The second hour was spent on writing my own converter which takes JPGs, downscales them,
converts them to ComputerCraft colors and then saves them to a file.
The last two hours were spent on writing, testing and optimizing the player.
I mostly tested it on a 8x6 block 0.5 scale monitor with 164x81 pixels, which really tests the limits of ComputerCraft and my scaling algorithms.
599 posts
Location
LeLua
Posted 30 August 2015 - 01:15 PM
Wow cool, and the song is catchy :D/> Anyways great job.
818 posts
Location
Wherever you want me to be
Posted 16 September 2015 - 12:46 PM
Still the most awesome thing ever made in computercraft.
546 posts
Location
Wageningen, The Netherlands
Posted 19 September 2015 - 05:15 PM
Wow cool, and the song is catchy :D/> Anyways great job.
Still the most awesome thing ever made in computercraft.
Thanks!
7083 posts
Location
Tasmania (AU)
Posted 29 October 2015 - 12:53 AM
This showed up in my YouTube video suggestions, clearly making use of your
video player:
http://www.youtube.com/watch?v=lTAV_Utv29M
818 posts
Location
Wherever you want me to be
Posted 30 October 2015 - 08:11 AM
thinking about it, you could use a constant palette changer in craftos 2.0 when it comes out, giving you a better colour choice for each frame using the colours not used.
546 posts
Location
Wageningen, The Netherlands
Posted 06 November 2015 - 02:14 PM
This showed up in my YouTube video suggestions, clearly making use of your
video player:
http://www.youtube.c...h?v=lTAV_Utv29M
Thanks for reporting it.
It is a pretty cool video.
I don't mind when people don't credit my stuff but I appreciate it when they do :P/>
7083 posts
Location
Tasmania (AU)
Posted 06 November 2015 - 10:23 PM
Well, I guess it was less a "report" so much as a "thought you might be interested to see it", but I guess it did come off that way. :lol:/>
212 posts
Location
Somewhere in this dimension... I think.
Posted 15 December 2015 - 08:21 PM
The size of the program crashes notepad++ :)/> are you SURE it is maxmimally optimized? ;)/>
756 posts
Posted 16 December 2015 - 02:20 AM
It's the screen drawings that is optimised.
Opening this in NP++ is pretty much the same thing as opening an actual video file.
172 posts
Location
USA
Posted 28 December 2016 - 03:29 PM
I wonder if you can add music with iron noteblocks :)/>
546 posts
Location
Wageningen, The Netherlands
Posted 29 December 2016 - 12:25 AM
I wonder if you can add music with iron noteblocks :)/>
That's possible now, but not when this was made :P/>
My
audio API is capable of playing NBS songs so if you made Move Your Feet in Note Block Studio you could totally play it alongside the video.
7083 posts
Location
Tasmania (AU)
Posted 29 December 2016 - 08:03 AM
… but not when this was made :P/>
*cough* :P/>
Edited on 29 December 2016 - 07:03 AM
546 posts
Location
Wageningen, The Netherlands
Posted 29 December 2016 - 11:07 PM
… but not when this was made :P/>
*cough* :P/>
Haha, tbh i was just too lazy :P/>
Edited on 29 December 2016 - 10:09 PM