ffmpeg says "Unknown encoder 'mp3'"

7,297

As the error message says, there is no encoder named mp3 in ffmpeg. There are various encoders for MP3. In ffmpeg you'd use libmp3lame. See also the MP3 encoding guide.

Your build must be configured with --enable-libmp3lame. See How to Compile FFmpeg on CentOS or simply use a Linux build of ffmpeg. Either method will provide a build that supports libmp3lame.

You can check the available encoders with ffmpeg -encoders.

Also, check your syntax. While you haven't provided your actual command (you should always provide the command), note that -b as an option alone is ambiguous. If you want to specify video or audio bitrate, use -b:v or -b:a, respectively.

Share:
7,297

Related videos on Youtube

liujinjie
Author by

liujinjie

Updated on September 18, 2022

Comments

  • liujinjie
    liujinjie almost 2 years
    ffmpeg version 1.1.3 Copyright (c) 2000-2013 the FFmpeg developers
      built on Feb 25 2013 23:22:43 with gcc 4.1.2 (GCC) 20080704 (Red Hat 4.1.2-44)
      configuration: --enable-static --disable-ffplay --disable-ffserver --enable-gpl --enable-libxvid --enable-libx264 --enable-postproc --enable-libvpx --enable-libtheora
      libavutil      52. 13.100 / 52. 13.100
      libavcodec     54. 86.100 / 54. 86.100
      libavformat    54. 59.106 / 54. 59.106
      libavdevice    54.  3.102 / 54.  3.102
      libavfilter     3. 32.100 /  3. 32.100
      libswscale      2.  1.103 /  2.  1.103
      libswresample   0. 17.102 /  0. 17.102
      libpostproc    52.  2.100 / 52.  2.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/usr/local/httpd-2.2.25/htdocs/mvix/resources/testsp/mov01.mov':
      Metadata:
        major_brand     : qt  
        minor_version   : 537199360
        compatible_brands: qt  
        creation_time   : 2011-04-25 22:07:51
        comment         : Encoded and delivered by apple.com/trailers/
        comment-eng     : Encoded and delivered by apple.com/trailers/
        copyright       : 漏 2011 Paramount Pictures. All Rights Reserved
        copyright-eng   : 漏 2011 Paramount Pictures. All Rights Reserved
        title           : Transformers: Dark of the Moon
        title-eng       : Transformers: Dark of the Moon
        timecode        : 00:00:00:00
      Duration: 00:02:27.86, start: 0.000000, bitrate: 5353 kb/s
        Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x532, 5215 kb/s, 23.98 fps, 23.98 tbr, 2997 tbn, 5994 tbc
        Metadata:
          creation_time   : 2011-04-25 22:07:51
          handler_name    : Apple Alias Data Handler
        Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 132 kb/s
        Metadata:
          creation_time   : 2011-04-25 22:07:51
          handler_name    : Apple Alias Data Handler
        Stream #0:2(eng): Data: none (tmcd / 0x64636D74)
        Metadata:
          creation_time   : 2011-04-25 22:07:51
          handler_name    : Apple Alias Data Handler
          timecode        : 00:00:00:00
    Please use -b:a or -b:v, -b is ambiguous
    Unknown encoder 'mp3'