I have a folder mostly containing mp4
videos. I want to extract the audio of those videos.
for i in $(ls); do echo ffmpeg -i $i $i_mp3; done
This command doesn't take any concern for the none mp4 files, and it seems to be adding line breaks in the ls
command.
ffmep
isffmpeg -i video.mp4 -f mp3 -ab 192000 -vn music.mp3
wherevn
is no video andacodec
copy says use the same audio stream that's already in there; from Github – damadam Dec 20 '19 at 08:59sed
command, in order to remove the.mp4
extension on the filename, or your music filename would be for examplemusic.mp4.mp3
– damadam Dec 20 '19 at 09:01