The desc.txt for boot animations works like this

Discussion in 'Android Hacks and Help' started by csmith197, Dec 15, 2009.

  1. csmith197

    csmith197 Member

    Joined:
    Nov 10, 2009
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando fl
    Ratings:
    +0
    Ok,
    After looking through the bootanimation.zip, I was able to map it and overcome alot of the inefficiencies that exist in the process we use to modify boot animations by simplifying the bootanimation.zip to 1 folder and only the pictures needed for your loop.


    When we open the bootanimation.zip, it is obvious that there is a folder which holds png's and a text file which controls the behavior of the aforementioned png's. A lot of people have been hypothesizing what these configurations do, and after reading what they have tried I made my own effort and quiet easily mastered the file structure and desc text file. I will explain here how it works.


    When you open desc.txt it displays only one line of code
    Code:
     480 427 30p 1 0 part0p 0 10 part1
    But if you copy and paste it into another text editor the code comes out looking like this
    Code:
    480 427 30
    p 1 0 part0
    p 0 10 part1

    This format is the way the code should actually be read and can be broken down like this


    480= width/height
    427=width/height
    30=frames per second
    p= not exactly sure, but I think it's just a pointer for the previous line to this line of code
    1= times to be replayed (0=infinite)
    10 = pause If pause = 10, it will show the last frame and then sleep 10/fps seconds before continuing with the animation. (Thank you aequitas from alldroid forums!)
    part0=folder name



    With this in mind, I tried deleting both; the last line of code, and the part1 folder. This made sense to me because droid gave us 2 logical boot animations and if we only wanted a loop of one logical animation than why make a duplicate just to host in another folder and take space?


    Next thing I looked at was the names of the png's. The First notable thing is they have a uniform, ascending filename structure, which correlates to the order they are to be played in. The first one starts with 480_427_00000.png. Looking at this it was obvious to me that that the first part, 480_427 was arbitrary because it relates to the first line fo the desc.txt, and the boot animations still work regardless if they match or not. While I haven’t tried yet, I feel it is safe to assume that they can be simplified to their 5 digit numerical filename if one so wished.


    Armed with this I realized that our future boot animations only will only require 1 folder (part0) and the desc.text only needs 2 lines of code.
    Code:
    480 480 10
    p 0 11 part0

    Furthermore, as a result of deleting png's it was realized that the folder sizes are only limited by the 5 bit filename which leaves the possibility of storing 9,765,625 images since 5^10=9,765,625.


    This is what I was able to figure out and I hope you guys are able to make some better stuff than me with the knowledge. :D Enjoy
     
    Last edited: Dec 15, 2009
  2. Backnblack

    Backnblack Premium Member Premium Member

    Joined:
    Nov 18, 2009
    Messages:
    11,260
    Likes Received:
    17
    Trophy Points:
    453
    Ratings:
    +17
    Might have to get popcorn to watch that.....

    Great Work!
     
  3. Big Lou

    Big Lou Member

    Joined:
    Dec 3, 2009
    Messages:
    733
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    Cool read.

    Wouldn't you be able to name the pngs anything you want as long as they are in numerical order? Also, it should be noted that the reason Motorola used 2 folders was so that one part of the animation would run once and the second part would loop.
     
  4. csmith197

    csmith197 Member

    Joined:
    Nov 10, 2009
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando fl
    Ratings:
    +0
    Thank you. I haven't tried using more or less than 5 digits, but theoretically as long as they are in order then it should work
     
  5. csmith197

    csmith197 Member

    Joined:
    Nov 10, 2009
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando fl
    Ratings:
    +0
    ::edited to reflect that 10 = pause If pause = 10, it will show the last frame and then sleep 10/fps seconds before continuing with the animation. ::
     
  6. Xerozix

    Xerozix Member

    Joined:
    Nov 21, 2009
    Messages:
    351
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Northern VA
    Ratings:
    +0
    It would be really cool to change my company logo and name with the Droid text. Anyone know of a software to let me generate images froma movie? Lol
     
  7. lvlln

    lvlln Member

    Joined:
    Nov 10, 2009
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Ratings:
    +0
    FFMpeg can do it. Check out this little guide:

    How-To: Extract images from a video file using FFmpeg - Stream #0

    I've found that the "-f image2" option causes problems and isn't needed on my computer.
     
  8. mammlouk

    mammlouk Member

    Joined:
    Dec 13, 2009
    Messages:
    316
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    Yep, FFMpeg ftw. I'm working on a bash script for linux that will start with a video, run it through ffmpeg to get the images, create a desc.txt and package it all up for the Droid. It also has the capability to use youtube-dl to source the video from youtube. Once the script is cleaned up a bit (probably a couple days from now) I will make it available on request.
     
  9. csmith197

    csmith197 Member

    Joined:
    Nov 10, 2009
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Orlando fl
    Ratings:
    +0
    Thats sounds cool. I will definitely want to check that out.
     
  10. Greenblurr93

    Greenblurr93 Member

    Joined:
    Nov 30, 2009
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    Bringing this back to ask a question i hope hasnt been asked... i currently use 2 folders, part0 and part1, is there a way to slow the frame rate down when it plays part0 and not part1?? or is the frame rate set for the entire animation? i suppose i could add some duplicate frames in there to slow it down but i was wondering if this is possible so i dont need to do all that work (my boot animation has over 100 png's)


    THANKS!
     
  11. Topsy

    Topsy Member

    Joined:
    Dec 28, 2009
    Messages:
    677
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Rio Rancho, New Mexico
    Ratings:
    +0
    Only possible way it might work is like this.

    480 427 30
    p 1 0 part0
    480 427 20
    p 0 10 part1

    Underlined numbers are framerates, i haven't tested it, but you would be specifying a different framerate for part1 in theory.
     
  12. Greenblurr93

    Greenblurr93 Member

    Joined:
    Nov 30, 2009
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    16
    Ratings:
    +0
    ill give it a shot, thanks!
     
Search tags for this page

android bootanimation desc

,

android bootanimation desc txt

,
bootanimation desc
,
bootanimation desc.txt help
,
desc android
,
desc.txt syntax
,
explanation of desc.txt
,
how to set android boot animation desc txt
,

understand desc.txt

,
what is a descr.txt file for