我应该将上传的视频转换为多少种视频格式才能在所有媒体类型中播放?
我正在计划在公共网站上提供视频上传功能。
我不会使用 Flash,而是使用 MediaElement.js 来使用 HTML5 我的目标是确保处理后的视频在浏览器和所有
我用来将上传的视频转换为 flv 文件以使用 flash 播放的智能设备上播放。
我将使用 FFMPEG 将上传的视频转换为目标格式。
我的问题是我需要处理\转换多少种不同的格式上传的文件?
I am planning on video upload capability on a public website.
I am not going with Flash instead going with HTML5 using MediaElement.js
My goal is to make sure that processed videos play on browser and all smart devices
I used to convert uploaded videos to flv file to play using flash.
I will use FFMPEG to convert uploaded videos to the target format.
My question is how many different format do I need to process\convert the uploaded files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
HTML5 视频元素至少需要 2 个。您需要提供 H264 和 Ogg 或 WebM。请参阅 Wikipedia 了解支持的代码。
我从未使用过 MediaElement.js,但看起来它们可以在不支持该元素的浏览器中使用这两种格式中的任何一种。
You will need at least 2 for the HTML5 video element. You need to supply a H264 and either Ogg or WebM. See Wikipedia for the supported codexs.
I have never used MediaElement.js but it look like they can work with either of the two formats in browsers that don't support the element.
如果您想通过 HTML5 播放所有内容,那么是的,每个视频确实需要 2 个视频文件,正如 Maurice 所解释的。
但是:您可以使用 Flash 回退并仅使用 mp4 视频(MEJS 将处理 Flash)。这样,它就可以通过 HTML5 在 iOS、许多 Android 设备以及 chrome、safari 和 IE9 上播放 - Firefox 和 Opera 用户将看到 Flash 播放器。
if you want to play everything via HTML5 then YES, you do need 2 video-files for each video, as explained by Maurice.
BUT: You could use the Flash-fallback and only use mp4 videos (MEJS will take care of Flash). That way it plays on iOS, many Android devices and chrome, safari and IE9 via HTML5 - Firefox and Opera users will see the Flash-player.