Hi guys,
I have ffmpeg executable file in a folder on my document_root. When I try to execute it from other place different from the folder where it is installed it can not be found.
Do you know how to execute an executable file(In this case ffmpeg) from another directory?
Exec and ffmpeg
Moderator: General Moderators
Re: Exec and ffmpeg
$_SERVER['DOCUMENT_ROOT'] contains the name of this directory. see http://www.php.net/manual/en/reserved.variables.phpuser___ wrote:I have ffmpeg executable file in a folder on my document_root.
Reply
Thank you, volka. I have read the info but I do not know how to start this ffmpeg from another directory.
Now the root looks like these:
C:/www/#The root
C:/www/movie_maker/executables/ffmpeg.exe#ffmpeg's location
C:/www/mySite/make_movie.php#Where I call it from.
Can you drop me a line with the exec() command in the above situation to see whether it will start working.
Now the root looks like these:
C:/www/#The root
C:/www/movie_maker/executables/ffmpeg.exe#ffmpeg's location
C:/www/mySite/make_movie.php#Where I call it from.
Can you drop me a line with the exec() command in the above situation to see whether it will start working.
- dibyendrah
- Forum Contributor
- Posts: 491
- Joined: Wed Oct 19, 2005 5:14 am
- Location: Nepal
- Contact:
Re: Reply
Follow the following statements:user___ wrote:Thank you, volka. I have read the info but I do not know how to start this ffmpeg from another directory.
Now the root looks like these:
C:/www/#The root
C:/www/movie_maker/executables/ffmpeg.exe#ffmpeg's location
C:/www/mySite/make_movie.php#Where I call it from.
Can you drop me a line with the exec() command in the above situation to see whether it will start working.
Code: Select all
$path_to_ffmpeg = "movie_maker/executables/ffmpeg.exe"
$cmd = $_SERVER['DOCUMENT_ROOT']."/".$path_to_ffmpeg;