MySQL rollback with PHP PDO

Roll back a MySQL transaction with the PDO rollBack() function. All that is needed is beginTransaction. Start a transaction and run a query that modifies a table: $db->beginTransaction(); $update =…

Speed up and slow down video with FFmpeg

How to speed up or slow down video using FFmpeg. -filter:v “setpts=” Is the method to achieve this. The documentation states that for fast motion: -filter:v setpts=0.5*PTS Slow motion: -filter:v setpts=2.0*PTS In…

Using PHP __DIR__

PHP __DIR__  returns the current working directory, its usage is common when including files as you don’t have to dynamically define the directory each time. Simply running echo __DIR__; Will…