XSplit Quality, VBV-Buffer, VBV-Maxrate and Preset Settings
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的更多相关文章
- VBV Rate Control
Part 1 <06/05/07 12:08pm> Manao | he is negating a float by printing it, adding a "-" ...
- 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 ...
- x264 FFmpeg Options Guide
https://sites.google.com/site/linuxencoding/x264-ffmpeg-mapping x264 FFmpeg Options Guide Please Not ...
- FFMpeg的码率控制
mediaxyz是一位研究ffmpeg有三年的高人了,这几天一直在折腾ffmpeg中的x264,就是不知道该如何控制码率,主要是参数太多,也不知道该如何设置,在google上search了一下,这方面 ...
- [转载] FFMpeg的码率控制
mediaxyz是一位研究ffmpeg有三年的高人了,这几天一直在折腾ffmpeg中的x264,就是不知道该如何控制码率,主要是参数太多,也不知道该如何设置,在google上search了一下,这方面 ...
- x264源代码简单分析:x264命令行工具(x264.exe)
===================================================== H.264源代码分析文章列表: [编码 - x264] x264源代码简单分析:概述 x26 ...
- X264参考手册
艺搜简介 基本语法: x264 [options]-o outfile infile 注意与ffmpeg的输入输出文件位置恰好相反: ffmpeg[options][[infile options]- ...
- X264码率控制总结
ABR,CQP,CRF X264显式支持的一趟码率控制方法有:ABR, CQP, CRF. 缺省方法是CRF.这三种方式的优先级是ABR > CQP > CRF. if ( bitrate ...
- x264 --fullhelp
>x264 --fullhelp x264 core: Syntax: x264 [options] -o outfile infile Infile can be raw (in which ...
随机推荐
- Codeforces 1101F Trucks and Cities dp (看题解)
Trucks and Cities 一个很显然的做法就是二分然后对于每个车贪心取check, 这肯定会TLE, 感觉会给人一种贪心去写的误导... 感觉有这个误导之后很难往dp那个方向靠.. dp[ ...
- 51Nod1773 A国的贸易 多项式 FWT
原文链接https://www.cnblogs.com/zhouzhendong/p/51Nod1773.html 题目传送门 - 51Nod1773 题意 给定一个长度为 $2^n$ 的序列,第 $ ...
- CodeForces 516B Drazil and Tiles 其他
原文链接http://www.cnblogs.com/zhouzhendong/p/8990658.html 题目传送门 - CodeForces 516B 题意 给出一个$n\times m$的矩形 ...
- Service Fabric SfDevCluster目录从默认的C盘移动
管理员权限打开Powershell CD\ 回车 CD "C:\Program Files\Microsoft SDKs\Service Fabric\ClusterSetup" ...
- Azkaban
Azkaban安装部署 https://azkaban.github.io/azkaban/docs/2.5/ 安装Azkaban ) 在/opt/module/目录下创建azkaban目录 [kri ...
- Working out(DP)
题目描述: 题意: 有n*m个格子, 走过一个格子可以得到相应的分数. A 从(1,1)沿 下 或 右 走到(n,m) B 从(n,1)沿 上 或 右 走到(1,m) 两人路径有且只能有一个格子重合( ...
- Service插件化解决方案
--摘自<android插件化开发指南> 1.ActivityThread最终是通过Instrumentation启动一个Activity的.而ActivityThread启动Servic ...
- 2501 矩阵距离 (bfs)
描述 给定一个N行M列的01矩阵 A,A[i][j] 与 A[k][l] 之间的曼哈顿距离定义为: dist(A[i][j],A[k][l])=|i-k|+|j-l| 输出一个N行M列的整数矩阵B,其 ...
- 用Eclipse上传项目到github
1.安装EGit插件 点击菜单栏help->Eclipse Marketplace 2.配置Git 这里是配置相关账户信息 3.把项目提交到本地仓库 右键项目->Team->Shar ...
- Django之模板基础
Django之模板 目录 变量 过滤器 标签的使用 变量 变量的引用格式 使用双括号,两边空格不能省略. 语法格式: {{var_name}} Template和Context对象 context 字 ...