编码视频以进行 html5 播放
我正在创建一个包含大量视频的视频组合网站,我想知道对视频进行编码以进行网络播放的最佳方法。我使用的是 html5 video for every 方法,所以我需要以以下 3 种格式编码的视频:
- h.264
- Ogg
- WebM
我不一定需要 WebM,但它会很好。
到目前为止,我一直在使用 Handbrake 和 ffmpeg2theora 的组合,但我正在寻找某种全合一的解决方案,因为 Handbrake 似乎在处理大尺寸视频时遇到了麻烦,而 ffmpeg2theora 只是一个麻烦。有人有什么建议吗?
谢谢!
I am creating a video portfolio website with a large quantity of videos and I am wondering as to the best way to go about encoding the videos for web playback. I am using the html5 video for everybody methodology, so I need the video encoded in the following 3 formats:
- h.264
- Ogg
- WebM
I don't necissarily NEED WebM, but it would be nice.
Up until now I've been using a combination of Handbrake and ffmpeg2theora, but I am looking for some sort of all in one solution, as Handbrake seems to have trouble with large sized videos, and ffmpeg2theora is just a pain in the ass. Does anyone have any suggestions?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Miro Video Converter 非常适合所有这些格式。
它本质上是 ffmpeg 的包装 UI,选项有限,但效果很好。
如果默认输出不满足您的要求,您还可以显示 ffmpeg 命令日志并调整命令。
它也是免费的。
Miro Video Converter works really well for all those formats.
It's essentially a wrapper UI for ffmpeg and has limited options but does a good job.
You can also display the ffmpeg command log and tweak the command if the default output doesn't satisfy you.
It's also free.
您可能想了解一下 VLC 转换功能。它可以使用导出插件以多种不同的格式导出,并且还有一个方便的编码队列。截至目前,我知道它可以像 Theora 一样执行 H.264 ...我不确定 WebM ...我的版本没有,但可能会有一个编码插件可以做到这一点出色地。
最重要的是,VLC 是免费的。
希望这有帮助,
杰森
You might want to take a look at VLC's conversion functionality. It can export in a number of different formats using export plug-ins, and has a handy encoding queue as well. As of right now I know it can do H.264 as well as Theora ... I'm not sure about WebM ... my version doesn't, but there may be an encoding plug-in coming that will do that as well.
Best of all, VLC is free.
Hope this helps,
Jason
仅供参考,我尝试了 Miro,并遇到了一些奇怪的转换问题。我的 .ogg 文件很好,但我的 .webm 文件有点不稳定。它们可以在本地播放/运行良好,但是当我将文件上传到我的服务器时,我会收到文件错误(它会播放一次,然后每次都会挂起)。
我很幸运地使用了 Firefogg,最终我使用它没有出现任何问题。
然而,Miro 和 Firefogg 都更像是一种文件、单击、转换方法。如果您想做大批量,这里有一个朋友发给我的指南,来自 Brett Terpstra:自动化 HTML5 视频编码。这超出了我的理解范围……但也许对你有用。
FYI I tried Miro, and ran into some odd conversion issues. My .ogg files were fine, but my .webm files were a bit wonky. They'd play/run fine locally, but I'd get an error with the file when I uploaded it to my server (it would play once, and then hang every time thereafter).
I had some luck with Firefogg, which I ended up using without problems.
However, both Miro and Firefogg are more of a one file, click, convert approach. If you're wanting to do a large batch, here's a guide that a friend sent to me, from Brett Terpstra: Automating HTML5 Video Encodes. It's way over my head... but perhaps of some use to you.