XSplit uses the x264 encoder, so let’s start off by saying that parameters mentioned in the title, with the exception of the quality parameters, mean the same as the parameters in the x264 wiki here:http://mewiki.project357.com/wiki/X264_Settings

Quality:

Since quality is different let’s start off discussing exactly this. In x264 terms the quality is known as the CRF factor or Constant Rate Factor. The encoder accepts any value form CRF=0 (lossless) to CRF = 51 (terrible quality).

When encoding a video stream you can generally apply different rate control schemes. XSplit uses quality based rate control wherein a particular quality of the encoded video is targeted, while still observing an upper bitrate constraint (the vbv-maxrate). There is a huge difference in bitrate required between the different qualities (and it is NOT linear). Most people would not even be able to see any difference between CRF=18 and CRF=0 expect for the fact that a CRF=0 recording leave a pretty huge footprint on the hard drive.

In XSplit terms we use a general quality setting for streaming between 0 and 10, wherein 10 is the highest. Quality 10 corresponds to CRF=25 which is generally a very good quality. Quality 0 in turn corresponds to CRF = 35 which could be acceptable in some cases (but not too pretty).

While it may up for discussion, it is never the less the convention of XSplit to use its own quality parameter and translate internally to CRF. We think people understand quality and they are used to something between 0 and 10 where the latter is the highest. But all this can easily be customized for those who want to go do down this road. So please see this entry about customizing settings.

You will notice that for local recording then XSplit will just offer you to set a quality setting and will not have a particular vbv-maxrate or vbv-buffer defined. The idea here is that for a local recording we are often not concerned with bandwidth usage. So a recording which will target a particular quality will be created and depending on the selected quality recording sizes for the same input will vary in size (seems logical enough).

In complex scenes (frames) more bits are used to ensure a consistent visual quality and in less complex scenes less bits a used. The x264 encoder tries to interpret the importance of changes in frame and optimize visual quality depending on the settings (the CRF , aka Quality setting). The base line FPS for quality is 25 frames per second. The x264 will scale its quality based on the frame rate of the video, so a particular quality setting will give lower quality per frame for 60 FPS stream when compared to a 25 FPS. The reasoning here is simple – namely that a single frame at 25 FPS is more important than a single frame at 60 FPS when the overall target is to retain the same visual quality for both the 25 and the 60 FPS stream.

For local recording it can still be desirable to control the maximum bandwidth used, so the UI in XSplit still allows the user to set a vbv-maxrate and vbv-buffer. – we will get back to this shortly.

VBV-buffer and VBV-maxrate:

The two main date rate control mechanisms employed by the x264 encoder are

- Average bitrate mode

- Average quality mode

In the user interface of XSplit we only allow average quality mode as discussed above, since this is often a much more effective mechanism.

However, for both main rate control schemes another supplementary rate control is often used and for successful live streaming with XSplit it is even required - the VBV rate control.

With quality based encoding you are assured of a particular quality but not a particular bandwidth usage. For live streaming it is important not to exceed your own available upload bandwidth, but also important not to exceed the download speed of viewers.

Streaming with a constant bandwidth is an option used by some encoders, but this rate control mechanism (or lack thereof) wastes bandwidths and often put larger requirements on quality of connection for both publisher and viewers.

XSplit instead uses quality based encoding and sets a VBV-maxrate and VBV-buffer. This basically means that the x264 encoder in XSplit tries to maintain a constant quality of the stream and can use less bandwidth in less complex or less important scenes. The VBV-maxrate puts a ceiling to the bandwidth that encoder can use, but relative to the VBV-buffer.

If you set VBV-maxrate=2000 and VBV-buffer=4000 then it will mean that your VBV-buffer (decode buffer) will be filled at a max-rate of 2000 Kbps. Hence your video bitrate can still exceed the discrete value of 2000 Kbps BUT you will not exceed 4000 Kbit during a 2 second period. In other words the VBV-maxrate is not actually the peak bitrate - as in the highest bitrate that can exist in the stream, it's merely the max bitrate that can enter the buffer.

