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

  • Thread starter Thread starter Wolfvak
  • Start date Start date
  • Views Views 331,512
  • Replies Replies 1,434
  • Likes Likes 75
Status
Not open for further replies.
Not sure if it's been suggested, but It might be better to use png,bmp, or jpegs for each frame, similar to android boot logos. Maybe playing a WAV or OGG too?
If you go this route, I'd suggest maybe just have a config file for stuff like framerate, etc
 
Not sure if it's been suggested, but It might be better to use png,bmp, or jpegs for each frame, similar to android boot logos. Maybe playing a WAV or OGG too?
If you go this route, I'd suggest maybe just have a config file for stuff like framerate, etc

JPEG decompression actually introduces an incredible (literally, I couldn't believe it) amount of processing, something the ARM9 doesn't have. A JPEG stream would only decrease file size, but not improve performance (in any case, it makes it worse)
On the other hand, we (at least I) can't access any sound features from the ARM9 chip... yet
 
JPEG decompression actually introduces an incredible (literally, I couldn't believe it) amount of processing, something the ARM9 doesn't have. A JPEG stream would only decrease file size, but not improve performance (in any case, it makes it worse)
On the other hand, we (at least I) can't access any sound features from the ARM9 chip... yet
what about something like bmp? or even if we had a small converter to convert the images to a more raw format for speed?
 
Heres a couple of really super simple bat files that accept input.gif and renames to anim and and bottom_anim respectively. Should work fine if you have ffmpeg in your PATH or in the directory

These *should* work perfectly, thank you! Have you tested them?
 
Yeah i've run the top one thru a couple of gifs and they work fine, and the bottom one works in the same way
Maybe you could add a simple check? If the resulting file size is bigger than 50MB, just delete it and spit out an error. Not sure how to do this in batch however.
 
Here's the scripts with the check, I may have gotten to byte number wrong, someone will need to check me since Windows runs by 1024 bytes/kb etc.(I can't remember the base for the life of me) but it will delete the generated file if it exceeds 52428800b/50mb.
 
  • Like
Reactions: pastaconsumer
Here's the scripts with the check, I may have gotten to byte number wrong, someone will need to check me since Windows runs by 1024 bytes/kb etc.(I can't remember the base for the life of me) but it will delete the generated file if it exceeds 52428800b/50mb.

Yeah that's the right size. Updated the OP and thanks a lot!
Gonna get some sleep now...
 
Here's the scripts with the check, I may have gotten to byte number wrong, someone will need to check me since Windows runs by 1024 bytes/kb etc.(I can't remember the base for the life of me) but it will delete the generated file if it exceeds 52428800b/50mb.
how about like this? I've just simply merged your nice code! 2in1!

Code:
@ECHO OFF
set maxbytesize=52428800
@echo For Top Screen:400x240, For Bottom Screen:320x240
set /p size=Enter screen size:
@echo Enter your GIF file name and output File name.
set /p gif=Input File Name (eg: xxxxxx.gif):
set /p out=Output File Name (anim or bottom_anim):
ffmpeg -i %gif% -s %size% input_resized.gif
ffmpeg -i "input_resized.gif" -r 10 -pix_fmt bgr24 -vf "transpose=1" output.rgb
rename output.rgb %out%
del input_resized.gif
for %%A in (%out%) do (
    echo Size of "%%A" is %%~zA bytes 
    if %%~zA GTR %maxbytesize% (
        cls
    echo "Your file exceeds the 50mb size limit, try a different gif(Preferably shorter)."
    del anim
    pause >nul
    exit
    ) else (
    exit
    )
)
 
how about like this? I've just simply merged your nice code! 2in1!

Code:
@ECHO OFF
set maxbytesize=52428800
@echo For Top Screen:400x240, For Bottom Screen:320x240
set /p size=Enter screen size:
@echo Enter your GIF file name and output File name.
set /p gif=Input File Name (eg: xxxxxx.gif):
set /p out=Output File Name (anim or bottom_anim):
ffmpeg -i %gif% -s %size% input_resized.gif
ffmpeg -i "input_resized.gif" -r 10 -pix_fmt bgr24 -vf "transpose=1" output.rgb
rename output.rgb %out%
del input_resized.gif
for %%A in (%out%) do (
    echo Size of "%%A" is %%~zA bytes
    if %%~zA GTR %maxbytesize% (
        cls
    echo "Your file exceeds the 50mb size limit, try a different gif(Preferably shorter)."
    del anim
    pause >nul
    exit
    ) else (
    exit
    )
)

That works perfectly, but I'd rather use two scripts in orded to keep n00b mistakes away. Still, thanks a lot for your interest, and maybe I'll add something like this once the project mature more!
 
Last edited by Wolfvak,
Heres a couple of really super simple bat files that accept input.gif and resizes, converts and renames to anim and and bottom_anim respectively. Should work fine if you have ffmpeg in your PATH or in the directory
if it uses gifs why do we need FFMPEG as well?
 
how about like this? I've just simply merged your nice code! 2in1!

