Ubuntu – How to convert .mp4 files to .3gp using ffmpeg

codecsconvertffmpeg

I would like to download a few videos from youtube and convert them to 3gp so that I can play them on my phone. I would like to know how this can be done using ffmpeg.

I tried the various results on the net only to get the following errors.

  1. I used:

    ffmpeg -i dil.mp4 -sameq -ab 64k -ar 44100 dilenada.3gp
    

I got:

Unsupported codec for output stream #0.1

Seems stream 0 codec frame rate differs from container frame rate: 2000.00 (2000/1) -> 29.92 (359/12)

  1. I used:

    ffmpeg -y -i dil.mp4 -r 20 -s 352x288 -b 400k -acodec libfaac -ac 1 -ar 2000 -ab 24k dilenada.3gp
    

I got:

Seems stream 0 codec frame rate differs from container frame rate: 2000.00 (2000/1) -> 29.92 (359/12)

Unknown encoder 'libfaac'

What am I doing wrong?

Best Answer

Use the following command:

ffmpeg  -y -i movie.mp4 \
        -r 20 -s 352x288 -vb 400k \
        -acodec aac -strict experimental -ac 1 -ar 8000 -ab 24k \
        movie.3gp