Depends. What is the length of this GIF? If you want I can convert it if you give me a link...Does this mean I can add a JoJo gif on power on?
Depends. What is the length of this GIF? If you want I can convert it if you give me a link...Does this mean I can add a JoJo gif on power on?
is there going to be a tutorial thread on this soon?Depends. What is the length of this GIF? If you want I can convert it if you give me a link...
I'll have to find the right one, for now I will sleep. Thanks though!Depends. What is the length of this GIF? If you want I can convert it if you give me a link...
There already is one in the GitHub page (https://github.com/wolfvak/bootanim9#how-to-generate-a-custom-animation). It's not as clear as I want it to be, but it'll suffice for nowis there going to be a tutorial thread on this soon?
sweet, may try this out tomorrow. thanksThere already is one in the GitHub page. It's not as clear as I want it to be, but it'll suffice for now
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
what about something like bmp? or even if we had a small converter to convert the images to a more raw format for speed?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
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
Yeah i've run the top one thru a couple of gifs and they work fine, and the bottom one works in the same wayThese *should* work perfectly, thank you! Have you tested them?
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.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
I'll look into it real quickMaybe 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.
how about like this? I've just simply merged your nice code! 2in1!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.
@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 ) )
if it uses gifs why do we need FFMPEG as well?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
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 ) )
@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!
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 framerateif it uses gifs why do we need FFMPEG as well?
MUCH better, gonna update the OP *again*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
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 XDif it uses gifs why do we need FFMPEG as well?