File Format Conversion - Plugins 编辑

Once you've planned out what you want to do, the first step is to convert your video (or audio) files into formats compatible with HTML embedding.

What files have you got?

How to proceed depends on what format you've got your video files in:

  • If you've already got your files in web-compatible formats (such as MP4 and WebM), then great. You may need to do some optimization to get the file size down as low as you can without resulting in unacceptable quality, but for now you're in good shape.
  • If not, ideally you should transcode your original high-quality versions to web formats. This isn't too much of a problem.
  • If you only have Flash video files (FLV or F4V), then this is more problematic. See if you can find the original versions from before they were converted to FLV. Only convert from FLV as a last resort — your quality will likely suffer as a result.

Transcoding your video

There are many good quality, free, transcoding applications and utilities available, such as FFmpeg and Handbrake. You probably already have your favourite; consult the documentation for your particular transcoder for transcoding options.

If you need to transcode from Flash video files, be wary — not all transcoders support this (although FFmpeg and Handbrake both do.)

If your Flash video files use a web-compatible video compression format, and they have same bitrate you want for the web, you may be able to swap the container format without having to do any transcoding. This would give you the same quality, and save you some time too. Many transcoders have an option to do this, for example FFmpeg has the -c copy option:

ffmpeg -i mymovie.flv -c copy mymovie.mp4

Formats for adaptive streaming

If you want your video playback to be able to react to changing network conditions (e.g. start to serve a lower bitrate video if the network becomes slow), then you'll want to package your video with an adaptive bitrate.

  • To do this, first you'll have to use a transcoder like FFmpeg to create fragmented MP4s suitable for adaptive streaming. This is achieved in FFmpeg using the -movflags frag_keyframe+empty_moov flag.
  • You'll need encodings in multiple resolutions, so the process will need to be repeated.
  • The next step is to use a utility like Bento4's mp4-dash.py Python script to generate the corresponding MPD manifest file needed by clients to access the different resolution fragmented MP4s.

See also

For more information about transcoding:

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:65 次

字数:3990

最后编辑:7年前

编辑次数:0 次

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