single-use script for repeating ffmpeg on files
Hey guys. I'm in this summer history class and have to make this presentation thing, so I'm adding music I got from downloading off youtube with youtube-dl.
However, I have better things to do than ffmpeg, wait for the video to convert, then ffmpeg again to get the sound off. Like actual research for the project.
I'm a noob to this shell scripting thing, and I thought it was going to be sort of like batch, but as much as I look at all the "How to shell script" tutorials for noobs, it's like you're programming something.
which is cool, but I kind of just wanted to have it execute commands just like a terminal, only I don't have to sit around and watch it in the corner of my eye, it'll just keep going through all the files and when I'm finished editing, all the music and videos I want to embed in my presentation will be there.
Clearly, I'm doing this wrong, since I'm getting all sorts of errors like "-i: command not found" (well of course not, it's an option) and it's also trying to treat files as commands in errors like "from-me-to-you.mp3: command not found".
so do I actually need to learn how to program something? Or is there a different, smarter way to just feed a terminal a list of commands and say "do this while I go read my textbook"?
$ffmpeg-i 2Cfz33QIsdY.webm 2Cfz33QIsdY.mpg
$ffmpeg-i 2Cfz33QIsdY.mpg -vn -ar 44100 -ac 2 -ab 192 -f mp3 bobbys-girl.mp3
$mv bobbys-girl.mp3 /home/nicholas/Documents/survey_american_history/bobbys-girl.mp3
$ffmpeg-i 23UkIkwy5ZM.webm 23UkIkwy5ZM.mpg
$ffmpeg-i 23UkIkwy5ZM.mpg -vn -ar 44100 -ac 2 -ab 192 -f mp3 baby-love.mp3
$mv baby-love.mp3 /home/nicholas/Documents/survey_american_history/baby-love.mp3
$ffmpeg -i 68i4tMmv9F4.webm 68i4tMmv9F4.mpg
$ffmpeg -i 68i4tMmv9F4.mpg -vn -ar 44100 -ac 2 -ab 192 -f mp3 black-and-white.mp3
$mv black-and-white.mp3 /home/nicholas/Documents/survey_american_history/black-and-white.mp3
$ffmpeg-i cTBx-hHf4BE.webm cTBx-hHf4BE.mpg
$ffmpeg-i cTBx-hHf4BE.mpg -vn -ar 44100 -ac 2 -ab 192 -f mp3 one-tin-soldier.mp3
$mv one-tin-soldier.mp3 /home/nicholas/Documents/survey_american_history/one-tin-soldier.mp3
#and so on and so forth... this goes on for a while with a bunch of vids.