Home  >  Article  >  Backend Development  >  php convert video format

php convert video format

WBOY
WBOYOriginal
2016-12-01 00:25:547127browse

A project made with php, the uploaded video is in mp4 format, how to convert the video to flv and ogg

Reply content:

A project made with php, the uploaded video is in mp4 format, how to convert the video to flv and ogg

There is no pure PHP solution other than using a 3rd party web service (I don't think there are any free ones). If you have a web space/web server with command line access, try ffmpeg.
You can call ffmpeg using exec(), but there are also wrapper classes for PHP. here. There is also a PHP extension that provides an interface to ffmpeg, but it must be installed on the server.

Various clouds, don’t mess around

Video transcoding is very resource-intensive. If you don’t have a powerful server, give up this idea. Alibaba Cloud and Baidu Cloud both have cloud transcoding services, but they cost money.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn