For eg: I am executing a shell command:
"ffmpeg -i input.flv -ss 00:00:14.435 -vframes 1 out.png"
This depends on your current working directory. Generally speaking giving absolute paths is better as they are not ambiguous.
If your path is relative to your working directory (where you call the PHP script) it will work. However sometimes in production that value changes, leading to weird errors. If you can generate an absolute path somehow (e.g. through
realpath()) it is preferred.