Playing Video While android is booting up

cancel
Showing results for 
Search instead for 
Did you mean: 

Playing Video While android is booting up

1,622 Views
SharanK
Contributor II

Hi All,

I am new to the Android OS.I am in the process of playing a video file [.avi file] while android is booting up.

I could locate the bootanimation folder which currently has android logo while booting up.Now i want to replace this with a short video file.

Please help.

Thanks in advance,

Sharan K

Labels (1)
0 Kudos
15 Replies

443 Views
nww
Contributor I

the bootanimation is not a video, as such. it is rather couple of png files displayed after each other. so dont expect 25fps ;-)

android is not meant to play a video when it boots -- it will play an ANIMATION, a series of pictures, easily, if you want.

if you want something more fluent, you may have only 2 options:

  1. use a faster cpu/sdcard
  2. modify the c++ source code and recompile. related files are give in my comment here: http://imxcommunity.org/xn/detail/4103961:Comment:68658
0 Kudos

443 Views
SharanK
Contributor II

Hi,

I tried png's, the effect is still poor. I tried with lesser number of images, increasing the fps, with only one folder etc. Nothin seems to improve the 'video effect . Please help.

Thanks,

Sharan K

0 Kudos

443 Views
SharanK
Contributor II

Hi Niki,

Thanks for your reply.

I dont expect a 25fps video :)

I will try with png's . I am guessing that there are a lot of processes running parallely while booting up, so it is slow for the first time.

Best Regards,

Sharan K

0 Kudos

443 Views
nww
Contributor I

sharan,

that's the reason why it is called bootANIMATION and not bootVIDEO ;-)

"the bootanimation is not a video, as such. it is rather couple of png files displayed after each other. so dont expect 25fps ;-)"

"also note that the default shiny "android" animation is done in a VERY different way, directly coded into the bootup sequence!"

in parallel to the animation you see visually, a lot of things are going on inside android. i guess, if you have a fast cpu and SDcard, images will be displayed faster. why it's faster, if images are in 1 folder, i don't know. i may guess that zip extraction from 1 dir is faster then from more dirs.

you may also want to try to use png instead of jpg. _depending on your animation_ the png files _may be_ simpler/smaller (loaded decoded/faster).

0 Kudos

443 Views
SharanK
Contributor II

Hi Niki,

