Is there any way to create multiple thumbnails from a video through php? I don't have ffmpeg installed in my hosting account's web server. What should I do now?
You have to install FFMpeg package in your server, only then you'll be able to create your required thumbnails for the videos. You can find out the installation process and do follow the steps.
Assuming the videos are hosted on your own server, your best bet would be to request that ffmpeg be installed by your hosting provider. If the videos are hosted by a third-party such as YouTube or Vimeo, you can use their APIs to request the thumbnails (see How do I get a YouTube video thumbnail from the YouTube API? for an example of Youtube thumbnail handling).
You have two options with ffmpeg (after you have made it available on your server) to create multiple thumbnails:
Either you invoke it multiple times, once per thumbnail.
You invoke it once and create a thumbnail every X seconds.
Depending on how many thumbnails you want to create, the one method is faster than the other or vice versa.
For commandline examples, PHP code and speed comparison please see the following blog post: Capturing multiple thumbnails from a movie using ffmpeg.
If you don't have ffmpeg installed on your server, you need some other library/tool that is able to extract thumbnails from videos. However I would say, when something is offered, it's ffmpeg and not something else (e.g. apple quicktime), so I would not look much around for alternatives.
Related
Currently I am building a video streaming platform and I need a way to upload my videos, through multiple resolutions to my Wowza server. I am currently running Ubuntu with Nginx, PHP and Wowza so I want to be able to, when the user uploads the video, encode it to 1080p, 720p, 480p, and 360p. How would I do this?
You could take a look at the free, open source Video Share VOD solution that can manage video uploads, conversions to multiple formats.
You could customise that to add more formats as necessary.
It installs easily with WP framework, requires PHP and FFMPEG on server.
I have a an input for uploading videos on my site. The videos get uploaded on my server and then it is presented via video tag. But as you can imagine, the user uploads only one video with one extension (e.g. mp4), in that case I can't use that video in all the browsers. So, maybe what I could do is upload the same video to vimeo (via their api) and then host this video via "iframe code" or something. My question is: Is it even possible? And is it a good idea?
This is definitely possible, you can and should use the Vimeo API: https://developer.vimeo.com/api
Also it is pretty a good idea, because Vimeo is suited to transcoding and serving millions of videos every day and by definition is way more stable than your own video service. Unless you are facing the legal requirement to host the video on your own server, it is probably better to use external CDN (like Vimeo) for it.
But you will have to use cURL or some other HTTP requests library to access the functions and perform tasks. Check it out here: http://php.net/manual/en/book.curl.php
Is there any possiblity to create a thumbnail of uploaded video file in php without using ffmpeg.
Most server side scripts rely on ffmpeg, so if you can't use that you can either upload the video to an external service but that would mean sending the whole file OR you could try creating them client-side in the browser -- Generate thumbnails from video files using HTML5's video tag and canvas
If however you can't use ffmpeg for installtion reasons you could look at a wrapper -- It currently provides FFmpeg-PHP emulation in pure PHP so you wouldn't need to compile and install the module.
In the past I have used this website to do video conversion and create thumbnails. It works very well and have both free and paid plans.
The system consists of several "robots" that do different jobs. These robots can read your videos if you put them in a public folder with an URI or Amazon S3 for example. The actions that the robot must do are defined in "templates" in JSON and have a PHP SDK. Have a look at the docs.
P.S: I'm not related with transloadit, seems like I am a commercial guy...
I am using an API to add text to images which requires a URL to the image. I want to upload my images on imgur so that i have valid URL to use. I am using a php script with imgur as it is a part of an app. Since am using PHP I can easily use command line utilities. Please suggest some solution to this problem.
PS : Don't suggest using PHPGd or imagemagick to add text to image. They do not cater to my need. Also I tried google but most results assume upload to be upload on localhost/server while I want to upload on the net to have a valid URL to use. Also i dont think I have the technical know-how to use a VPS for this purpose.
If you're looking to use HTML/php to allow a user to upload a file to your server, here's a tutorial:
http://www.tizag.com/phpT/fileupload.php/
Please note that this process is unrelated to any image processing you might later perform with a tool such as ImageMagick or GD.
Edit: if you want to use php to make an image available on the Internet, Flickr is not a bad choice:
Uploading a photo with Flickr
ImageMagick is an image manipulation library. It has no functionality to upload files anywhere.
If you want to upload files, then you will need a service to upload them to (finding such a service is off-topic for SO, creating one is too broad for SO, finding hosting for one you create is off-topic for SO).
That service will provide some sort of API (although perhaps not one intended for automated access) which you will have to write a client to interact with.
If said service uses HTTP for uploads, then you should look at the cURL library.
Our aim is to create a live video streaming site for each individual paid registered user only by php platform.
I need video camera to take videos and i want to know function flow.I dont know where i have to start.
What are all things needed? Especially live video uploading using ordinary video camera. I have found http://www.videowhisper.com/?p=PHP+Live+Streaming This is the site, i exactly needed. Unfortunately but its camera option only includes "webcam only". I would like input video camera instead of webcam.
I need suggestions for requirements to create the site.
I need to stream live video for each paid user. That includes flash player content.
Uploading and video control by admin side. Only live links is shared to customers.
i think it is nothing about PHP, but something about JAVA.
You can use Red5 as media server, and users watch videos via flash player. You also can take videos with flash.
Found an interesting link on it: http://en.wikipedia.org/wiki/Push_technology
And Symfony 2.1 is going to handle streamed responses: http://symfony.com/doc/current/components/http_foundation.html#streaming-a-response, but is not stable yet.