Leap 42.1 cannot convert flac to mp3

Hi,
It seems I cannot convert any music files (ex. flac) to mp3 with any app available; I tried WinFF, gnac and Curlew.
All gives the error "Unknown encoder ‘libmp3lame’ "

I checked very carefully to have all the suggested packages from here: https://forums.opensuse.org/entry.php/174-openSUSE-Leap-42-2-Multimedia-Guide
with all packages mentioned there installed from Pacman repository.
Okay, I have the “standard” VLC (2.2.4) and not the new/beta (3.x) but other from that I do have all those packages installed in my system.

And I still have the above error when trying to convert a flac to mp3 (I suppose this happens when converting any other music format to mp3, actually).

Does anybody else have the same problem ?

Am I still missing anything ?

https://software.opensuse.org/package/soundkonverter
It works like a charm.

The easiest way to convert something to mp3 is with the lame application. I believe that’s in the Pacman repository. The CLI command is something like this:

lame whatever.wav whatever.mp3

If you try this, what do kind of error do you get? If another application gives you an error, can you attach a screenshot of it?


ffmpeg -i file.flac file.mp3

Make sure the codecs are from the Packman repo.

If I try to convert an WAV file to mp3, using command line like lame file.wav file.mp3, it’s working good (no error; completes 100%).

Trying something like
ffmpeg -i file.flac file.mp3

gives this error message:
<<Automatic encoder selection failed for output stream #0:1. Default encoder for format mp3 (codec mp3) is probably disabled or this build of ffmpeg does not include that codec. Please choose an encoder manually.
Error selecting an encoder for stream 0:1>>

So, am I to expect that my ffmpeg package does not have any sort of mp3 codec included ?
But it IS installed from pacman repo (I just double checked this a few seconds ago, just to be sure before writing this – I have ffmpeg-3.2-6.1 in my system). Also, just about every codec and/or multimedia package related to mp3 is installed from Pacman repo.

Soundkonverter from the suggested link (thanks, @ezio84) worked indeed.

Now, that my initial issue (converting those files) was addressed by Soundkonverter, Id’ like to solve lame/ffmpeg issue as well.
So, can anyone else confirm that ffmpeg does it’s job OK when trying similar convertion ? (flac → mp3)
I mean, may ffmpeg from Pacman be flawed and not have the actual mp3 codec included in it ?

Or … may WinFF, gnac, ffmpeg and others use gstream-fluendo-mp3 instead of old line gstream-0_10-fluendo-mp3 ?
gstream-0_10-fluendo-mp3 does have a Pacman “edition”
But gstream-fluendo-mp3 does not (it’s only in the main/standard repo).
If so (using gstream’s new line, vers. 1.x and not the older gstream 0.10x) it may be some cause for this.

The following command should be run after adding the Packman repository (where “packman” is the alias of the Packman repo):

zypper dup --from packman

If you did not do this, this would cause the issues that you’ve described.

Glad soundkonverter works for you too, i like it also for the ReplayGain built-in tool.

Btw i’ve tried now with the ffmpeg command you described, it seems working well on my installation:

ffmpeg -i 2L-125_stereo-176k-24b_04.flac aa.mp3
ffmpeg version 3.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8 (SUSE Linux)
  configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fs
tack-protector -funwind-tables -fasynchronous-unwind-tables -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchron
ous-unwind-tables -g' --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-gpl --disable-openssl --enable-avresample --enable-libcdio --enable-gnutls 
--enable-ladspa --enable-libass --enable-libbluray --enable-libcelt --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libopenjpeg --enable-libopus --enable-libp
ulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-netcdf --enable-vaapi --enable-vdpau --enable-libfdk_aac --enabl
e-nonfree --enable-libmp3lame --enable-libtwolame --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_
SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
 -fasynchronous-unwind-tables -g' --disable-htmlpages --enable-pic --disable-stripping --enable-shared --disable-static --enable-runtime-cpudetect --enable-gpl --disable-openssl --enable-avres
ample --enable-libcdio --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcelt --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-lib
openjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libwebp --enable-netcdf --enable-pic --ena
ble-pthreads --enable-vaapi --enable-vdpau --enable-libfdk_aac --enable-nonfree --enable-libmp3lame --enable-libtwolame --enable-libx264 --enable-libx265 --enable-libxvid --enable-x11grab
  libavutil      55. 34.100 / 55. 34.100
  libavcodec     57. 64.100 / 57. 48.101
  libavformat    57. 56.100 / 57. 56.100
  libavdevice    57.  1.100 / 57.  1.100
  libavfilter     6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale      4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc    54.  1.100 / 54.  1.100
