Actually, on closer inspection the use of which confuses me. What is the point of resolving the executable to its full path before calling it? All which does is resolve an executable to its full path using the PATH environment variable. Wouldn't it make much more sense to just try to call avconv (or ffmpeg) and check whether the expected output file was created?