Ffmpeg installation And Converting VIdeo's:
I've always found it easier to call FFMPEG with exec()
. It is much easier to find exe builds of FFMPEG than the PHP extension. There is no install procedure for this method... just put the EXE somewhere on the server that is accessible by whatever account PHP is executing as.
There is no "best way" really. Both methods of accessing FFMPEG will produce the same output.
Install FFMPEG on XAMPP
You can follow steps from here or do the following steps.
- Download ffmpeg from here: https://ffmpeg.org/download.html
- Copy php_ffmpeg.dll from the php5 folder to the C:\wamp\bin\php\php5.2.9-2\ext
- Copy files from common to the windows/system32 folder
- Add extension=php_ffmpeg.dll to php.ini file ( \apache...php.ini )
- Restarted all services (Apache, PHP...)
And enable "extension=php_ffmpeg.dll" directive in your php.ini.
WAMP 5.5.30 installation Error in 32 bit system
There are more MSVC Runtimes required.
The WAMPServer install assumes you would be up to date with all these runtimes as lots of other software may also use these.
Make sure you have installed the redistributable packages VC9, VC10, VC11, VC13 and VC14
VC9 Packages
For Windows 2000 Service Pack 4; Windows Server 2003; Windows Server 2008; Windows Vista; Windows XP, W7, W8
Microsoft Visual C++ 2008 SP1 Redistributable Package (x86) (32 bits)
Microsoft Visual C++ 2008 SP1 Redistributable Package (x64) (64bits)
VC10 Packages
For Windows 7; Windows Server 2003; Windows Server 2008; Windows Server 2008 R2; Windows Vista; Windows XP
Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)
Microsoft Visual C++ 2010 SP1 Redistributable Package (x64)
VC11 Packages Note:
VC11 is not supported by Windows XP
Windows 7 Service Pack 1; Windows 8; Windows Server 2008 R2 SP1; Windows Server 2012; Windows Vista Service Pack 2
The two files VSU4\vcredist_x86.exe and VSU4\vcredist_x64.exe to be download are on the same page:
Visual C++ Redistributable for Visual Studio 2012 Update 4 (x86 and x64)
VC13 Packages
Windows 7 Service Pack 1; Windows 8; Windows Server 2008 R2 SP1; Windows Server 2012; Windows Vista Service Pack 2
The two files VSU4\vcredist_x86.exe and VSU4\vcredist_x64.exe to be download are on the same page:
Visual C++ Redistributable Packages for Visual Studio 2013
VC14 Packages (Required for Apache 2.4.17 and PHP 7)
Windows 10, Windows 7 Service Pack 1, Windows 8, Windows 8.1, Windows Server 2003 Service Pack 2, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2, Windows Server 2012, Windows Vista Service Pack 2
The two files vcredist_x86.exe and vcredist_x64.exe to be download are on the same page:
Visual C++ Redistributable Packages for Visual Studio 2015 Update 1
Also VERY BIG NOTE
There is a newer version of WAMPServer out now WAMPServer3 available on sourceforge.
- They have improved the wampmanager to add lots of nice new features.
- There are ADDONS available for Apache2.4 and Apache2.2
- There are ADDONS available for various MYSQL Versions
- There are ADDONS available for PHP5.3, PHP5.4, PHP5.5, PHP5.6 and PHP7.0.0/1/2/3
Unknown encoder libx264 on Windows
Your ffmpeg
has not been configured with --enable-gpl
and --enable-libx264
which are required to support encoding H.264 video via libx264.
You can compile, but the easiest solution is to download an already compiled binary/.exe
from gyan.dev or BtbN. Both include libx264 support.
Linux and macOS users can refer to the FFmpeg Download page for links to binaries/executables for those systems.
Also see FFmpeg Wiki: H.264.
Related Topics
Why Are Escape Characters Being Added to the Value of the Hidden Input
How to Export and Import MySQL Database with Its Data Using PHP Script
PHP 7: Missing Vcruntime140.Dll
Permission Denied Despite Appropriate Permissions Using PHP
Insert Non-English Decimal Points in MySQL
PHP Date Showing '1970-01-01 ' After Conversion
Creating a Related or Similar Posts Using PHP & MySQL
How to Store Configuration Variables in PHP
JSON_Encode Produce JSON_Error_Utf8 from Mssql-Select
Fatal Error: Call to Undefined Function Mcrypt_Encrypt()
PHP Method="Post" Stopped Working After I Added This .Htaccess... Why
Orm/Dao/Datamapper/Activerecord/Tablegateway Differences
Woocommerce Cart - Conditional Items Categories Validation
HTML Table Using MySQLi and PHP
What Http Status Code Is Supposed to Be Used to Tell the Client the Session Has Timed Out