Why does -c:a copy fail when I save as .mp3?
Copy keeps the codec. An MP4 almost always holds AAC, and an .mp3 file can only hold MP3.
ffmpeg -i in.mp4 -vn -c:a copy out.mp3Fails with Invalid audio stream. Exactly one MP3 audio stream is required. and leaves a 0-byte out.mp3 behind.
Read the codec first, then pick the extension: .m4a for AAC, .ac3 for AC-3, .mka for anything. Or re-encode to MP3.
ffprobe -v error -select_streams a -show_entries stream=codec_name -of csv=p=0 in.mp4aac, so the copy goes into .m4a.



