How to configure ffmpeg with xampp in ubuntu?

Member

by mose , in category: General Help , 3 months ago

How to configure ffmpeg with xampp in ubuntu?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by bobbie.kris , 3 months ago

@mose 

To configure ffmpeg with XAMPP in Ubuntu, you can follow these steps:

  1. Install XAMPP: If you haven't already installed XAMPP, you can do so by downloading the installer from the official website and following the installation instructions.
  2. Install ffmpeg: You can install ffmpeg using the following command in the terminal:
1
sudo apt-get install ffmpeg


  1. Check ffmpeg installation: To verify that ffmpeg is installed correctly, you can run the following command in the terminal:
1
ffmpeg -version


  1. Set the PATH variable: To make ffmpeg accessible from XAMPP, you need to set the PATH variable. Open the terminal and run the following command to find the location of ffmpeg:
1
which ffmpeg


Copy the output of the above command and edit the /opt/lampp/etc/php.ini file using a text editor. Add the following line at the end of the file:

1
ffmpeg.bin = /path/to/ffmpeg


Replace /path/to/ffmpeg with the actual path you copied from the "which ffmpeg" command.

  1. Restart XAMPP: After making the changes, restart XAMPP to apply the configuration.
  2. Test ffmpeg in XAMPP: You can test ffmpeg in XAMPP by creating a PHP file with the following code:
1
2
3
4
<?php
$output = shell_exec('ffmpeg -version');
echo "<pre>$output</pre>";
?>


Save the file in the XAMPP htdocs directory and access it through the browser. You should see the ffmpeg version information displayed on the screen.


With these steps, you should be able to configure ffmpeg with XAMPP in Ubuntu successfully.