You are not logged in.

#1 2014-10-20 16:23:15

ThElitEyeS
Banned
Registered: 2014-03-25
Posts: 129

ffmpeg ERROR: audio conversion failed: Unknown encoder 'libmp3la

While i use youtube-dl script with -x --audio-format mp3 option i get this error:
ERROR: audio conversion failed: Unknown encoder 'libmp3lame'

[bahaa@Bahaa ~]$ pacman -Qs lame
local/lame 3.99.5-2
    A high quality MPEG Audio Layer III (MP3) encoder
local/twolame 0.3.13-7
    An optimized MPEG Audio Layer 2 (MP2) encoder
[bahaa@Bahaa ~]$ 

Offline

#2 2014-10-20 22:16:07

DrZaius
Member
Registered: 2008-01-02
Posts: 193

Re: ffmpeg ERROR: audio conversion failed: Unknown encoder 'libmp3la

Works here. Do you have ffmpeg installed? ffmpeg is an optional dependency for youtube-dl, but it may be required for what you're trying to do.

If ffmpeg is installed, and if the issue is still there, then show the complete output of the "ffmpeg" command.

Last edited by DrZaius (2014-10-20 22:18:29)

Offline

#3 2014-10-21 03:11:22

ThElitEyeS
Banned
Registered: 2014-03-25
Posts: 129

Re: ffmpeg ERROR: audio conversion failed: Unknown encoder 'libmp3la

Sure I have it, I have tried ffmeg-git, ffmpeg-full and ffmpeg-full-extra and nothing happened

Offline

#4 2014-10-21 03:12:08

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: ffmpeg ERROR: audio conversion failed: Unknown encoder 'libmp3la

DrZaius wrote:

If ffmpeg is installed, and if the issue is still there, then show the complete output of the "ffmpeg" command.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2014-10-21 15:37:19

aditya3098
Member
From: In front of the computer
Registered: 2014-05-01
Posts: 53
Website

Re: ffmpeg ERROR: audio conversion failed: Unknown encoder 'libmp3la

Try:

sudo pacman -R lame twolame
sudo pacman -S lame twolame

Last edited by aditya3098 (2014-10-21 15:38:12)

Offline

#6 2014-10-21 15:38:03

ThElitEyeS
Banned
Registered: 2014-03-25
Posts: 129

Re: ffmpeg ERROR: audio conversion failed: Unknown encoder 'libmp3la

jasonwryan wrote:
DrZaius wrote:

If ffmpeg is installed, and if the issue is still there, then show the complete output of the "ffmpeg" command.

[bahaa@Bahaa ~]$ ffmpeg
ffmpeg version N-66269-g5eef704 Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 14 2014 16:02:01 with gcc 4.9.1 (GCC)
  configuration: 
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  4.101 / 56.  4.101
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  1.100 /  5.  1.100
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'
[bahaa@Bahaa ~]$ 

Offline

#7 2014-10-21 15:38:54

ThElitEyeS
Banned
Registered: 2014-03-25
Posts: 129

Re: ffmpeg ERROR: audio conversion failed: Unknown encoder 'libmp3la

aditya3098 wrote:

Try:

sudo pacman -R lame twolame
sudo pacman -S lame twolame

I'll give it a try

Edit: No luck at all I have tried it.

Last edited by ThElitEyeS (2014-10-21 16:21:27)

Offline

#8 2014-10-21 17:36:20

teckk
Member
Registered: 2013-02-21
Posts: 518

Re: ffmpeg ERROR: audio conversion failed: Unknown encoder 'libmp3la

If you are trying to dump the audio from a youtube video with ffmpeg, and encode it to .mp3, troubleshoot what isn't working the way you wish.

Start by seeing if youtube-dl is working.
You can get the formats the video is available in with:

youtube-dl -F http://www.youtube.com/watch?v=123456789

You can usually get audio only using

youtube-dl -f 140 http://www.youtube.com/watch?v=123456789

