The desc.txt for boot animations works like this

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

  1. csmith197
    Offline

    csmith197 New Member

    Joined:
    Nov 10, 2009
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Orlando fl
    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
    Offline

    Backnblack Premium Member Premium Member

    Joined:
    Nov 18, 2009
    Messages:
    11,263
    Likes Received:
    5
    Trophy Points:
    0
    Might have to get popcorn to watch that.....

    Great Work!
  3. Big Lou
    Offline

    Big Lou New Member

    Joined:
    Dec 3, 2009
    Messages:
    739
    Likes Received:
    0
    Trophy Points:
    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
    Offline

    csmith197 New Member

    Joined:
    Nov 10, 2009
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Orlando fl
    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
    Offline

    csmith197 New Member

    Joined:
    Nov 10, 2009
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Orlando fl
    ::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
    Offline

    Xerozix New Member

    Joined:
    Nov 21, 2009
    Messages:
    351
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Northern VA
    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
    Offline

    lvlln New Member

    Joined:
    Nov 10, 2009
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    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
    Offline

    mammlouk New Member

    Joined:
    Dec 13, 2009
    Messages:
    316
    Likes Received:
    0
    Trophy Points:
    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
    Offline

    csmith197 New Member

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

    Greenblurr93 New Member

    Joined:
    Nov 30, 2009
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    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
    Offline

    Topsy New Member

    Joined:
    Dec 28, 2009
    Messages:
    677
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Rio Rancho, New Mexico
    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
    Offline

    Greenblurr93 New Member

    Joined:
    Nov 30, 2009
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    0
    ill give it a shot, thanks!
  13. LuN3yDaV3
    Offline

    LuN3yDaV3 New Member

    Joined:
    Jan 4, 2010
    Messages:
    277
    Likes Received:
    0
    Trophy Points:
    0
    This is my first attempt at making a boot animation. I pulled a youtube video of a spinning globe using vixy.net. I then imported the .mov file into Photoshop using the Import video to layers to get individual layers of the video frames. I then used the export layers to files script in Photoshop to create multiple png's. Then used Advanced Renamer program to name the files to 1.png, 2,png, etc. Then used the desc.txt from here. I put the images in the part0 folder and zipped them all together. Once I pushed the bootanimation.zip to /data/local and rebooted, I get a blank screen where the bootanimation is suppose to trigger. Anyone able to help? I've attached the zip if you can take a look.

    PS: Yes I know this seems like a long process that I followed but once I understood how to do it all it was not too hard.

    EDIT: I made a couple changes and it's working, well somewhat. I noticed my first png was named 1.png, so I changed it to 00.png. I also used a different desc.txt file found in another thread. The globe spins and all but it looks like an egg. I'm gonna try to match the desc.txt numbers to the actual resolution.
    Last edited: Mar 11, 2010
  14. Topsy
    Offline

    Topsy New Member

    Joined:
    Dec 28, 2009
    Messages:
    677
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Rio Rancho, New Mexico
    Ya that's pretty much the same procedure I use for videos, I use adobe bridge for the batch rename though. Just set your numbering to 3 characters so you got 000, 001, etc and you shouldn't have to worry about ordering issues at all.

    As for the desc.txt edits, windows is most likely the culprit. Pull the desc.txt from /system/media/bootanimation.zip and then make your changes using notepad+ so it doesn't trash the formatting.
  15. Navi88
    Offline

    Navi88 New Member

    Joined:
    May 12, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Is it possible to add sound to boot animations?
  16. StuntinX
    Offline

    StuntinX New Member

    Joined:
    Sep 3, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    It is but I can't seem to get it to work on my DX... I am interested in any help on this as well
  17. pullmyfinger714
    Offline

    pullmyfinger714 New Member

    Joined:
    Nov 28, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    So I have tried creating my new bootscreen, but its not working. all I get is a black screen. Can someone please help me and tell me whats wrong with it.

    Any help would be much appreciated.
  18. thaDroidz
    Offline

    thaDroidz New Member

    Joined:
    Aug 31, 2010
    Messages:
    2,062
    Likes Received:
    42
    Trophy Points:
    0
    Location:
    neptune
    kinda old but what phone was that made for?
    if it's the OG droid I found your problem, if not NVM...
  19. WorldOfJohnboy
    Offline

    WorldOfJohnboy New Member

    Joined:
    Jul 12, 2010
    Messages:
    812
    Likes Received:
    0
    Trophy Points:
    0
    Quick question about the desc.txt file... I have seen others say it needs to be saved as a "UNIX" file. Does that mean Unicode? If I am editing the file in Notepad, I click File>Save As and do I need to do anything from there?

    Also, anyone know what the read/write permissions need to be on the file?
  20. djakrse
    Offline

    djakrse Active Member

    Joined:
    Jun 9, 2010
    Messages:
    1,122
    Likes Received:
    12
    Trophy Points:
    38
    Location:
    TX
    It isn't so important as the proper formatting of the text itself. Make sure there is a line break at the end of the file. Any line without a line break is ignored. I modify and save with notepad with default ANSI encoding, because I hate the little square symbols (line breaks) when the file is saved in unicode. If you do open a file to edit and see the solid paragraph, you can either edit with a real text editor like notepad++ or resave with ANSI encoding, (I think.)
Search tags for this page
android boot animation desc.txt
,
android bootanimation desc txt
,
android bootanimation desc.txt
,
android desc.txt
,
boot animation desc.txt
,
bootanimation desc.txt
,
bootanimation desc.txt help
,

desc.txt

,
desc.txt android
,
desc.txt explained
,
desc.txt syntax
,
edit desc.txt
,
explanation of desc.txt
,
how to create desc.txt
,
understand desc.txt