ffmpeg-php

Mai 29th, 2007 10:30 Uhr von Ronald

Um die ffmpeg-Geschichte jetzt zu vervollständigen, präsentiere ich hier noch das entsprechende PHP-Modul ffmpeg-php.

Das Modul erweitert PHP um einige sehr schöne Funktionen, z.B. um aus Videos Screenshots oder gleich animierte GIFs zu erzeugen. Was benötigt man? ffmpeg sowie PHP4 oder PHP5 sind “natürlich” Voraussetzung. Für die Bildextraktion wird noch GD-Lib benötigt. Wenn man diese Voraussetzungen erfüllt, kann es eigentlich schon losgehen:

How to install ffmpeg-php4 on Debian 4.0 (Etch)

1. Downloading the archive via Subversion

svn co https://ffmpeg-php.svn.sourceforge.net/svnroot/ffmpeg-php ffmpeg-php

2. Now change to the directory and execute “phpize”. Maybe you do not have installed it and then you can reinstall it with apt.

apt-get install php4-dev
cd ffmpeg-php
phpize

3. After a short period the system will throw you back to prompt. No it’s time to configure and build the extension.

./configure && make && make install

4. Checking for existing ini file! In some cases installation will not create a PHP-extension ini-file by itself, so you have to do the work. The directory where to find it depends on your configuration (PHP and Apache versions). In my case it’s “/etc/php4/apache2/conf.d/”

There you have to create a file named “ffmpeg.ini” an fill it with:

# configuration for php FFMPEG module
extension=ffmpeg.so

5. After all just restart apache with

/etc/init.d/apache2 restart

Try it by checking your “phpinfo()”-output or by testing a function directly, i.e.:

$movie = new ffmpeg_movie(“/path/to/video.ext”);

(C) 2007 by Ronald Vilbrandt

Aktualisiert zuletzt am: 30.10.2007

Teile und genieße Diese Icons verzweigen auf soziale Netzwerke bei denen Nutzer neue Inhalte finden und mit anderen teilen können.
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists

Geschrieben in PHP | 2 Kommentare »

2 Kommentare

  1. getmp3 Sagt:

    Danke Ronald, hast mir mit der ANleitung sehr geholfen :) ) Mike.

  2. Videoumwandlung mittels ffmpeg - PHP @ tutorials.de: Forum, Tutorial, Anleitung, Schulung & Hilfe Sagt:

    [...] [...]

Einen Kommentar abgeben

Bitte beachte: Die Kommentare werden moderiert. Dies kann zu Verzögerungen bei Deinem Kommentar führen. Es besteht kein Grund den Kommentar erneut abzuschicken.

*
To prove you're a person (not a spam script), type the answer to the math equation shown in the picture. Click on the picture to hear an audio file of the equation.
Click to hear an audio file of the anti-spam equation