If you grasp this concept then you will also understand the flexibility that the vbv-buffer provides. It basically allows the encoder to look ahead on a series of frames and then choose to use a more bits to encode some frames in a sequence and less on others as long as the vbv-buffer is not exceeded.

But here is what you now need to understand – the vbv-buffer is really a decode side buffer so it depends on the decoder which is mostly flash player in our case. It’s possible to configure flash player with a buffer anywhere from 0 sec to hmm…anything I guess, but most streaming service providers hardcode the buffer settings to either 1 or 2 seconds, so this is why you usually see that XSplit streaming plugins will auto-adjust vbv-buffer to X or 2 * X Kilobits when the vbv-maxrate is set to X Kilobits per second (Kbps) . I hope this is all starting to make some sense

So this would mean that if flash player buffer with your provider was set to something like 10 sec then you would be able to really beef up my vbv-buffer size and in turn get same quality at lower overall bandwidth or better quality at the same bandwidth – Well , you would esentialy allow more liberty for the encoder to spike the bitrate when needed. So you can expect that the XSplit team will have a dialog with our partners to see if we can actually get them to adjust their flash player buffer to match the VBV –buffer set in XSplit.

On this final note I wanted to get back to our local recording again. So here there is no default max rate (vbv-maxrate) set for a recording and also no vbv-buffer consequently. But if you want to put recorded video on your website and have visitor’s playback the videos with flash player across the internet then you might want to think twice. If you expect that end-viewers will have no more than 1000 Kbps download bandwidth and you want your video to start playback after say 4 seconds , then you will simply apply the appropriate vbv-constraints in addition to the quality you have assigned the local recording.

So in our case above we would use the following XSplit settings:

VBV Max Rate:1000 kbps

VBV Buffer:4000 kbps

Well we probably also should also compensate for audio, but in this case just subtract 1 x audio bitrate from your VBV Max Rate and 4 x audio bitrate form your VBV Buffer and then you are set.

Encoder Preset:

Several built in presets are provided from "Ultrafast" to "Placebo". XSplit uses a custom preset called “XSplit Default”. In the future you can expect that the default will be set to "Veryfast".

But what does this all mean?

H.264 specifies a set of compression features that a decoder must be able to support/decode. Depending on the capabilities of decoders these are segregated into groups of profiles. High Profile, Medium Profile and Base Line Profile. For the moment we will only consider High Profile which is supported by Flash Player.

By using a particular preset the x264 encoder will make use of several advanced preset features to better compress the video bit stream. Anything slower than "Superfast"  will result in a High Profile compatible bit stream unless other custom constraints are added – but never mind about that for the moment. All you need to know right now is that the slower preset you select, the more your stream will be compressed and the better quality you can produce with limited bandwidth, BUT it all requires substantial CPU power depending on both frame rate and resolution.

The default preset is either “XSplit Default” or Veryfast” which are more or less equivalent. If no other CPU intensive processes are running at the same time and you wish to broadcast/encode 30 FPS @ 1280 x 720 using the “Veryfast” preset then you should be good with an i5 Processor. If your CPU gets above 70% usage on any core then you will need to:

a) Use a lower resolution

b) Use a faster preset (like superfast)

c) Buy a good core i7 machine

So to make a long story short then the preset you choose will be equivalent to the amount the amount of compression you ask the encoder to perform. The Slower = more compression = more CPU usage.

To elaborate on what you should have learned above then let us just give the answer to the only question that can now be on your mind -:):

Question: If I do a local recording and set my quality to 8 and if I do NOT set any VBV-constraints will I then get a better quality video if I select a slower preset.

Answer: NO YOU WILL NOT. The quality will be absolutely the same, but your recorded video will be less compressed (larger file size) the faster your preset is.

BUT if you do have VBV-maxrate constraints that are restrictive enough then you will see a quality difference because the slower preset will do a better job keeping you under your given VBV-maxrate.

