如何将任何类型的视频转换为mp4? [英] how to convert any type of video to mp4?
本文介绍了如何将任何类型的视频转换为mp4?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何让用户使用php代码将视频上传到mp4?我一直在寻找一种代码,可以自动将视频转换为mp4,这是什么类型的视频格式?
how can i let users upload video to mp4 using php code? I've been trying to find a code that converts video to mp4 automatically no mater what type of video format it is this possible?
推荐答案
如果您正在服务器上尝试此操作,则不使用任何在线工具. 您可以为此使用 FFmpeg . 转换示例代码:
If you are trying this at your server/ not using any online tool. You can use FFmpeg for this. Sample code for conversion:
ffmpeg -i {input}.mov -vcodec h264 -acodec aac -strict -2 {output}.mp4
FFmpeg是用于此目的的最广泛使用的工具,您可以在此处下载相同的工具.
FFmpeg is most widely used tool for this purpose and you can download the same here.
这篇关于如何将任何类型的视频转换为mp4?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文