Based off of this article.
Assuming you have ffmpeg and lame installed, run the following command:
ffmpeg -i input.mp4 -vn -acodec libmp3lame -ac 2 -ab 160k -ar 48000 output.mp3Here’s a breakdown of each instruction from the article:
-i input.mp4specifies the input file-vndisables the video stream (we only want audio)-acodec libmp3lameforces the LAME MP3 encoder-ac 2sets stereo output (2 channels)-ab 160ksets the bitrate to 160kbps (good balance of quality and size)-ar 48000sets the sample rate to 48kHz