Homebrew [RELEASE] BootAnim9 - Custom boot animations for your 3DS!

Status
Not open for further replies.

zes

Well-Known Member
Newcomer
Joined
Mar 26, 2016
Messages
46
Trophies
0
Age
54
XP
112
Country
United States
One last release of the scripts so you don't have to do your own hex editing, as it includes the configs according to your set fps and copies and renames them to config alongside your anim file

that command to make the gif is pretty bad, you'll get ugly results out of ffmpeg with it. ex. something like this works much better:

Code:
ffmpeg -i 3dslogo.mp4 -vf fps=30,scale=400:240:flags=lanczos,palettegen palette.png
ffmpeg -i 3dslogo.mp4 -i palette.png -filter_complex "fps=30,scale=400:240:flags=lanczos[x];[x][1:v]paletteuse" output.gif
 

Wolfvak

nyaa~
OP
Member
Joined
Oct 25, 2015
Messages
918
Trophies
1
XP
3,486
Country
Uruguay
Would this be compatible with BootCTR9? Or will we be stuck in a boot loop?
It's perfectly compatible with BootCTR9, just make sure you rename BootCTR9's 'arm9loaderhax.bin' to 'arm9payload.bin'

that command to make the gif is pretty bad, you'll get ugly results out of ffmpeg with it. ex. something like this works much better:

Code:
ffmpeg -i 3dslogo.mp4 -vf fps=30,scale=400:240:flags=lanczos,palettegen palette.png
ffmpeg -i 3dslogo.mp4 -i palette.png -filter_complex "fps=30,scale=400:240:flags=lanczos[x];[x][1:v]paletteuse" output.gif
Uhh, sorry for my n00biness with ffmpeg, but what on earth does that do? That's just for converting an MP4 to a GIF, right? Here, you have to convert *any* format to a BGR24 RAW dump stream, with each frame having a (400*240*3) bytes size or (320*240*3).

I'm trying to set up a converting server, so is there a chance you could provide commands to convert from whatever format to the format I'm using?
 
Last edited by Wolfvak,

Docmudkipz

Novice
Member
Joined
Mar 16, 2016
Messages
327
Trophies
0
Location
Staring at my computer case's window
XP
297
Country
United States
that command to make the gif is pretty bad, you'll get ugly results out of ffmpeg with it. ex. something like this works much better:

Code:
ffmpeg -i 3dslogo.mp4 -vf fps=30,scale=400:240:flags=lanczos,palettegen palette.png
ffmpeg -i 3dslogo.mp4 -i palette.png -filter_complex "fps=30,scale=400:240:flags=lanczos[x];[x][1:v]paletteuse" output.gif
I see where you're going with this, but it shouldn't be generating a gif unless you're giving it a gif, even then the end product is always a renamed rgb dump. I'll see if it improves the end product though.
 
Last edited by Docmudkipz,

wiiuser2

Well-Known Member
Member
Joined
Sep 12, 2009
Messages
186
Trophies
0
XP
211
Country
Netherlands
I'm having fun with converting family videos into anim files. Problem is that some videos last for minutes.
I made the following changes (in bold) to the file draw.c to exit the animation when pressing START (meaning 'START' to boot normally) ;-) )
Just posting in case anyone is interested. Will look also into an option to randomly select an animation from the folder at each boot.

...
#include "buttons.h"
...
for (u32 curframe = 0; curframe < maxFrames; curframe++) { // loop until the maximum amount of frames, increasing frame count by 1
u16 pressed = HID_PAD;
if (pressed & BUTTON_START)
curframe = maxFrames;
 

Wolfvak

nyaa~
OP
Member
Joined
Oct 25, 2015
Messages
918
Trophies
1
XP
3,486
Country
Uruguay
I'm having fun with converting family videos into anim files. Problem is that some videos last for minutes.
I made the following changes (in bold) to the file draw.c to exit the animation when pressing START (meaning 'START' to boot normally) ;-) )
Just posting in case anyone is interested. Will look also into an option to randomly select an animation from the folder at each boot.

