How can I convert .mp4 files to .3gp using ffmpeg?

26,505

Solution 1

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

Solution 2

You are doing everything right :). You will have to install for the conversion to work.

Ubuntu Restricted Extras, i.e. libavcodec-extra-53

You may get it from the software center or use the following command

sudo apt-get install ffmpeg libavcodec-unstripped-52

Solution 3

You probably just need to install the non free/restricted packages of ffmpeg like libavcodec-extra-53 libavformat-extra-53 libavutil-extra-51 and the likes.

Calling ffmpeg with --list-encoders will show the available encoders.

Solution 4

I ran into problems with ffmpeg too

Apparently, ubuntu is no longer using ffmpeg, but a fork called avconv. This makes some (many ?) commands found on sites unusable on ubuntu.

What I did was just get the original ffmpeg:

sudo add-apt-repository ppa:jon-severinsson/ffmpeg
sudo apt-get update
sudo apt-get install ffmpeg

not sure how much this would help you, though

Share:
26,505

Related videos on Youtube

harisibrahimkv
Author by

harisibrahimkv

I love to write. A 'psycho' path.

Updated on September 18, 2022

Comments

  • harisibrahimkv
    harisibrahimkv almost 2 years

    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?

  • b-ak
    b-ak about 12 years
  • harisibrahimkv
    harisibrahimkv about 12 years
    I tried installing them but still the commands mentioned in the question did not work.
  • Csabi Vidó
    Csabi Vidó about 12 years
    Still the same error messages?
  • josinalvo
    josinalvo almost 12 years
    your line is not working here, but at least it is not giving the "unknown codec" error, but one about resolution
  • igauravsehrawat
    igauravsehrawat over 6 years
    Would have been nice, if you could explain it. Thanks