Category Archives: FFMPEG

YouTube Videos for Mobile Phones

Having tested the YouTube Mobile portal I wanted to get the videos downloaded for my mobile phone. Unfortunately two facts hindered me from doing this: (i) Getting the video from an RTP stream is not that trivial and (ii) YouTube has only parts of its video converted for mobile access. Therefore I needed a way to get YouTube videos to my mobile phone 😀

  • First of all you need to get the actual video from Youtube. Surf to the video you like and dowÅ„load it using e.g. YouTube Downloader. Do not forget to rename yourvideo to .flv.
  • Then you will have to convert it to 3gpp. FFMPEG will do the trick. On Linux you might have to compile it yourself (as no AMR and AAC encoder are built in in many precompiled packages). On windows you might use precomiled binaries, e.g. from here.
  • Then let ffmpeg do the job for you:
    Windows: ffmpeg.exe -i .mov -acodec aac -s 352×288 .3gp
    Linux: ffmpeg -i .mov -acodec aac -s 352×288 .3gp

This command line shown above encodes the video to H263 with a bitrate of 200 kbps and AAC with a bitrate of 64 kbps. The video needs to follow the constraints of 3gpp and is therefore changed to resolution 352×288. This is the maximum possible with 3gpp. Alternatively one can also use the AMR audio codec. But this one has a rather low quality.

A ‘really strange approach’ for those of you running Linux, but not willing to compile: You can run the precompiled Windows with Wine ;-D