...
#include "buttons.h"
...
for (u32 curframe = 0; curframe < maxFrames; curframe++) { // loop until the maximum amount of frames, increasing frame count by 1
u16 pressed = HID_PAD;
if (pressed & BUTTON_START)
curframe = maxFrames;
I'd prefer if you included BUTTON_START in the same header that is used by BUTTON_R1. Other than that, you may fork it if you want and just push changes if you have a GitHub account, otherwise I might do it, but with the SELECT button.
 

zes

Well-Known Member
Newcomer
Joined
Mar 26, 2016
Messages
46
Trophies
0
Age
54
XP
112
Country
United States
I see where you're going with this, but it shouldn't be generating a gif unless you're giving it a gif, even then the end product is always a renamed rgb dump. I'll see if it improves the end product though.

:)

You make a gif as an intermediary file in your .bat, you'd get better results pursuing what I posted rather than this bit:

Code:
ffmpeg -i %1 -s %res% %output1%

In any case, good luck! FFmpeg is pretty fickle, you often have to beat good results out of it.
 

Docmudkipz

Novice
Member
Joined
Mar 16, 2016
Messages
327
Trophies
0
Location
Staring at my computer case's window
XP
297
Country
United States
:)

You make a gif as an intermediary file in your .bat, you'd get better results pursuing what I posted rather than this bit:

Code:
ffmpeg -i %1 -s %res% %output1%

In any case, good luck! FFmpeg is pretty fickle, you often have to beat good results out of it.
Thanks for the tip, I'd have finished comparing results already if my computer didn't think it was a good idea to cut power to my sd reader.
 

wiiuser2

Well-Known Member
Member
Joined
Sep 12, 2009
Messages
186
Trophies
0
XP
211
Country
Netherlands
I'd prefer if you included BUTTON_START in the same header that is used by BUTTON_R1. Other than that, you may fork it if you want and just push changes if you have a GitHub account, otherwise I might do it, but with the SELECT button.

I'm fine if you do it (your way). I have no GitHub account (yet), I only recently started to learn 'C' (as being an experienced programmer from the past but mainly in assembler and Visual Basic). These type of 'tasks' help me in the C learning process. But I have still a long way to go.... First proper use of my Linux virtual machine as well ;-). I want to become more knowledgeable first about GitHub before starting my own forks to be honest.
 

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
1
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,287
Country
United States
I actually made some changes like that before the merge on github of the press R1 bit from TheBaloneyboy, but the way I saw it, it was more useful to have any key trigger the skip since BootCtr9 takes over after. Press and hold X, get d9, etc.

If anyone cares, it's in my press_any_key_to_skip branch on github, though I didn't PR since it is slightly expensive in terms of a comparison every frame. It also really comes down to personal taste. I'm not sure if it has a noticeable effect on frame lag but I'd err on the side of caution when adding a check to the render loop.
 

Wolfvak

nyaa~
OP
Member
Joined
Oct 25, 2015
Messages
918
Trophies
1
XP
3,486
Country
Uruguay
I'm fine if you do it (your way). I have no GitHub account (yet), I only recently started to learn 'C' (as being an experienced programmer from the past but mainly in assembler and Visual Basic). These type of 'tasks' help me in the C learning process. But I have still a long way to go.... First proper use of my Linux virtual machine as well ;-). I want to become more knowledgeable first about GitHub before starting my own forks to be honest.
ASM and VB... those are pretty much polar opposites! :D
Yeah, I'll implement it and push changes in a few minutes.
Thanks, and please let me know when you create a GitHub account so I can credit you over there
 

Wolfvak

nyaa~
OP
Member
Joined
Oct 25, 2015
Messages
918
Trophies
1
XP
3,486
Country
Uruguay
Oh, btw, Wolfvrak. If f_open requires sdmc:/ now, you're going to need to fix the paths in draw.c, since I did directly f_open of the anim and anim_bottom file.
It doesn't, I was an idiot and didn't actually check to see if the chainloader sources actually worked. I accidentally deleted them, and when I wanted to post the source I didn't bother to check if they worked. It's already fixed tho, both on BootAnim9 as well as FakeBrick9 (really creative names, huh?)
 

zes

Well-Known Member
Newcomer
Joined
Mar 26, 2016
Messages
46
Trophies
0
Age
54
XP
112
Country
United States
Thanks for the tip, I'd have finished comparing results already if my computer didn't think it was a good idea to cut power to my sd reader.

It was night-and-day difference for me, my boot animation is nice and sharp now; using that .bat you posted (thanks for that, btw, it was useful as a starting point) gave me dithered-looking results, like web GIFs from the '90s.

