PHP Scripts for uploading videos to Vimeo
Pull request Compare This branch is 19 commits ahead, 2 commits behind JohnMcLear:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Hooks Read title and desc from id3 Feb 29, 2012
Include Case change; tests dir Feb 20, 2012
Library Better logger file handling Mar 2, 2012
Scripts Added videoid parameter to postupload hook Mar 27, 2012
Test Logger tests Feb 20, 2012
.gitignore Example config.ini Feb 20, 2012
config.example.ini Switched default logger type to 'screen' Mar 2, 2012
phpunit.xml Logger tests Feb 20, 2012

Vimeo Uploader


  • Linux of some description
  • PHP 5.3+
  • PHP Curl
  • Vimeo account

Install instructions

  • Register a new application with Vimeo; be sure to request uploader access
  • Download and extract the code
  • Copy config.example.ini to config.ini
  • Once your Vimeo application is approved update the consumer_key and consumer_secret settings in config.ini
  • Run ./Scripts/Authorize.php and follow the instructions

Usage instuctions

You may either upload a single video:

./Scripts/UploadSingle.php /path/to/video/file.mp4

Or upload videos from a directory:

./Scripts/UploadMultiple.php /directory/full/of/videos


All executable files in ./Hooks/Preupload will be executed before a video is uploaded. Each hook will be given the full path to the video being uploaded as its only argument.

If any hooks have a non-zero return code the video will not be uploaded.

If the upload succeeds: all executable files in ./Hooks/Postupload will be executed. Each hook will be given the full path to the uploaded video as its only argument.

The suggested use-case for hooks is to store an MD5 hash of a file post-upload, and checking if the MD5 hash of a file has already been stored on pre-upload to avoid uploading the same video twice. Some example hooks written in PHP are provided that do just this; albeit in a simplistic manner.


  • The script will always check your upload quota before uploading videos
  • GetID3 is used for getting video title and description/comment