[Nexus One Themes and Apps] pikipirs:
Hey.

Thanks.

Be prepared for a long answer. :p

This is subjective, I guess. The video will show in as good a quality as it actually is. The VLW (video live wallpaper) always zooms into a video in such a way that it covers the entire height of the display, while its ratio is not changed. The video's width is then used as scrolling surface so it shifts when you swipe between home screens.

The first video you posted has a vertical resolution of 480. This resolution fits very well in the height of a small mobile display (whatever resolution it might be) so you don't see alot of pixels. In fact, 480 is the maximum vertical resolution that I recommend for VLW, as higher ones might start causing the animation to play slower/skip video frames.

The second video you posted has a vertical resolution of 220. This gets close to the lower bound of acceptible pixel density for your eyes. While this is good on your phone's battery (VLW doesn't have to struggle as much to decode the video), it's not good on you eyes, that is, you can see video pixels which spoils the experience. One idea that I would have for the second video is maybe to reencode it rotated by 90 degrees. This way its vertical resolution will become 400 (current width) which would be easier on the eyes. (hold back on the rotating/reencoding part a little longer, as I plan on adding an option to rotate videos in the VLW).

Videos may play slower or even stop if they are too large for the underpowered phone's processor to handle. If you've been using computers for the last 10 years, then you should remember the ones that struggled to even play divx files properly. Some computers (like netbooks) have problems playing back HD content even today. The same is true for your phone. While a common divx should be handled by VLW just fine, any HD content (720p or 1080p) is way to much to handle. I guess what I'm trying to say is, don't go overboard with the resolution and don't expect miracles from your phone's processor.

There is no easy way to describe how to convert videos, as it almost always depends on the original video itself. As I said, a video is as good as it actually is. Reencoding, converting and/or enlarging it digitally won't make it any nicer.

Format changing is reasonable when you are dealing with resolutions and sizes that become hard to handle by the phone. Imagine a video with 854x480 at 30 FPS (your usual 480p video on youtube, for example). VLW has to process 854*480*30=12,297,600 pixels each second if it wants to play the video in real time. If this video is in h264 (which 480p youtube videos with .mp4 extension are) then it's even worse because h264 codec is very complex, which makes the processing part even harder. That's why I recommend reencoding to a less complex format, like mpeg-1 or mpeg-4 (divx).

Best format globally in my opinion is divx (mpeg-4 .avi). It represents a good compromise between complexity and size for a given quality. If you want less complexity (=more battery live), go with videoCD format (mpeg-1 .mpg) which will require larger files for the same quality, but is easier to decode for VLW.

Also one other thing to note, .mpg files need a bit of time to reload. This makes them useless for looping animations as the animation appears to freeze when looping. This is true for a lot of other formats/codecs as well. Divx doesn't have that pause (well it does, but it's amost unnoticable).

Resolution/frame rate is another tough one. The easiest way of going about it is to calculate the processed pixels per second, as I did above for the youtube video example. You can find all the help on how to do this in the help section. If you get your videos from standard 16:9 or 4:3 sources, then a couple of good resolution/framerate combinations are described in the help section. I recommend 360p (640x360 for 16:9, 480x360 for 4:3 videos, both at 30 FPS) or 480p (854x480 for 16:9, 640x480 for 4:3 videos, both at 25 FPS) in divx format. Remember once again - the biggest factor in the appearent quality of a perfectly reencoded video, is its vertical resolution. be between 360 and 480 and you'll be fine. The second biggest factor is frame rate, hold that one between 30FPS for 360p and 25FPS for 480p.

So you suggest adding an option to keep looping the same (but randomly choosen) video, and switch to another video only when the live wallpaper unpauses? That's a good idea. To a todo list... :)

PS: Are you on a mac or on Windows? I might be able to make a couple of simple scripts that use FFmpeg to convert videos with common ratios to better sizes/formats.