Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Ffprobe error on php exec #7863
Comments
|
Here's a similar case: #7278 |
|
my ffmpeg in /usr/local/bin |
|
and user's shell command running correctly. No problem on shell/shh commands. Problem is in PHP exec command only. |
|
exec("/usr/local/bin/ffprobe -version 2>&1", $output); array(11) { [0]=> string(84) "ffprobe version git-2015-12-13-906c0b7 Copyright (c) 2007-2015 the FFmpeg developers" [1]=> string(54) "built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)" [2]=> string(356) "configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/usr/local/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265" [3]=> string(38) "libavutil 55. 10.100 / 55. 10.100" [4]=> string(38) "libavcodec 57. 17.100 / 57. 17.100" [5]=> string(38) "libavformat 57. 20.100 / 57. 20.100" [6]=> string(38) "libavdevice 57. 0.100 / 57. 0.100" [7]=> string(38) "libavfilter 6. 21.100 / 6. 21.100" [8]=> string(38) "libswscale 4. 0.100 / 4. 0.100" [9]=> string(38) "libswresample 2. 0.101 / 2. 0.101" [10]=> string(38) "libpostproc 54. 0.100 / 54. 0.100" } $url = 'https://www.youtube.com/watch?v=JP4kValjHmw'; $descriptorspec = array( output: {"status":1,"errors":"WARNING: JP4kValjHmw: writing DASH m4a. Only some players support this container. Install ffmpeg or avconv to fix this automatically.\nERROR: ffprobe or avprobe not found. Please install one.\n","url_orginal":"https://www.youtube.com/watch?v=JP4kValjHmw","output":"[youtube] JP4kValjHmw: Downloading webpage\n[youtube] JP4kValjHmw: Downloading video info webpage\n[youtube] JP4kValjHmw: Extracting video information\n[youtube] JP4kValjHmw: Downloading DASH manifest\n[download] Destination: JP4kValjHmw.mp3\n\r[download] 0.0% of 8.48MiB at 66.31KiB/s ETA 02:11\r[download] 0.0% of 8.48MiB at 197.16KiB/s ETA 00:44\r[download] 0.1% of 8.48MiB at 457.19KiB/s ETA 00:18\r[download] 0.2% of 8.48MiB at 973.52KiB/s ETA 00:08\r[download] 0.4% of 8.48MiB at 1.53MiB/s ETA 00:05\r[download] 0.7% of 8.48MiB at 1.74MiB/s ETA 00:04\r[download] 1.5% of 8.48MiB at 2.42MiB/s ETA 00:03\r[download] 2.9% of 8.48MiB at 3.60MiB/s ETA 00:02\r[download] 5.9% of 8.48MiB at 5.05MiB/s ETA 00:01\r[download] 11.8% of 8.48MiB at 7.74MiB/s ETA 00:00\r[download] 23.6% of 8.48MiB at 12.38MiB/s ETA 00:00\r[download] 47.2% of 8.48MiB at 20.48MiB/s ETA 00:00\r[download] 94.4% of 8.48MiB at 28.31MiB/s ETA 00:00\r[download] 100.0% of 8.48MiB at 29.32MiB/s ETA 00:00\r[download] 100% of 8.48MiB in 00:00\n","command":"youtube-dl -4 'https://www.youtube.com/watch?v=JP4kValjHmw' --extract-audio --audio-format mp3 -o '%(id)s.mp3'"} |
|
What's the output of:
If the command listed above fails on PHP, you should either set correct
See Post-Processing options for more information. |
|
exec("ffprobe -version 2>&1", $output); array(11) { [0]=> string(84) "ffprobe version git-2015-12-13-906c0b7 Copyright (c) 2007-2015 the FFmpeg developers" [1]=> string(54) "built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)" [2]=> string(356) "configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/usr/local/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265" [3]=> string(38) "libavutil 55. 10.100 / 55. 10.100" [4]=> string(38) "libavcodec 57. 17.100 / 57. 17.100" [5]=> string(38) "libavformat 57. 20.100 / 57. 20.100" [6]=> string(38) "libavdevice 57. 0.100 / 57. 0.100" [7]=> string(38) "libavfilter 6. 21.100 / 6. 21.100" [8]=> string(38) "libswscale 4. 0.100 / 4. 0.100" [9]=> string(38) "libswresample 2. 0.101 / 2. 0.101" [10]=> string(38) "libpostproc 54. 0.100 / 54. 0.100" } |
|
Yesssss! Finally! exec ("youtube-dl -4 " . escapeshellarg($url) . " --extract-audio --audio-format mp3 -o " . resolved my problem. Thank you very much. Best wishes from Turkey. |
|
Glad to see it's solved. Closing. |
ffprobe or avprobe not found
Php command: exec('youtube-dl -4 https://www.youtube.com/watch?v=JP4kValjHmw --extract-audio --audio-format mp3 -o deneme.mp3');
Same with shell_exec.
But no problem in user or root ssh.
Ffmpeg, youtube-dl, ffprobe, libav-tools installed.
ffprobe not found problem is in PHP exec/shell_exec only.
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-16)
configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/usr/local/bin --pkg-config-flags=--static --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
libavutil 55. 10.100 / 55. 10.100
libavcodec 57. 17.100 / 57. 17.100
libavformat 57. 20.100 / 57. 20.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 21.100 / 6. 21.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Simple multimedia streams analyzer
usage: ffprobe [OPTIONS] [INPUT_FILE]
You have to specify one input file.
Use -h to get full help or, even better, run 'man ffprobe'.