I am using VLC for extracting/converting audio from a .mp4 video to a .mp3.
The screenshot below shows the menu option I am choosing enter image description here and then enter image description here

My question is, how do I do this using the command line?


This works:

cvlc INFILE --no-sout-video --sout-audio --sout="#transcode{acodec=mp3,ab=320,channels=2,samplerate=48000}:std{access=file,mux=raw,dst=OUTFILE.mp3}"


  • acodec - audio codec
  • ab - audio bitrate

The only problem when I try it is that cvlc does not exit after finishing the transcode. I don't know why. I have to use CTRL+C when the size of the output file does not change anymore.




  • Will this work on MacOS? – A j Jul 27 '19 at 11:24
  • Good question. I admit I tested it only on Linux, but the syntax should be the same. Why don't you just give it a try? Have a look at the macOS section here: wiki.videolan.org/Command-line_interface – synouser Jul 27 '19 at 11:47
  • 1
    I tried it and it works, MasOS does not seem to have cvlc, I tried VLC and kept the rest of the line as you provided. I got the following message 'VLC[6306:1015241] Can't find app with identifier com.spotify.client', but the mp3 is created and works fine. – A j Jul 27 '19 at 11:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.