Upon checking out the NSTask tutorial (https://www.raywenderlich.com/1197-nstask-tutorial-for-os-x) I’m second-guessing myself with regard to the direction I’ve taken with my first MacOS app.
Here’s the issue I’m facing. I need to analyze an audio file with ffprobe, and use some of that information to create arguments that I pass to ffmpeg, both of which are going to be located in the main resource bundle of the app so that the user doesn’t have to download and install it themselves.
While I’m sure there is a way to capture the console output from ffprobe, convert it to a string, parse that string, isolate the portion of it I require, convert it back from a string if necessary, and proceed from there in using it to build the arguments I’m passing to ffmpeg, I’m wondering if it’s more efficient to instead write a shell script that will do that, and then run the shell script with NSTask instead of running ffprobe/ffmpeg directly.
Can a shell script even work with command line programs that are in the main resource bundle? How would I go about doing this?