开发者

Convert Video To MP3 in php?

开发者 https://www.devze.com 2022-12-27 01:01 出处:网络
Hey, I\'m just wondering if it开发者_如何学Go would be possible to convert videos to mp3 files in php, if so, could someone point me in the right direction?This is not possible in pure PHP. You will n

Hey, I'm just wondering if it开发者_如何学Go would be possible to convert videos to mp3 files in php, if so, could someone point me in the right direction?


This is not possible in pure PHP. You will need to use the services of a command-line executable or a web service.

The most popular command-line executable for this is ffmpeg. Here is a tutorial on how to strip audio/video streams from it: ffmpeg audio/video manipulation

From that tutorial - looks pretty straightforward:

ffmpeg -i mandelbrot.flv -vn -acodec copy mandelbrot.mp3

of course, there are tons of options to adjust and fine-tune the operation.

ffmpeg needs to be installed on your web server for this, and your PHP instance needs to be able to execute it.

There are some web services around to convert video I think, but I know of no free ones.

0

精彩评论

暂无评论...
验证码 换一张
取 消