Vlc file conversion problem

I am not able to convert mp4 video files to mp3 audio running vlc under manjaro linux. Conversion to ogg format works fine. Conversion to mp3 works when vlc is running under linux mint. How can I fix this?

First make sure you have all tools installed properly by:

sudo pacman -Syu lame ffmpeg

Then apply

ffmpeg -i <input-file.mp4> -vn -acodec libmp3lame -ac 2 -ab 160k -ar 48000 <output-file.mp3>

Certainly, <input-file.mp4> and <output-file.mp3> have to be replaced with the real file names.

Arguments present in the command above:

  • -i: The input file name
  • -vn: Disable video recording
  • -acodec: This forces audio encoding to libmp3lame
  • -ac: Sets the number of audio channels
  • -ar: Sets the audio sampling frequency

Thanks Wollie, if I understan you correctly you are telling me to do the conversion using ffmpeg, but vlc is supposed to do this and in fact it does when run under linux mint. Why will it not work running in Manjoaro linux?

Do you have the necessary tools installed?

lame in particular …

Other than that I cannot help - I’d use ffmpeg, similar to what @Wollie said - I don’t even have vlc installed.

Check you have package libtwolame installed for encoding to mp3
VLC Advanced Settings > Input/Codecs > Audio Codecs
This package is only an optional dependency for VLC and might not have been installed automatically
(But it is a required dependency for Audacity)

Thanks nikgnomic, I do have the libtwolame package installed but the problem persists. When I try to convert to mp3 I just get an empty file with the .mp3 extension and nothing in it.

I checked VLC and I get a blank file when trying to convert to mp3 too
(even with the latest version 3.0.16-8 on Testing branch)

But mp3 conversion works no problem in Audacity (takes about half the time compared to VLC failed attempt) so this is not a problem with twolame encoder

Converting between lossy audio codecs does not give good results.
For best quality, convert audio from compressed format to PCM or WAV first, then convert uncompressed audio to .mp3
Audacity converts imported audio files automatically but other packages may need to decompress audio from one format before compressing to another

Thanks nikgenomic, you have confirmed that this problem is not unique to me. What I am trying to accomplish is to convert mp4 videos to mp3 sound files. What baffles me is that it works perfectly using VLC on linux mint but will not work in manjaro linux. This indicates to me that the problem is somehow unique to this distro.

Linux Mint has an option to install proprietary codecs. Other distributions that are not based on Ubuntu do not include proprietary codecs during install

I suggest you install mediaformat to check the media format of the mp4 file(s)
mp4 containers usually have AAC encoded audio stream, but it could be ALAC lossless, or any other audio format

I also suggest trying an online conversion service like this
MP4 to MP3 | CloudConvert

1 Like