I extracted images from the video [ By using a software which converts video to JPG's] and created a 'bootanimation.zip' file and placed it in the path - \data\local'.When I rebooted, my changes were reflected and the new boot animation was shown.

But the video effect was not there. The continuous flow of images which gives the video effect was not seen.  The images were getting stuck here and there for few milliseconds and there was no smooth flow of images.

I created 2 folders namely part0 and part1. The desc.txt file is as given below:

1024 768 30
p 0 0 part0

p 0 1 part1

I have also observed that if I keep all images in 1 folder and try to run them repeatedly until the android boots,from the second time onwards, the 'video effect' is much better. Any idea why the first time the video is not smooth?

 

Please help.

 

Thanks in Advance,

Sharan K

0 Kudos

443 Views
GunjanSamaiya
Contributor I

Thanks for reply

Already opened new thread.

Gunjan

Niki Waibel said:

you may want to start a new thread about this question, so other people can see/answer this. i don't know how to do that. mobile phones often run some sort of a setup app, when started first time. but i think you want some other kind of answer.

Gunjan Samaiya said:

Hi Niki

 

I have one more problem please help me out if you can.There is any way to change android default "TimeZone" that is "GMT +0:00 " with any other location for example "GMT+4:00 Moscow" or "GMT+8:00 Hong Kong" from Android src tree.

 

thanks in advance,

Gunjan

0 Kudos

443 Views
nww
Contributor I

you may want to start a new thread about this question, so other people can see/answer this. i don't know how to do that. mobile phones often run some sort of a setup app, when started first time. but i think you want some other kind of answer.

Gunjan Samaiya said:

Hi Niki

 

I have one more problem please help me out if you can.There is any way to change android default "TimeZone" that is "GMT +0:00 " with any other location for example "GMT+4:00 Moscow" or "GMT+8:00 Hong Kong" from Android src tree.

 

thanks in advance,

Gunjan

0 Kudos

443 Views
GunjanSamaiya
Contributor I

Hi Niki

 

I have one more problem please help me out if you can.There is any way to change android default "TimeZone" that is "GMT +0:00 " with any other location for example "GMT+4:00 Moscow" or "GMT+8:00 Hong Kong" from Android src tree.

 

thanks in advance,

Gunjan

Niki Waibel said:

all this happens in /system/bin/bootanimation. the source code of that command can be found in /frameworks/base/cmds/bootanimation/. BootAnimation.cpp:BootAnimation::ReadyToRun() tries to find /data/local/bootanimation.zip or /system/media/bootanimation.zip (standard boot animation customisation everybody uses). if loading those 2 files fails, mAndroidAnimation class member is set to true and BootAnimation.cpp:BootAnimation::ThreadLoop() calls android() instead of movie(). BootAnimation.cpp:BootAnimation::android() will load images/android-logo-mask.png and images/android-logo-shine.png (/frameworks/base/core/res/assets/images/) and display this nice and smooth android "text".

above was seen in source code of gingerbread (2.2.3, api10). hope this helps.

0 Kudos

443 Views
GunjanSamaiya
Contributor I

Thanks for reply Niki 

This information help me a lot.

Niki Waibel said:

all this happens in /system/bin/bootanimation. the source code of that command can be found in /frameworks/base/cmds/bootanimation/. BootAnimation.cpp:BootAnimation::ReadyToRun() tries to find /data/local/bootanimation.zip or /system/media/bootanimation.zip (standard boot animation customisation everybody uses). if loading those 2 files fails, mAndroidAnimation class member is set to true and BootAnimation.cpp:BootAnimation::ThreadLoop() calls android() instead of movie(). BootAnimation.cpp:BootAnimation::android() will load images/android-logo-mask.png and images/android-logo-shine.png (/frameworks/base/core/res/assets/images/) and display this nice and smooth android "text".

above was seen in source code of gingerbread (2.2.3, api10). hope this helps.

0 Kudos

443 Views
nww
Contributor I

all this happens in /system/bin/bootanimation. the source code of that command can be found in /frameworks/base/cmds/bootanimation/. BootAnimation.cpp:BootAnimation::ReadyToRun() tries to find /data/local/bootanimation.zip or /system/media/bootanimation.zip (standard boot animation customisation everybody uses). if loading those 2 files fails, mAndroidAnimation class member is set to true and BootAnimation.cpp:BootAnimation::ThreadLoop() calls android() instead of movie(). BootAnimation.cpp:BootAnimation::android() will load images/android-logo-mask.png and images/android-logo-shine.png (/frameworks/base/core/res/assets/images/) and display this nice and smooth android "text".

above was seen in source code of gingerbread (2.2.3, api10). hope this helps.

0 Kudos

443 Views
GunjanSamaiya
Contributor I

Hi Niki

Can you please tell me how to change default shiny "android" animation with my product name like "xyz" with same font and animation and if it is possible to send me default shiny "android" animation file location in android src tree.

 

Please help.

Thanks in advance,

Gunjan 



Niki Waibel said:

i fear you have to convert your .mp4/mpeg/avi file to couple of png files first, if you want to use the standard android bootup animation. (ffmpeg may help you with that).

also note that the default shiny "android" animation is done in a VERY different way, directly coded into the bootup sequence! it consists of 2 images only, which are blended over each other, iirc. if you customize the bootup animation, this code is skipped and the png images are loaded from a zip file, as explained in my link above.

0 Kudos

443 Views
JayZhang
Contributor I

First I think you can add an activity instead of the bootanimation, you can use the useage of 'intent' in Android appilication, the activity that you can play a video of your "boot animation" .

Sorry for my poor English. 

Thanks.

0 Kudos

443 Views
nww
Contributor I

i fear you have to convert your .mp4/mpeg/avi file to couple of png files first, if you want to use the standard android bootup animation. (ffmpeg may help you with that).

also note that the default shiny "android" animation is done in a VERY different way, directly coded into the bootup sequence! it consists of 2 images only, which are blended over each other, iirc. if you customize the bootup animation, this code is skipped and the png images are loaded from a zip file, as explained in my link above.

0 Kudos

443 Views
SharanK
Contributor II

Hi,

Thanks a lot for your reply.

I actually want to play a short video file[.mp4/mpeg/avi file]. Not couple of png files displayed one after another.

Thanks,

Sharan K

0 Kudos

443 Views
nww
Contributor I

http://www.addictivetips.com/mobile/how-to-change-customize-create-android-boot-animation-guide/

the bootanimation is not a video, as such. it is rather couple of png files displayed after each other. so dont expect 25fps ;-)

0 Kudos