Input #0, flac, from '2L-125_stereo-176k-24b_04.flac':
  Metadata:
    ALBUM           : REFLECTIONS
    album_artist    : TrondheimSolistene
    ARTIST          : TrondheimSolistene
    BARCODE         : 7041888521525
    CATALOGNUMBER   : 7041888521525
    COMMENT         : Generated by Merging Technologies Album Publishing
                    : Label Code: 2L
    COMPOSER        : Benjamin Britten
    DATE            : 2016
    disc            : 1
    ENCODEDBY       : Merging Technologies Album Publishing
    GENRE           : Classical
    ISRC            : NOMPP1603040
    LABEL           : 2L
    TITLE           : Frank Bridge Variations: 4. Romance
    track           : 4
    TRACKTOTAL      : 22
  Duration: 00:01:37.76, start: 0.000000, bitrate: 3987 kb/s
    Stream #0:0: Audio: flac, 176400 Hz, stereo, s32 (24 bit)
    Stream #0:1: Video: mjpeg, yuvj444p(pc, bt470bg/unknown/unknown), 1200x1200, 90k tbr, 90k tbn, 90k tbc
    Metadata:
      comment         : Cover (front)
      title           : Front Cover
**[swscaler @ 0x2228120] **deprecated pixel format used, make sure you did set range correctly
**[mp3 @ 0x21f1600] **Frame rate very high for a muxer not efficiently supporting it.                                                                                                               
Please consider specifying a lower framerate, a different muxer or -vsync 2                                                                                                                     
Output #0, mp3, to 'aa.mp3':
  Metadata:
    TALB            : REFLECTIONS
    TPE2            : TrondheimSolistene
    TPE1            : TrondheimSolistene
    BARCODE         : 7041888521525
    CATALOGNUMBER   : 7041888521525
    COMMENT         : Generated by Merging Technologies Album Publishing
                    : Label Code: 2L
    TCOM            : Benjamin Britten
    TDRC            : 2016
    TPOS            : 1
    ENCODEDBY       : Merging Technologies Album Publishing
    TCON            : Classical
    ISRC            : NOMPP1603040
    LABEL           : 2L
    TIT2            : Frank Bridge Variations: 4. Romance
    TRCK            : 4
    TRACKTOTAL      : 22
    TSSE            : Lavf57.56.100
    Stream #0:0: Video: png, rgb24, 1200x1200, q=2-31, 200 kb/s, 90k fps, 90k tbn, 90k tbc
    Metadata:
      comment         : Cover (front)
      title           : Front Cover
      encoder         : Lavc57.64.100 png
    Stream #0:1: Audio: mp3 (libmp3lame), 48000 Hz, stereo, s32p (24 bit)
    Metadata:
      encoder         : Lavc57.64.100 libmp3lame
Stream mapping:
  Stream #0:1 -> #0:0 (mjpeg (native) -> png (native))
  Stream #0:0 -> #0:1 (flac (native) -> mp3 (libmp3lame))
Press [q] to stop, ?] for help
frame=    1 fps=0.2 q=-0.0 Lsize=    4709kB time=00:01:37.96 bitrate= 393.7kbits/s speed=21.7x     
video:3180kB audio:1528kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.016222%


At the moment i have ffmpeg 3.2-6.1 x86_64 from Pacman and both gstreamer-fluendo-mp3 and gstreamer-0_10-fluendo-mp3 (both v21-2.1 from the default opensuse update repo).

+1

AK

P.S.

The gstreamer-fluendo packages are completely irrelevant for encoding via ffmpeg (firstly they are _de_coders, not encoders, and secondly ffmpeg does not use any gstreamer stuff).

Well, it turned out that I wasn’t actually very-very thorough in my check: package libavcodec57 was the only one that was still from main repo instead of Pacman.
After installing the pacman version of libavcodec57, ffmpeg started to work for me, too, when converting into mp3.

Thanks everyone.

So, problem solved.

P.S. Sorry for the misleading title, either – only now I see I used version Leap 42.1 in the title of the thread, despite I am using and was referring to Leap 42.2

There no need to check “manually” if you have packages from Packman or not. You only have to do “the switch to Packman” as many people above tried to tell you time and again. When you did that switch (or if you are not 1000% sure after you installed new multimedia stuff, repeat it again), there is no need for extra checking.