使用 PHP 编辑视频 [英] Video editing using PHP
问题描述
是否可以使用 PHP 将声音录制到上传的视频中?
Is it possible to record a voice onto the uploaded video using PHP?
推荐答案
不,您不能,至少不能仅使用 PHP,因为 PHP 本身不提供录制声音和编辑视频所需的库.
No you can't, at least not by just using PHP, because PHP in itself doesn't provide the necessary libraries for recording sound and editing videos.
要真正录制视频和声音,您需要像 ffmpeg 这样的库(有 一个方便的 PHP 扩展) 用于视频编辑和 SoX 用于安装在您的服务器上的声音.然后,您可以使用 exec() 访问这些程序以 PHP 中的
函数为例.不过,实现不会那么简单.
To actually record video and sound you'll need libraries like ffmpeg (there's a handy extension for PHP) for video editing and SoX for sound installed on your server. You can then access these programmes by using the the exec()
function in PHP, for example. The implementation wouldn't be that simple, though.
这篇关于使用 PHP 编辑视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!