A recorded talk or a concert clip often works fine as audio only. I don’t want to re-encode it, because that costs quality and time for nothing.
ffmpeg -i talk.mp4 -vn -c:a copy talk.m4a
-vn leaves the video out and -c:a copy copies the audio stream exactly as it is stored. So you get the original quality and it’s done in seconds.
The extension matters here. With copy, the audio keeps its codec, so the container has to support it. Most MP4 files carry AAC, which fits in .m4a. Opus from a WebM file belongs in .opus or .ogg, and AC-3 from a film can go in .mka. If you’re not sure what’s inside, ask first:
ffprobe -v error -select_streams a -show_entries stream=codec_name -of csv=p=0 talk.mp4
When you really want an MP3, for an old car stereo for example, you have to re-encode, and then copy is out: -vn -c:a libmp3lame -q:a 2 talk.mp3 gives a good variable bitrate. And with several audio tracks, ffmpeg picks one by itself, so add -map 0:a:1 to choose the second one.
Further reading: ffmpeg documentation, ffprobe documentation