开发者

Internet Video | FFMPEG | 2-PASS encoding vs. 1-PASS CRF

What is the most preferabl开发者_运维知识库e way to encode internet video?

2-Pass encoding probably takes longer processing time, but results in lower file size, and more average bitrate (?) Correct?

CRF (constant rate factor) results in a constant rate, but higher file size?

What is default way sites like youtube, vimeo encode their videos? And should I do it any other way than I do now with 2-Pass encoding?


Fredrick is right about VBR vs. CBR, but dropson mentions CRF (constant rate factor), which is actually kind of a third method. CBR and VBR both lock in on a bit rate, while CRF locks in on a perceived visual quality. It also takes into account motion in the video, and can typically achieve better compression than 2-pass VBR. More info.

It's the default setting if you're using x264 or Zencoder. I'd go with CRF any time you're doing h.264.


There are two encoding modes for video

CBR or Constant Bit Rate

Main usage is when you have a fixed carrier for your data, the best example here is the video telephony Use Case, where audio/video/control information needs to co-exist on a fixed 64 kbit carrier. Since this is a real-time UC, one pass encoding is used and the rate-controller (RC) does it's best to have a fixed number of bits assigned to each frame so that the bitrate is deterministic.

VBR or Variable Bit Rate

This encoding scheme is used practically every where else. Variable here means that e.g. if the video goes black or no motion, no bits are sent, i.e bitrate is 0 for this particular moment, then when things starts to move again, the bitrate sky rockets. This encoding scheme have normally no real-time requirements, e.g. when encoding/transcoding an video. Normally you would use a multipass encoder here to get the highest quality and to even out the bitrate-peakes.

Youtube uses VBR. Use e.g clive to download videos from youtube and analyse them using ffmpeg and you'll see the variable bitrate in action.

As always, wikipedia is your friend, read their entry on VBR and CBR

There is no reason for you to use anything else than VBR (unless you plan to set up an streaming-server)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