I'm using incron
to watch a folder and each time a file is uploaded to it a Symfony2 command is executed to encode a video and store it in my application.
The encoding is made through shell scripts using ffmpeg
. It works fine when I use the command in cli (php app/console ...) but when the same command is called from incron, it's like ffmpeg
won't work.
Do you have any idea why the scripts would behave differently when the same command is used?
shell_exec("/absolute/path/to/script.sh /absolute/path/to/file1.avi /absolute/path/to/file2.avi /absolute/path/to/output/output.avi");
Thanks in advance !
I found the answer myself, I had to put every single path used in the process in absolute. Hope this will be useful to someone else ! Thanks !