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 6893101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:37:02+00:00 2026-05-27T06:37:02+00:00

I’m trying to convert an .avi video file I have in my server folder

  • 0

I’m trying to convert an .avi video file I have in my server folder to `.flv’ format using ffmpeg-PHP. My attempt to “install” ffmpeg-PHP was to extract the contents of the “ffmpeg-php-0.6.0.tbz2” archive into a separate folder. The video conversion script I’m using references the directory location of the files extracted from “ffmpeg-php-0.6.0.tbz2”

this is the conversion script:

<?php

// Set our source file
$srcFile = "/videos/clip.avi";
$destFile = "/videos/clip.flv";
$ffmpegPath = "/install"; //where I extracted "ffmpeg-php-0.6.0.tbz2"

// Create our FFMPEG-PHP class
$ffmpegObj = new ffmpeg_movie($srcFile);

// Save our needed variables
$srcWidth = makeMultipleTwo($ffmpegObj->getFrameWidth());
$srcHeight = makeMultipleTwo($ffmpegObj->getFrameHeight());
$srcFPS = $ffmpegObj->getFrameRate();
$srcAB = intval($ffmpegObj->getAudioBitRate()/1000);
$srcAR = $ffmpegObj->getAudioSampleRate();

function makeMultipleTwo ($value)
{
    $sType = gettype($value/2);

    if($sType == "integer")
    {
    return $value;
    } else {
    return ($value-1);
    }
}

// Call our convert using exec()
exec($ffmpegPath . " -i " . $srcFile . " -ar " . $srcAR . " -ab " . $srcAB . " -f flv -s " . $srcWidth . "x" . $srcHeight . " " . $destFile);

?>

After running the conversion script, I get the output, “Fatal error: Class ‘ffmpeg_movie’ not found in [conversion script location]”

I’ve read instructions on the ffmpeg-PHP page but it doesn’t make sense to me. How do I execute these lines of linux code to install ffmpeg-PHP?

tar -xjf ffmpeg-php-X.x.x.tbz2

cd ffmpeg-php-X.x.x/
phpize

./configure && make

sudo make install

I think I’m using a shared hosting service by Inmotion with linux installed.

  • 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-27T06:37:03+00:00Added an answer on May 27, 2026 at 6:37 am

    If you are on shared hosting, you will need to have shell access to be able to build the php extension. Since the hosting is shared, you will not be able to modify the php configuration (php.ini) to load the ffmpeg extension automatically.

    If you have shell access and the ability to compile scripts (not always common on shared hosting), you will need to build the extension and place the .so file in your home directory somewhere, and use the dl() function to load the library on demand in your scripts.

    Some hosts may disable dl(), or your ability to compile scripts. If you don’t have shell access then you are out of luck and only the host can install this for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm trying to create an if statement in PHP that prevents a single post
I have thousands of HTML files to process using Groovy/Java and I need to
I have a reasonable size flat file database of text documents mostly saved in
I am trying to loop through a bunch of documents I have to put

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.