[FFmpeg-user] FFPROBE php excute - Permission denied

Sunil M.S sunil at artificerstechnologies.com
Mon Mar 28 14:53:10 CEST 2016


Hi All,

>>When i try to excute ffprobe in php  using rtsp link, we are
getting  Permission denied.

>>while execute in  command line its working and also it is working with
video file , we are getting issue in rtsp link




>> PHP Script
print_r(extension_loaded('ffmpeg')) or die('Error in loading ffmpeg');

$output1 = shell_exec('ffprobe -i rtsp://
lwsnb160-cam.cs.purdue.edu:554/mpeg4/media.amp  -of json=c=1 -loglevel
quiet -show_format -show_streams -show_error');
echo $output1;
$parsed1 = json_decode($output1, true);
print_r($parsed1);
var_dump($output1);

>>PHP output

{ "error": { "code": -13, "string": "Permission denied" } } Array ( [error]
=> Array ( [code] => -13 [string] => Permission denied ) ) string(64) "{
"error": { "code": -13, "string": "Permission denie


>>ffmpeg output over the command line

[root at dev1 sid]# ffprobe -i rtsp://
lwsnb160-cam.cs.purdue.edu:554/mpeg4/media.amp  -of json=c=1  -show_format
-show_streams -show_error
ffprobe version N-79151-gff982e0 Copyright (c) 2007-2016 the FFmpeg
developers
  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/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. 19.100 / 55. 19.100
  libavcodec     57. 32.100 / 57. 32.100
  libavformat    57. 29.101 / 57. 29.101
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 40.102 /  6. 40.102
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
{
Input #0, rtsp, from 'rtsp://lwsnb160-cam.cs.purdue.edu:554/mpeg4/media.amp
':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.100011, bitrate: N/A
    Stream #0:0: Video: mpeg4 (Advanced Simple Profile), yuv420p, 640x480
[SAR 1:1 DAR 4:3], 100 fps, 100 tbr, 90k tbn, 100 tbc
    "streams": [
        { "index": 0, "codec_name": "mpeg4", "codec_long_name": "MPEG-4
part 2", "profile": "Advanced Simple Profile", "codec_type": "video",
"codec_time_base": "1/100", "codec_tag_string": "[0][0][0][0]",
"codec_tag": "0x0000", "width": 640, "height": 480, "coded_width": 640,
"coded_height": 480, "has_b_frames": 1, "sample_aspect_ratio": "1:1",
"display_aspect_ratio": "4:3", "pix_fmt": "yuv420p", "level": 5,
"chroma_location": "left", "refs": 1, "quarter_sample": "false",
"divx_packed": "false", "r_frame_rate": "100/1", "avg_frame_rate": "100/1",
"time_base": "1/90000", "start_pts": 9001, "start_time": "0.100011",
            "disposition": { "default": 0, "dub": 0, "original": 0,
"comment": 0, "lyrics": 0, "karaoke": 0, "forced": 0, "hearing_impaired":
0, "visual_impaired": 0, "clean_effects": 0, "attached_pic": 0 } }
    ],
    "format": { "filename": "rtsp://
lwsnb160-cam.cs.purdue.edu:554/mpeg4/media.amp", "nb_streams": 1,
"nb_programs": 0, "format_name": "rtsp", "format_long_name": "RTSP input",
"start_time": "0.100011", "probe_score": 100,
        "tags": { "title": "Media Presentation" } }
}


-- 

Thanks and Regards ,



*Sunil M S*




m: +91 9746124001
p : +1 571 327 0044

e : sunil at artificerstechnologies.com

w : www.artificerstechnologies.com


This Artificer's Technologies email, along with any attachments, is
considered confidential or otherwise protected from disclosure.  If you
have received it in error, you are on notice of its status, please notify
us immediately by reply email and delete this email and its attachments
from your system.  Dissemination, distribution or copying of any
erroneously received Artificer's Technologies email, along with any
attachments, use of it for any purpose, or disclosure of its contents to
any person(s) other than the person(s) to whom it was intended is
prohibited. Thank you for your cooperation.


More information about the ffmpeg-user mailing list