Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: cannot convert to mp3 by ffmpeg

  1. #1
    Join Date
    May 2009
    Location
    Mumbai, India
    Beans
    491
    Distro
    Ubuntu 11.04 Natty Narwhal

    cannot convert to mp3 by ffmpeg

    i cannot convert to mp3 using ffmpeg. when i do:

    Code:
    ffmpeg -i input.flac -acodec mp3 output.mp3
    i get:
    Code:
    Unknown encoder 'mp3'
    at the end the media info.

    what codecs should i install? basically, this is linux mint so i guess everything should have been installed by default...
    There and back again...

  2. #2
    Join Date
    Mar 2010
    Location
    France
    Beans
    Hidden!
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: cannot convert to mp3 by ffmpeg

    Hi!
    You do not have to specify -acodec mp3, ffmpeg uses the output filename to choose the appropropriate codec.
    Pause Hi-Tech, Tech tips tor the non-geek!
    Twitter

  3. #3
    Join Date
    May 2009
    Location
    Mumbai, India
    Beans
    491
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: cannot convert to mp3 by ffmpeg

    I did:
    Code:
    ffmpeg -i loop.flac loop.mp3
    i get this output:
    Code:
    ffmpeg -i loop.flac loop.mp3
    FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
      configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --enable-shared --disable-static
      libavutil     49.15. 0 / 49.15. 0
      libavcodec    52.20. 0 / 52.20. 0
      libavformat   52.31. 0 / 52.31. 0
      libavdevice   52. 1. 0 / 52. 1. 0
      libavfilter    0. 4. 0 /  0. 4. 0
      libswscale     0. 7. 1 /  0. 7. 1
      libpostproc   51. 2. 0 / 51. 2. 0
      built on Oct 13 2009 22:15:16, gcc: 4.4.1
    Input #0, flac, from 'loop.flac':
      Duration: N/A, bitrate: N/A
        Stream #0.0: Audio: flac, 44100 Hz, stereo, s16
    Output #0, mp3, to 'loop.mp3':
        Stream #0.0: Audio: 0x0000, 44100 Hz, stereo, s16, 64 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
    Unsupported codec for output stream #0.0
    There and back again...

  4. #4
    Join Date
    Mar 2010
    Location
    France
    Beans
    Hidden!
    Distro
    Kubuntu 9.10 Karmic Koala

    Re: cannot convert to mp3 by ffmpeg

    Does activating the Medibuntu repository and dist-upgrade does any help?
    Pause Hi-Tech, Tech tips tor the non-geek!
    Twitter

  5. #5
    Join Date
    May 2009
    Location
    Mumbai, India
    Beans
    491
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: cannot convert to mp3 by ffmpeg

    I already have medibuntu enabled..
    There and back again...

  6. #6
    Join Date
    Dec 2006
    Beans
    7,349

    Re: cannot convert to mp3 by ffmpeg

    Hi rahilm,

    Some encoders are disabled in Ubuntu because of licensing issues. To enable mp3 encoding, and a few others, have a look at this page:

    HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoding in FFmpeg
    http://ubuntuforums.org/showthread.php?t=1117283

    After you have followed the steps recommended by this guide you may find that if you are using Karmic Koala and you wish to specify the mp3 encoder, and possibly add a few options, you will need to use -acodec libmp3lame, rather than -acodec mp3, followed by the options of your choice...

    All the best,

    Andrew
    You think that's air you're breathing now?

  7. #7
    Join Date
    Nov 2009
    Beans
    16

    Re: cannot convert to mp3 by ffmpeg

    On Mint mp3 should be supported out of the box I believe. But as andrew pointed out, try 'libmp3lame' as the codec, as this is the correct name in the new ffmpeg syntax. To see which codecs are supported in your version of ffmpeg type:
    Code:
    ffmpeg -codecs
    Good luck

  8. #8
    Join Date
    May 2009
    Location
    Mumbai, India
    Beans
    491
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: cannot convert to mp3 by ffmpeg

    Quote Originally Posted by MoarningSun View Post
    On Mint mp3 should be supported out of the box I believe. But as andrew pointed out, try 'libmp3lame' as the codec, as this is the correct name in the new ffmpeg syntax. To see which codecs are supported in your version of ffmpeg type:
    Code:
    ffmpeg -codecs
    Good luck
    Code:
    ffmpeg -codecs
    FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
      configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --enable-shared --disable-static
      libavutil     49.15. 0 / 49.15. 0
      libavcodec    52.20. 0 / 52.20. 0
      libavformat   52.31. 0 / 52.31. 0
      libavdevice   52. 1. 0 / 52. 1. 0
      libavfilter    0. 4. 0 /  0. 4. 0
      libswscale     0. 7. 1 /  0. 7. 1
      libpostproc   51. 2. 0 / 51. 2. 0
      built on Oct 13 2009 22:15:16, gcc: 4.4.1
    ffmpeg: missing argument for option '-codecs'
    There and back again...

  9. #9
    Join Date
    Sep 2006
    Beans
    3,713

    Re: cannot convert to mp3 by ffmpeg

    Quote Originally Posted by rahilm View Post
    Code:
    ffmpeg -codecs
    FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
      configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --enable-shared --disable-static
      libavutil     49.15. 0 / 49.15. 0
      libavcodec    52.20. 0 / 52.20. 0
      libavformat   52.31. 0 / 52.31. 0
      libavdevice   52. 1. 0 / 52. 1. 0
      libavfilter    0. 4. 0 /  0. 4. 0
      libswscale     0. 7. 1 /  0. 7. 1
      libpostproc   51. 2. 0 / 51. 2. 0
      built on Oct 13 2009 22:15:16, gcc: 4.4.1
    ffmpeg: missing argument for option '-codecs'
    FFmpeg option names change once in a while. FFmpeg from the Ubuntu repository lists available codecs with ffmpeg -formats.

  10. #10
    Join Date
    May 2009
    Location
    Mumbai, India
    Beans
    491
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: cannot convert to mp3 by ffmpeg

    I am trying to find if i am missing any dependencies..
    Last edited by rahilm; March 23rd, 2010 at 06:16 PM.
    There and back again...

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •