I'd like a PHP script that creates a single preview image from a YouTube video.
The input should be the URL of the YouTube Video, and it should output a single image that looks like a YouTube Player with a frame from the video inside it. Ideally, you could also specify a parameter of the final dimensions of the image.
Ideally, the first time the script is run it will generate the image, then index it locally in a folder.
For example an input of:
[login to view URL]
Should generate this:
[login to view URL]
Its OK if the screen capture image needs to be cropped for this to occur.
The final image needs to have some sort of PLAY BUTTON overlayed on the screen capture, and also, a simulation of the player controls at the bottom.
Variables should be passed through the URL
[login to view URL]://[login to view URL]
The output should be an image.
NOTE: I realize the variable dimension aspect might be much more work, and will accept this as optional. If you aren't able to easily implement a variable size option, simply have the default size set to: 320x265
BONUS: Would also be interested in a script that can do this for other major video services like, VIMEO, CollegeHumor, etc. All built into the same script, so it will identify the video provider (from the URL) and generate the appropriate preview.