a few months back I wrote a batch (windows batch file .bat) code that fetches some .exe files and use their commands to do different things. e.g encoding audio, video etc...
Now I want the same thing but want to do it in C language.
set var = "Video"
ffmpeg -i %var%.mkv -f wav -| neroAacEnc -ignorelength -lc -q 0.4 -if - -of %var%-Audio.aac
This code works fine in windows batch file (given that I have specified files in the same folder.)
But now I want to do this via C language. Well I know using
system("ffmpeg -i Video.mkv -f wav -| neroAacEnc -ignorelength -lc -q 0.4 -if - -of Video-Audio.aac");
will work for C language, but the drawback is I can't use variable while exploiting ffmpeg's and neroAacEnc's commands / parameters.
So is there anyway to get around it?
(Also, I'm gonna use other .exe files as well like x264.exe and mkvmerge.exe, so i'd appreciate it if someone could tell me how to use external .exe files parameters freely in C language.)