Extract audio from multiple mp4
Hi everybody,
Thanks to the previous messages I was able to succeed in splitting the audio from the video.
However, I needed to automate the steps, as I had a lot of videos to split.
Here's the script that I wrote :
#!/bin/bash
for f in *.mp4; do
./ffmpeg -i "$f" -vn -acodec copy "${f%.mp4}.m4a"
done
For people who aren't so much into scripts, open Terminal, type "Nano"
Paste the script. Type Ctrl + X to close the editor, a prompt asking what to do will appear, save the file with ".sh" suffix.
Assuming you saved it in a convenient folder, navigate to the directory where the script is with the terminal. For example, script being in the Resources folder (mentioned in page 2), type :
cd Desktop/Resources/
Being in the folder, where your script and videos are, you then have to make the script executable; type :
chmod u+x nameofscript.sh
Then you just have to run the script in the same folder of the videos, to do so type :
./nameofthescript.sh
Thanks for the help that you gave me.
Cheers.
Stas