如何在 PHP 中将上传的视频文件编码为 .flv 格式

发布于 2024-09-16 13:24:14 字数 284 浏览 2 评论 0原文

我的平台是PHP JOOMLA MYSQL。我想将上传的不同格式的视频文件编码并加载为 .flv、.mp4 和 .flv、.mp4 等。 .avi

我希望此过程可以在上传过程中完成,也可以在完成上传过程后作为单独的过程完成。我确实使用我的 ffmpeg 代码可能最好,但实际上无法对某些视频文件进行编码,这些文件表示比特率为 1/1000,因此无法对文件进行编码。有些显示质量很差。

如果有人知道在这些情况下通常用于编码的最佳实践,请与我分享。

如有任何帮助,我们将不胜感激,并提前感谢您对此给予良好的答复

My platform is PHP JOOMLA MYSQL. I want to encode and load uploaded video files of different formats to .flv, .mp4 & .avi

I want this process either done on the upload process or after completing the upload process as a separate process. I do use my ffmpeg code to may best but literally failed to encode some of the video files which says that the bitrate is 1/1000 and so the file cannot be encoded. some shows poor in quality.

If anyone know the best practices which usually used to encode in these situations, please share with me.

Any help would be appreciated and thanks in advance to have a good reply for this

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你没皮卡萌 2024-09-23 13:24:14

您可以使用 http://www.ffmpeg.org/ 在任何平台 Windows 上使用 php 进行在线视频转换或linux

 exec("ffmpeg -i video.avi -ar 22050 -ab 32 -f flv -s 320x240 video.flv");

更多信息请阅读此处

http://www.ffmpeg.org/ffmpeg-doc.html

you can use http://www.ffmpeg.org/ for online video converting with php on any platform windows or linux

 exec("ffmpeg -i video.avi -ar 22050 -ab 32 -f flv -s 320x240 video.flv");

more read here

http://www.ffmpeg.org/ffmpeg-doc.html

七分※倦醒 2024-09-23 13:24:14

您可以查看名为 hwdVideoShare< 的 Joomla 组件/a>.

服务器要求如下:FFMPEG、FLVTOOL2、MENCODER、GD、FREETYPE、PHP(安装应支持 exec、cURL 和 file_get_contents 函数)、PERL。所以在安装之前你需要确保你的服务器具备所有这些。

You could check out a Joomla component called hwdVideoShare.

The server requirements look like this: FFMPEG, FLVTOOL2, MENCODER, GD, FREETYPE, PHP (installations should support exec, cURL & file_get_contents functions), PERL. So you need to make sure that your server has all these before installing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文