Anyways, hope it ends up helping in some way, it'd be great for folks to have a drag-n-drop creator that gives snazzy results. :yay3ds:
 

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
1
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,287
Country
United States
It doesn't, I was an idiot and didn't actually check to see if the chainloader sources actually worked. I accidentally deleted them, and when I wanted to post the source I didn't bother to check if they worked. It's already fixed tho, both on BootAnim9 as well as FakeBrick9 (really creative names, huh?)

Always build and test before pushing changes. :P

(Hey, the names get the point across. Better to have a boot animation tool named BootAnim9 than Phoenix or something else that sounds neat but doesn't explain what it does. Heh.)
 

Docmudkipz

Novice
Member
Joined
Mar 16, 2016
Messages
327
Trophies
0
Location
Staring at my computer case's window
XP
297
Country
United States
It was night-and-day difference for me, my boot animation is nice and sharp now; using that .bat you posted (thanks for that, btw, it was useful as a starting point) gave me dithered-looking results, like web GIFs from the '90s.

Anyways, hope it ends up helping in some way, it'd be great for folks to have a drag-n-drop creator that gives snazzy results. :yay3ds:
It actually does look a ton better. I was actually wanting to find some way to increase the quality of the animation, that's a big help. I never noticed I had artifacts all over my gamecube one til I ran the video through the new procedure and it does look a ton sharper.
Here's the new bat and sh files now with help from @zes
 

Attachments

  • makeanim.zip
    4.5 KB · Views: 204

Wolfvak

nyaa~
OP
Member
Joined
Oct 25, 2015
Messages
918
Trophies
1
XP
3,486
Country
Uruguay
(Hey, the names get the point across. Better to have a boot animation tool named BootAnim9 than Phoenix or something else that sounds neat but doesn't explain what it does. Heh.)
Yeah, I like to follow the KISS principle as much as I can :D
Anyways, I've already pushed changes to the repo, but won't make a release for a while, until I get some more features I wanted.

@zes it's true, you really have to insert like 50 parameters to ffmpeg in order to get something nice. It'd be even better to know all of them :P
Given that they're RAW dumps, dithering and other compression stuff won't make a difference, I'll have to tell ffmpeg not to care about size and just output the best quality possible.

EDIT: Updated the OP, thanks to @Docmudkipz for always being there and @zes for the suggestions!
 
Last edited by Wolfvak,

Docmudkipz

Novice
Member
Joined
Mar 16, 2016
Messages
327
Trophies
0
Location
Staring at my computer case's window
XP
297
Country
United States
It's perfectly compatible with BootCTR9, just make sure you rename BootCTR9's 'arm9loaderhax.bin' to 'arm9payload.bin'


Uhh, sorry for my n00biness with ffmpeg, but what on earth does that do? That's just for converting an MP4 to a GIF, right? Here, you have to convert *any* format to a BGR24 RAW dump stream, with each frame having a (400*240*3) bytes size or (320*240*3).

I'm trying to set up a converting server, so is there a chance you could provide commands to convert from whatever format to the format I'm using?
It's running the input file through a the lanczos filter at what I edited to be the target framerate and size to create a palette for the second line which uses that palette as well as the filter to create a good quality gif before we dump the gif to rgb

You could try to set variables in the same way I did the batch files. I'm assuming the server is linux so you could let it accept any file uploaded to a location and set as the input for the commands
 
Last edited by Docmudkipz,

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
1
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,287
Country
United States
@Docmudkipz Just so you know, that will decrease colors to 256. It's not necessary, since the 3DS is perfectly capable of rendering standard 8bit video. When using an MP4 as input, you're destroying the colors with no real gain.

Also in general - the more transcodes, the worse the result will be.
 

Wolfvak

nyaa~
OP
Member
Joined
Oct 25, 2015
Messages
918
Trophies
1
XP
3,486
Country
Uruguay
@Docmudkipz Just so you know, that will decrease colors to 256. It's not necessary, since the 3DS is perfectly capable of rendering standard 8bit video. When using an MP4 as input, you're destroying the colors with no real gain.

Also in general - the more transcodes, the worse the result will be.
That's what I generally do: don't convert to GIF and then convert to RAW, just dump inmediately from source.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Hawaii played it smart and said we're too hot for this land