That will be .aac or .m4a audio
You can leave it like that or to reencode to .mp3

Check if ffmpeg is working.

ffmpeg -i file.m4a -c:a libmp3lame -b:a 128k Oufile.mp3

Or if you have a video file that you want to dump the audio from into .mp3

ffmpeg -i file.mp4 -vn -c:a libmp3lame -b:a 128k Outfile.mp3

If you get an error about lame then check if lame is installed

pacman -Ss lame

Post if ffmpeg works ok for you.

Offline

#9 2014-10-21 18:42:27

ThElitEyeS
Banned
Registered: 2014-03-25
Posts: 129

Re: ffmpeg ERROR: audio conversion failed: Unknown encoder 'libmp3la

teckk wrote:

If you are trying to dump the audio from a youtube video with ffmpeg, and encode it to .mp3, troubleshoot what isn't working the way you wish.

Start by seeing if youtube-dl is working.
You can get the formats the video is available in with:

youtube-dl -F http://www.youtube.com/watch?v=123456789

You can usually get audio only using

youtube-dl -f 140 http://www.youtube.com/watch?v=123456789

That will be .aac or .m4a audio
You can leave it like that or to reencode to .mp3

Check if ffmpeg is working.

ffmpeg -i file.m4a -c:a libmp3lame -b:a 128k Oufile.mp3

Or if you have a video file that you want to dump the audio from into .mp3

ffmpeg -i file.mp4 -vn -c:a libmp3lame -b:a 128k Outfile.mp3

If you get an error about lame then check if lame is installed

pacman -Ss lame

Post if ffmpeg works ok for you.

[bahaa@Bahaa ~]$ youtube-dl -F https://www.youtube.com/watch?v=MzjOPtInf1c
[youtube] Setting language
[bahaa@Bahaa ~]$ youtube-dl https://www.youtube.com/watch?v=MzjOPtInf1c
[youtube] Setting language
[youtube] Confirming age
[youtube] MzjOPtInf1c: Downloading webpage
[youtube] MzjOPtInf1c: Downloading video info webpage
[youtube] MzjOPtInf1c: Extracting video information
[download] Destination: Why Do We Blink-MzjOPtInf1c.mp4
[download] 100% of 36.64MiB in 00:49
[bahaa@Bahaa ~]$ ffmpeg -i Why\ Do\ We\ Blink-MzjOPtInf1c.mp4 -vn -c:a libmp3lame -b:a 128k Outfile.mp3
ffmpeg version N-66269-g5eef704 Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 14 2014 16:02:01 with gcc 4.9.1 (GCC)
  configuration: 
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  4.101 / 56.  4.101
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  1.100 /  5.  1.100
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Why Do We Blink-MzjOPtInf1c.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2014-10-17 18:20:58
  Duration: 00:02:51.34, start: 0.000000, bitrate: 1793 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1599 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      creation_time   : 2014-10-17 18:20:59
      handler_name    : IsoMedia File Produced by Google, 5-11-2011
Unknown encoder 'libmp3lame'
[bahaa@Bahaa ~]$ pacman -Ss lame
extra/lame 3.99.5-2 [installed]
    A high quality MPEG Audio Layer III (MP3) encoder
community/flam3 3.0.1-4
    Tools to create/display fractal flames: algorithmically generated images and animations
community/toolame 02l-10
    An optimized mpeg 1/2 layer 2 audio encoder
community/twolame 0.3.13-7 [installed]
    An optimized MPEG Audio Layer 2 (MP2) encoder
[bahaa@Bahaa ~]$ 

Offline

#10 2014-10-21 19:14:39

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: ffmpeg ERROR: audio conversion failed: Unknown encoder 'libmp3la

ffmpeg version N-66269-g5eef704 Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 14 2014 16:02:01 with gcc 4.9.1 (GCC)