Code:
@ECHO OFF
set maxbytesize=52428800
@echo For Top Screen:400x240, For Bottom Screen:320x240
set /p size=Enter screen size:
@echo Enter your GIF file name and output File name.
set /p gif=Input File Name (eg: xxxxxx.gif):
set /p out=Output File Name (anim or bottom_anim):
ffmpeg -i %gif% -s %size% input_resized.gif
ffmpeg -i "input_resized.gif" -r 10 -pix_fmt bgr24 -vf "transpose=1" output.rgb
rename output.rgb %out%
del input_resized.gif
for %%A in (%out%) do (
    echo Size of "%%A" is %%~zA bytes
    if %%~zA GTR %maxbytesize% (
        cls
    echo "Your file exceeds the 50mb size limit, try a different gif(Preferably shorter)."
    del anim
    pause >nul
    exit
    ) else (
    exit
    )
)

Aha! I streamlined it even further by allowing the user to drag and drop the gif onto the bat and choose top or bottom.
Code:
@ECHO OFF
set maxbytesize=52428800
CHOICE /M "Press A for top screen or B for bottom screen" /C:ab
IF ERRORLEVEL 2 GOTO bot
IF ERRORLEVEL 1 GOTO top

:top
set filename=anim
ffmpeg -i %1 -s 400x240 input_resized.gif
ffmpeg -i "input_resized.gif" -r 10 -pix_fmt bgr24 -vf "transpose=1" output.rgb
rename output.rgb anim
del input_resized.gif
for %%A in (%filename%) do (
  echo Size of "%%A" is %%~zA bytes
  if %%~zA GTR %maxbytesize% (
  cls
   echo "Your file exceeds the 50mb size limit, try a different gif(Preferably shorter)."
   del anim
   pause >nul
   exit
  ) else (
   exit
  )
)

:bot
set "filename=bottom_anim"
ffmpeg -i %1 -s 320x240 Botinput_resized.gif
ffmpeg -i "botinput_resized.gif" -r 10 -pix_fmt bgr24 -vf "transpose=1" bot_output.rgb
rename bot_output.rgb bottom_anim
del Botinput_resized.gif
for %%A in (%filename%) do (
  echo Size of "%%A" is %%~zA bytes
  if %%~zA GTR %maxbytesize% (
  cls
   echo "Your file exceeds the 50mb size limit, try a different gif(Preferably shorter)."
   del anim
   pause >nul
   exit
  ) else (
   exit
  )
)

That works perfectly, but I'd rather use two scripts in orded to keep n00b mistakes away. Still, thanks a lot for your interest, and maybe I'll add something like this once the projects matures more!

Should be nearly foolproof now

if it uses gifs why do we need FFMPEG as well?
From what I understand is that the payload is made to read a simple animation format at 10 fps and we're using ffmpeg to resize a gif animation and convert it to a payload readable format at the target framerate
 

Attachments

Last edited by Docmudkipz,
  • Like
Reactions: Februarysn0w
Aha! I streamlined it even further by allowing the user to drag and drop the gif onto the bat and choose top or bottom.
Code:
@ECHO OFF
set maxbytesize=52428800
CHOICE /M "Press A for top screen or B for bottom screen" /C:ab
IF ERRORLEVEL 2 GOTO bot
IF ERRORLEVEL 1 GOTO top

:top
set filename=anim
ffmpeg -i %1 -s 400x240 input_resized.gif
ffmpeg -i "input_resized.gif" -r 10 -pix_fmt bgr24 -vf "transpose=1" output.rgb
rename output.rgb anim
del input_resized.gif
for %%A in (%filename%) do (
  echo Size of "%%A" is %%~zA bytes
  if %%~zA GTR %maxbytesize% (
  cls
   echo "Your file exceeds the 50mb size limit, try a different gif(Preferably shorter)."
   del anim
   pause >nul
   exit
  ) else (
   exit
  )
)

:bot
set "filename=bottom_anim"
ffmpeg -i %1 -s 320x240 Botinput_resized.gif
ffmpeg -i "botinput_resized.gif" -r 10 -pix_fmt bgr24 -vf "transpose=1" bot_output.rgb
rename bot_output.rgb bottom_anim
del Botinput_resized.gif
for %%A in (%filename%) do (
  echo Size of "%%A" is %%~zA bytes
  if %%~zA GTR %maxbytesize% (
  cls
   echo "Your file exceeds the 50mb size limit, try a different gif(Preferably shorter)."
   del anim
   pause >nul
   exit
  ) else (
   exit
  )
)



Should be nearly foolproof now


From what I understand is that the payload is made to read a simple animation format at 10 fps and we're using ffmpeg to resize a gif animation and convert it to a payload readable format at the current maximum framerate
MUCH better, gonna update the OP *again*

--------------------- MERGED ---------------------------

if it uses gifs why do we need FFMPEG as well?
It uses ffmpeg to convert to the necessary format. Input can be a GIF as well as any format ffmpeg uses, like MP4. Just keep in mind that you can't just convert a 30 minute video to one of these animations XD
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum