I am in need of converting user uploaded gif files to mp4 format in php. Is this possible and if so, how?
The only current solution I have found is by uploading it to an api which would then provide me with a temporary link that I could use. That, however, would be a very bad solution because I would then have to crawl the link to obtain the raw video code. This is necessary as I am later uploading it to a WordPress media library.
Answer: not possible in pure php but is by installing and using ffmpeg on your server.
Related
Using mediawiki api, I got the uploaded video file in my upload directory foler. But i need to get the snapshot image of the video . using ffmpeg we just got the image normally, but i need to run ffmpeg in mediawiki api. so, i need to know details of ffmpeg in mediawiki api and how to customize? Thanks.
Assuming you have something like TimedMediaHandler installed to support the file uploads, and it's using ffmpeg to generate thumbnails, and it's configured properly already, you can fetch a thumbnail by using MediaWiki's 'imageinfo' API call:
See https://www.mediawiki.org/wiki/API:Properties#imageinfo_.2F_ii
Brion probably knows what he is talking about, but I was able to get the information with prop=pageimages more easily: https://commons.wikimedia.org/w/api.php?action=query&titles=File:Thresher-Sharks-Use-Tail-Slaps-as-a-Hunting-Strategy-pone.0067380.s003.ogv&prop=pageimages
I am trying to get an audio stream (in mp3 format with fixed quality) from a YouTube video in PHP.
Notice that I cannot use FFMPEG and also i do not want to save the mp3 on my server, but I need only the audio stream (on the fly use).
Do you have any code or script? I have used many, but the half needs FFMPEG and the other saves the mp3 file in the server.
My plan is to hit on the browser:
http://host.com/process.php?url=<youtubeurl>
and get the audio stream in the page in variable that creating every time
&stream = ......;
It's not PHP, but we've open sourced a simple all-in-one node.js/CoffeeScript web app that can download a YouTube videos from a URL and then convert the video into an MP3 using ffmpeg.
github / demo / blog
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...
So we were going to make a website allowing users to upload video. The website is going to be in PHP/MySQL. Are there any converters out there available for PHP to convert a video from a given format to flash to display on the web page to play?
Basically we would have a file on the server in say .avi format, or quicktime format. How do I grab it from the server, convert it to flash and display it on the php page to play?
Also, does can I use the video capabilities of HTML5 with PHP to make any of this easier?
What I have seen is encoding to flash on the server uses FFMPEG, Which must be installed onto the hosting server (some hosts specialize in this market). I've also looked for an open source encoder PHP or Perl, and not found one. I believe the problem is flash has not been open source and that stopped people because of licensing issues.
You can use the VideoToolkit php class, that uses ffmpeg and mencoder to convert the videos.
http://www.phpclasses.org/package/3747-PHP-Manipulate-and-convert-videos-with-ffmpeg-program.html
My platform is PHP JOOMLA MYSQL. I want to encode and load uploaded video files of different formats to .flv. I want this to implement in a video upload site where the users can see the videos in front-end after uploading and also I want to implement download options for them in mp4 and flv. Any help would be appreciated and thanks in advance to have a good reply for this
You can use the powerful ffmpeg to encode the videos once they're uploaded to your server.
And here's a nice tutorial.