XSplit Quality, VBV-Buffer, VBV-Maxrate and Preset Settings的更多相关文章

  1. VBV Rate Control

    Part 1 <06/05/07 12:08pm> Manao | he is negating a float by printing it, adding a "-" ...

  2. What are CBR, VBV and CPB?

    转自:https://codesequoia.wordpress.com/2010/04/19/what-are-cbr-vbv-and-cpb/ It's common mistake to to ...

  3. x264 FFmpeg Options Guide

    https://sites.google.com/site/linuxencoding/x264-ffmpeg-mapping x264 FFmpeg Options Guide Please Not ...

  4. FFMpeg的码率控制

    mediaxyz是一位研究ffmpeg有三年的高人了,这几天一直在折腾ffmpeg中的x264,就是不知道该如何控制码率,主要是参数太多,也不知道该如何设置,在google上search了一下,这方面 ...

  5. [转载] FFMpeg的码率控制

    mediaxyz是一位研究ffmpeg有三年的高人了,这几天一直在折腾ffmpeg中的x264,就是不知道该如何控制码率,主要是参数太多,也不知道该如何设置,在google上search了一下,这方面 ...

  6. x264源代码简单分析:x264命令行工具(x264.exe)

    ===================================================== H.264源代码分析文章列表: [编码 - x264] x264源代码简单分析:概述 x26 ...

  7. X264参考手册

    艺搜简介 基本语法: x264 [options]-o outfile infile 注意与ffmpeg的输入输出文件位置恰好相反: ffmpeg[options][[infile options]- ...

  8. X264码率控制总结

    ABR,CQP,CRF X264显式支持的一趟码率控制方法有:ABR, CQP, CRF. 缺省方法是CRF.这三种方式的优先级是ABR > CQP > CRF. if ( bitrate ...

  9. x264 --fullhelp

    >x264 --fullhelp x264 core: Syntax: x264 [options] -o outfile infile Infile can be raw (in which ...

随机推荐

  1. MySQL 5.7 模式(SQL_MODE)详细说明 转

    5.7 默认模式: ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION ...

  2. 去掉select的原有样式

    1:设置select的边框为0px,背景设成透明(background: transparent;),这时候你会看到边框没有了,但是小三角还是在的.再在select外面加个div,固定死div的宽度, ...

  3. Codeforces 965E Short Code 启发式合并 (看题解)

    Short Code 我的想法是建出字典树, 然后让后面节点最多的点优先向上移到不能移为止, 然后gg. 正确做法是对于当前的节点如果没有被占, 那么从它的子树中选出一个深度最大的点换到当前位置. 用 ...

  4. Codeforces 316G3 Good Substrings 字符串 SAM

    原文链接http://www.cnblogs.com/zhouzhendong/p/9010851.html 题目传送门 - Codeforces 316G3 题意 给定一个母串$s$,问母串$s$有 ...

  5. union和union all的区别(面试常考)

    Union:对两个结果集进行并集操作,不包括重复行,同时进行默认规则的排序: Union All:对两个结果集进行并集操作,包括重复行,不进行排序: Union因为要进行重复值扫描,所以效率低.如果合 ...

  6. Linux安装Tomcat-Nginx-FastDFS-Redis-Solr-集群——【第一集之安装VMware】

    [Java全技术路线开发]:https://jq.qq.com/?_wv=1027&k=5knQcPc   由于自己已经安装了VMware,本想转载一篇百度经验的教程,但是我对安装过程有些异议 ...

  7. TMS320DM642学习----第二篇(软件环境搭建+工程文件结构)

    一.CCS3.3安装: 下载解压CCS3.3的破解安装包如下所示,双击setup准备安装(SEED开发者论坛资料:http://www.seeddsp.com/bbs/forum.php?mod=vi ...

  8. Date、Calendar、DateFormat类

    Date类与Calendar类之间的转换 package date; import java.util.Calendar; import java.util.Date; public class Da ...

  9. HDU-1013的解题报告

    题目来源:hdu-1013 题意:正整数的数字根是通过求整数的整数而求出的.如果结果值是一个位数,那么这个数字就是数字根.如果结果值包含两个或多个数字,则将这些数字相加并重复该过程.只要需要获得一个数 ...

  10. TF:Tensorflow结构简单应用,随机生成100个数,利用Tensorflow训练使其逼近已知线性直线的效率和截距—Jason niu

    import os os.environ[' import tensorflow as tf import numpy as np x_data = np.random.rand(100).astyp ...