If your Android is misbehaving
Problem
I have a Huawei Ascend Y200 device and lately it was acting strangely. This device doesn’t have much memory, so it was always complaining about low memory but I got used to it. Installing a new app was always a pain or simply impossible… But a few days ago it was dropping error messages like “process com.google.process.gapps has stopped”. Due to this problem I couldn’t use my phone normally. For instance, when I wanted to check my text messages, it quit to the desktop all the time.
Solution
The solution is very simple: remove as many apps as you can to free some RAM for the device. I did this and after a restart it works like a charm.
I was already thinking that I should buy a new device, after all it’s 2 years old, but now it works fine. I give it another chance :)
When I got this mobile, I used it for lots of things: watch movies, play music, browse YouTube, etc. Thus, I installed several apps that filled up its memory. Since then I got a tablet, which is much better for these tasks, so I could remove these extra apps from the mobile without hesitation. Now, as it has some free RAM, it can work correctly. Well, after all, what should this device know? Make phone calls, write SMS messages, have an alarm clock, and sometimes check my emails. That’s all.
Resize movies for Android/iOS with ffmpeg
Update (20130227): I made a resizer script. See the end of the post.
Problem
You have an Android/iOS phone and you want to watch movies on it. However, if you transfer a movie to the phone, the media player may stop playing it or it may even freeze. Apparently, the movie is too big for your phone. What to do?
Solution
If the media player has problems playing the movie, then it’s too big, thus you should resize it. Then the phone will be able to play it nicely.
Under Windows there is a nice video converter called AVS Video Converter. But if we are under Linux, what can we do?
Well, ffmpeg can do the job for us. But the question is: how to parameterize ffmpeg? :) Here it is:
ffmpeg -i INPUT -codec:v libx264 -quality good -cpu-used 0 -b:v BITRATE -profile:v baseline -level 30 -y -maxrate 2000k -bufsize 2000k -vf scale=WIDTH:HEIGHT -threads THREADS -codec:a libvo_aacenc -b:a 128k OUTPUT.mp4
Let’s see a concrete example. I have a Huawei Ascend Y200 whose resolution is 480×320 pixels. As for the bitrate, 600 kb/s is enough IMO. I want ffmpeg to use 2 cores of the CPU. So:
time ffmpeg -i input.avi -codec:v libx264 -quality good -cpu-used 0 -b:v 600k -profile:v baseline -level 30 -y -maxrate 2000k -bufsize 2000k -vf scale=480:320 -threads 2 -codec:a libvo_aacenc -b:a 128k output.mp4
I like to see how much time the conversion takes, that’s why I added the “time
” command.
Another advantage of this approach is that you can launch the conversion in batch mode. Say you want to convert all the episodes of your favorite TV show. No problem, just write a little script.
ffmpeg
I use Ubuntu and it comes with an old ffmpeg that fails for instance with the parameters above. So I downloaded a static ffmpeg build from http://ffmpeg.gusari.org/static/. FFmpeg exists under Windows too, so the method presented above should work on Windows (though I didn’t try it).
Credits
I’ve read about this solution in this article. You can find more examples with ffmpeg in this source.
Related Work
If you prefer GUI applications, you can take a look at HandBrake.
Script
I made a script that can process movies in batch mode. Available here.
You must be logged in to post a comment.