The snippet below extracts the audio track from a video file (for example an MP4), converts it to MP3 and writes it out to a file.
ffmpeg -i "$IN" -vn -acodec mp3 "$OUT"
ffmpeg -i happy_birthday.mp4 -vn -acodec mp3 happy_birthday.mp3