What is that version?  Did you build your own ffmpeg?  Perhaps it needs a rebuild against the new libs.  Here's mine from the repos:

ffmpeg version 2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
  built on Oct 15 2014 10:59:16 with gcc 4.9.1 (GCC) 20140903 (prerelease)

And, FWIW, I just tried the same commands on the same video that just failed for you - it worked fine for me.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#11 2014-10-21 19:30:28

ThElitEyeS
Banned
Registered: 2014-03-25
Posts: 129

Re: ffmpeg ERROR: audio conversion failed: Unknown encoder 'libmp3la

Trilby wrote:
ffmpeg version N-66269-g5eef704 Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 14 2014 16:02:01 with gcc 4.9.1 (GCC)

What is that version?  Did you build your own ffmpeg?  Perhaps it needs a rebuild against the new libs.  Here's mine from the repos:

ffmpeg version 2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
  built on Oct 15 2014 10:59:16 with gcc 4.9.1 (GCC) 20140903 (prerelease)

And, FWIW, I just tried the same commands on the same video that just failed for you - it worked fine for me.

can you give me the repos and your configuration options ?, I have installed ffmpeg-full-extra from aur

Offline

#12 2014-10-21 20:05:25

ThElitEyeS
Banned
Registered: 2014-03-25
Posts: 129

Re: ffmpeg ERROR: audio conversion failed: Unknown encoder 'libmp3la

ThElitEyeS wrote:
Trilby wrote:
ffmpeg version N-66269-g5eef704 Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 14 2014 16:02:01 with gcc 4.9.1 (GCC)

What is that version?  Did you build your own ffmpeg?  Perhaps it needs a rebuild against the new libs.  Here's mine from the repos:

ffmpeg version 2.4.2 Copyright (c) 2000-2014 the FFmpeg developers
  built on Oct 15 2014 10:59:16 with gcc 4.9.1 (GCC) 20140903 (prerelease)

And, FWIW, I just tried the same commands on the same video that just failed for you - it worked fine for me.

can you give me the repos and your configuration options ?, I have installed ffmpeg-full-extra from aur

[root@Bahaa ffmpeg]# ffmpeg
ffmpeg version N-67069-g17702f1 Copyright (c) 2000-2014 the FFmpeg developers
  built on Oct 21 2014 22:48:02 with gcc 4.9.1 (GCC) 20140903 (prerelease)
  configuration: --enable-libmp3lame --enable-libtwolame
  libavutil      54. 10.100 / 54. 10.100
  libavcodec     56.  8.102 / 56.  8.102
  libavformat    56.  9.101 / 56.  9.101
  libavdevice    56.  1.100 / 56.  1.100
  libavfilter     5.  2.100 /  5.  2.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'
[root@Bahaa ffmpeg]# 

it works like that, do I need more configuration options ?

Offline

#13 2014-10-21 21:53:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: ffmpeg ERROR: audio conversion failed: Unknown encoder 'libmp3la

ThElitEyeS wrote:

can you give me the repos and your configuration options ?

Huh? ffmpeg is in [extra]


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#14 2014-10-22 20:16:39

DrZaius
Member
Registered: 2008-01-02
Posts: 193

Re: ffmpeg ERROR: audio conversion failed: Unknown encoder 'libmp3la

Why are you using ffmpeg packages from AUR? Also I don't think any of the AUR package provide ffmpeg with a blank configure. ffmpeg from extra is kept up-to-date, more so than any other distro, and should suffice for the vast majority of users. If you must make changes, use ABS instead.

Your first ffmpeg output has been configured with no configure options, but you need --enable-libmp3lame to encode MP3 audio (libshine is a fixed-point encoder, such as for some ARM architecture I guess, and libtwolame is a MP2 audio encoder).

Your second ffmpeg output shown in this thread may work, but again, why not just use ffmpeg from extra?

Last edited by DrZaius (2014-10-22 20:17:48)

Offline

Board footer

Powered by FluxBB