Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7046571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:39:59+00:00 2026-05-28T02:39:59+00:00

OS: ubuntu 11.10 Webserver: Apache Code: PHP I am trying to display the output

  • 0

OS: ubuntu 11.10
Webserver: Apache
Code: PHP
I am trying to display the output of command “ffmpeg -i ” on the webpage using php.
Required: The webpage should show the information about video (text).
Whats happening: The webpage shows no text output on running the php code.
If I was however doing system(“ls”) the code runs fine and outputs the list of files.
Here’s my code

<?php
 echo "Details of video file:";
 system('ffmpeg -i /home/atish/Videos/T2V0040006_Angled_ride_720x576i_FLDCMB.avi');
?>

The same command works fine on my shell, and my system has ffmpeg installed. Here’s a snapshot of executing this command directly on shell:

ThinkPad-T420:~/Videos$ ffmpeg -i /home/xx/Videos/T2V0040006_Angled_ride_720x576i_FLDCMB.avi
ffmpeg version git-2012-01-10-7e2ba2d Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 10 2012 12:01:19 with gcc 4.6.1
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-    amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
  libavutil      51. 34.100 / 51. 34.100
  libavcodec     53. 54.100 / 53. 54.100
  libavformat    53. 29.100 / 53. 29.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 58.100 /  2. 58.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    51.  2.100 / 51.  2.100
  Input #0, avi, from '/home/atish/Videos/T2V0040006_Angled_ride_720x576i_FLDCMB.avi':
  Metadata:
  encoder         : Lavf52.23.1
  Duration: 00:00:29.00, start: 0.000000, bitrate: 124422 kb/s
  Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 720x576, 25 tbr, 25 tbn, 25 tbc
  At least one output file must be specified

I have tried appending “DISPLAY=:0” to my command and also done “xhost +” before running php code, but nothing is helping me out.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:40:00+00:00Added an answer on May 28, 2026 at 2:40 am

    This link explains the how and why. Thanks for the replies folks.

    This is the way to get the desired output:

    echo exec('/usr/local/bin/ffmpeg -i input.mp4 2>&1', $output);  
    var_dump($output);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

OS: ubuntu 11.10 Webserver: Apache Code: PHP Hello I am trying to exec a
While using PHP cli in ubuntu i got apache as web server i cant
An Apache 2.x Webserver with default configurations from the ubuntu/debian repositories will use the
I am running Ubuntu with an Apache webserver with Mod_python. The root directory of
I'm using Vagrant to run an Ubuntu powered VirtualBox with Apache2. The webserver, among
I'm trying to install a rails server for my application. I'm using ubuntu 10.04
My Ubuntu server has Apache and Subversion installed. I use this server as a
I'm deploying to Ubuntu slice on slicehost, using Rails 2.1.0 (from gem ) If
I have an apache web server running on my ubuntu server box. Recently, I
I am trying to set up a webserver on an old machine of mine.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.