I want to convert a whole folder of mp4 files to mp3. But I have no idea how to do that? But I want to keep the thumbnail. Can anyone help me?


1 Answer 1


You don't need to do this in three steps:

ffmpeg -vn -sn -dn -i input.mp4 -codec:a libmp3lame -qscale:a 4 output.mp3

This creates a MP3 file with a VBR (variable bit rate) of 165. Check here for more options.

Arguments (beware, the order matters!):

  • -vn disables all video-streams from the input
  • -sn disables all subtitle-streams from the input
  • -dn disables all data-streams from the input
  • -i specifies the input file
  • -codec:a libmp3lame specifies the encoder
  • -qscale:a 4 specifies the quality target for libmp3lame
  • The last argument is the output-file. Note that the file-extension might be used to infer additional information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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