h264怎么播放得到h264的frame rate

1675人阅读
此代码是在 ffmpeg工程组&&佰锐科技 提供的代码上修改而成,还参考了
bool InitH264Codec(AVCodecContext * &av_codec_context, AVFrame * &picture, AVCodec* codec)
av_codec_context = NULL;
picture = NULL;
av_codec_context = avcodec_alloc_context();
picture = avcodec_alloc_frame();
if(!av_codec_context || !picture)
if (avcodec_open(av_codec_context, codec) & 0)
OutputDebugString(&could not open codec\n&);
//H264Context *h = av_codec_context-&priv_
//MpegEncContext *s = &h-&s;
//s-&dsp.idct_permutation_type =1;
//dsputil_init(&s-&dsp, av_codec_context);
bool DecodePlayH264(AVCodec* codec, AVCodecContext* av_codec_context, AVFrame *picture, \
char*data, int len, int nSide, CClientDC * pdc)
//bool bRet =
//解码数据
int got_picture = 0;
int consumed_bytes = avcodec_decode_video(av_codec_context, picture, &got_picture, (const uint8_t*)data, len);
if (consumed_bytes&0)
OutputDebugString(&Error while decoding\n&);
if(got_picture)
OutputDebugString(&got picture\n&);
H264ShowPic(nSide, picture, av_codec_context, pdc);
//H264保存解码数据
void H264SaveYUVData(int nSide, AVFrame * &picture, AVCodecContext * &context)
unsigned char * Y = (nSide==0)?
unsigned char * Cr = (nSide==0)?
Cr1 : Cr2;
unsigned char * Cb = (nSide==0)?
Cb1 : Cb2;
for(int i=0; i&context-& i++)
memcpy(Y, picture-&data[0]+i*picture-&linesize[0], context-&width);
Y+= context-&
for(int i=0; i&context-&height/2; i++)
memcpy(Cr, picture-&data[1]+i*picture-&linesize[1], context-&width/2);
Cr+= context-&width/2;
for(int i=0; i&context-& i++)
memcpy(Cb, picture-&data[2]+i*picture-&linesize[2], context-&width/2);
Cb+= context-&width/2;
void H264ShowPic(int nSide, AVFrame * &picture, AVCodecContext * &context, CClientDC * pdc)
unsigned char *Y, *Cr, *Cb, *RGB;
Y = (nSide==0)?
Cr = (nSide==0)?
Cr1 : Cr2;
Cb = (nSide==0)?
Cb1 : Cb2;
RGB = (nSide==0)?
RGB1 : RGB2;
H264SaveYUVData(nSide, picture, context);
//保存YUV数据
ConvertYUV2RGB(Y, Cb, Cr, RGB, context-&width, context-&height); //将YUV数据转换成RGB图像
Draw(nSide, context-&width, context-&height, pdc);
全局变量:
AVCodec h264_decoder = {
CODEC_TYPE_VIDEO,
CODEC_ID_H264,
sizeof(H264Context),
decode_init,
decode_end,
decode_frame,
/*CODEC_CAP_DRAW_HORIZ_BAND |*/ CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
flush_dpb,
NULL_IF_CONFIG_SMALL(&H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10&),
主函数(此处贴上的是原来的主函数):int main(int argc, char **argv)
const char *outfilename = &outrec.txt&;
const char *outrecfilename = &outrec.yuv&;
const char *filename = &test.h264&;
extern AVCodec h264_
AVCodec *codec = &h264_
AVCodecContext *av_codec_context = NULL;
int frame, size, got_picture,
FILE *fin, *
uint8_t inbuf[INBUF_SIZE + FF_INPUT_BUFFER_PADDING_SIZE], *inbuf_
char buf[1024];
/* set end of buffer to 0 (this ensures that no overreading happens for damaged mpeg streams) */
memset(inbuf + INBUF_SIZE, 0, FF_INPUT_BUFFER_PADDING_SIZE);
printf(&Video decoding\n&);
/* find the mpeg1 video decoder */
avcodec_init();
av_codec_context = avcodec_alloc_context();
picture = avcodec_alloc_frame();
dsputil_init(&dsp, c);
if(codec-&capabilities&CODEC_CAP_TRUNCATED)
av_codec_context-&flags|= CODEC_FLAG_TRUNCATED; /* we do not send complete frames */
/* For some codecs, such as msmpeg4 and mpeg4, width and height
MUST be initialized there because this information is not
available in the bitstream. */
/* open it */
if (avcodec_open(av_codec_context, codec) & 0) {
fprintf(stderr, &could not open codec\n&);
H264Context *h = av_codec_context-&priv_
MpegEncContext *s = &h-&s;
s-&dsp.idct_permutation_type =1;
dsputil_init(&s-&dsp, av_codec_context);
/* the codec gives us the frame size, in samples */
fin = fopen(filename, &rb&);
if (!fin) {
fprintf(stderr, &could not open %s\n&, filename);
fout = fopen(outfilename, &wb&);
if (!fin) {
fprintf(stderr, &could not open %s\n&, outfilename);
fclose(fout);
fout = fopen(outrecfilename, &wb&);
if (!fin) {
fprintf(stderr, &could not open %s\n&, outrecfilename);
fclose(fout);
frame = 0;
size = fread(inbuf, 1, INBUF_SIZE, fin);
if (size == 0)
/* NOTE1: some codecs are stream based (mpegvideo, mpegaudio)
and this is the only method to use them because you cannot
know the compressed data size before analysing it.
BUT some other codecs (msmpeg4, mpeg4) are inherently frame
based, so you must call them with all the data for one
frame exactly. You must also initialize 'width' and
'height' before initializing them. */
/* NOTE2: some codecs allow the raw parameters (frame size,
sample rate) to be changed at any frame. We handle this, so
you should also take care of it */
/* here, we use a stream based decoder (mpeg1video), so we
feed decoder and see if it could decode a frame */
inbuf_ptr =
while (size & 0) {
len = avcodec_decode_video(av_codec_context, picture, &got_picture,
inbuf_ptr, size);
if (len & 0) {
fprintf(stderr, &Error while decoding frame %d\n&, frame);
if (got_picture) {
printf(&saving frame %3d\n&, frame);
fflush(stdout);
/* the picture is allocated by the decoder. no need to
free it */
snprintf(buf, sizeof(buf), outfilename, frame);
pgm_save(picture-&data[0], picture-&linesize[0],
av_codec_context-&width, av_codec_context-&height, outfilename, outrecfilename);
pgm_save(picture-&data[1], picture-&linesize[1],
av_codec_context-&width/2, av_codec_context-&height/2, outfilename, outrecfilename);
pgm_save(picture-&data[2], picture-&linesize[2],
av_codec_context-&width/2, av_codec_context-&height/2, outfilename, outrecfilename);
inbuf_ptr +=
/* some codecs, such as MPEG, transmit the I and P frame with a
latency of one frame. You must do the following to have a
chance to get the last frame of the video */
#define NOTFOR264
#ifdef NOTFOR264
len = avcodec_decode_video(c, picture, &got_picture,
len = avcodec_decode_video(av_codec_context, picture, &got_picture,
inbuf_ptr, 0);
if (got_picture) {
printf(&saving last frame %3d\n&, frame);
fflush(stdout);
/* the picture is allocated by the decoder. no need to
free it */
snprintf(buf, sizeof(buf), outfilename, frame);
pgm_save(picture-&data[0], picture-&linesize[0],
av_codec_context-&width, av_codec_context-&height, outfilename, outrecfilename);
pgm_save(picture-&data[1], picture-&linesize[1],
av_codec_context-&width/2, av_codec_context-&height/2, outfilename, outrecfilename);
pgm_save(picture-&data[2], picture-&linesize[2],
av_codec_context-&width/2, av_codec_context-&height/2, outfilename, outrecfilename);
fclose(fin);
fclose(fout);
avcodec_close(av_codec_context);
av_free(av_codec_context);
av_free(picture);
printf(&\n&);
版权声明:本文为博主原创文章,未经博主允许不得转载。
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:323245次
积分:3786
积分:3786
排名:第3820名
原创:118篇
转载:163篇
评论:29条
(1)(2)(4)(3)(2)(2)(4)(8)(2)(9)(7)(4)(9)(6)(6)(6)(5)(8)(13)(7)(1)(2)(3)(9)(1)(3)(2)(3)(12)(7)(14)(15)(27)(18)(15)(5)(11)(9)(3)(9)(7)H264视频高压心得——兼容华为U8800+(硬解720P) - zyl910 - 博客园
H264视频高压心得&&兼容华为U8800+(硬解720P)
一、导言与背景知识
  手机用户对于视频播放,最期望以下3点&&
1.播放流畅。最好手机支持该视频格式的硬件解码,俗称&硬解&。硬解视频不仅播放流畅,而且比较省电。
2.文件小。手机的存储卡的容量一般只有数GB,最高的一般才32GB。文件小,才能存放更多的视频。
3.画质高。虽然要求文件小,但是必须保证画质。若画质差,就没心情观看了。
  H.264视频编码能满足以上需求,它能在低码率下保证较好画质。而且现在大多数手机都支持硬解H.264视频,只是存在支持级别的差异。
  背景知识&&
H.264,或称MPEG-4 AVC(Advanced Video Coding:高级视频编码),是由ITU-T视频编码专家组(VCEG)和ISO/IEC动态图像专家组(MPEG)联合组成的联合视频组(JVT,Joint Video Team)提出的高度压缩数字视频编解码器标准。标准号 ISO/IEC 14496-10(MPEG-4 第十部分)。文件后缀名一般为mp4。
H.264/AVC项目最初的目标是希望新的编解码器能够在比相对以前的视频标准(比如MPEG-2或者H.263)低很多的比特率下(比如说,一半或者更少)提供很好的视频质量;同时,并不增加很多复杂的编码工具,使得硬件难以实现。另外一个目标是可适应性,即该编解码器能够在一个很广的范围内使用(比如说,即包含高码率也包含低码率,以及不同的视频分辨率),并且能在各种网络和系统上(比如组播、DVD存储、RTP/IP包网络、ITU-T多媒体电话系统)工作。
/view/403562.htm
二、华为U8800+硬解H.264的具体能力(面向视频观看者)
  华为U8800+支持硬解H.264视频,但是官方没有给出具体的能力参数。于是我做了一番研究,尝试用不同的编码参数压制视频,再用手机自带的播放器做播放测试。
  花了一个星期时间,共实验90多次,终于找到了U8800+硬解的具体能力和最佳的H.264视频压制参数。
  华为U8800+硬解H.264的具体能力为&&
分辨率:最高为 720P()。
AVC配置(AVC Profile):最高为 主要(Main)。
AVC级别(AVC Level):最高为 3.2。
子像素优化(Subpixel Refinement):最高为 9(RD refinement on all frames:进行全部帧运动矢量及块内部的速率失真最优化)。
  若要播放更加流畅,视频参数最好为&&
码率:最好不超过 1000Kbps。
帧率:最好不超过 24。
  注:虽然AVC Level 3.2 也能支持1080P视频(),但测试后发现&&U8800+自带的播放器虽然能打开,但只有声音,没有图像。用MoboPlayer打开,能够播放图像,但是不流畅,大约每秒只有7、8帧。
三、视频高压参数配置(面向视频压制者)
  所用软件&&
转码工具:MeGUI。
视频编码器:x264。
音频编码器:Nero AAC。编码方案选&Nero AAC: NDAAC-HE-32Kbps&就行了。对于手机喇叭来说,32Kbps的音质几乎与原来的一样。
  视频高压的策略是&&在文件小的前提下保持较好的画质,可以牺牲压制时间。当然,那些对画质提升不大、但极耗时间的参数可以放弃。
  对于视频高压,传统是使用二次编码(2 pass)方式&&
2 pass压缩模式是指先用编码对视频文件进行分析(1st),然后根据分析结果进行真正的压缩(2nd)操作。2 pass的目的是为了在全局范围内合理分配码率。一般情况下,第一次对原始视频编码是为了得到整个序列的复杂度分布统计信息,然后第二次编码时利用该统计信息合理地分配码率,从而能够在整个序列上得到基本平稳的影像质量。通常,2 pass压缩模式的处理程序可以达到更高的数据压缩率(即更小的文件大小)以及更佳的影像品质,但其代价是编码速度上的损失。
  而在H.264中,我们还可以利用crf(Const Quality, 固定质量)方式,注意不是固定量化(Const Quantizer)。它是一种根据视频质量自动分配码率的可变码率控制方式。
  二次编码的优点是能够精确的控制视频码率与文件尺寸。缺点是压制速度较慢,而且必须事先决定好码率。事先决定好码率在一般情况下很难办到,因为视频分辨率非常多,最常见的就有480P(800x480)、720P()、1080P()这三种,若场景复杂不同还应该选用不同的码率。码率选低了,画质差;码率选高了,浪费空间。
  crf的优点是一次编码速度较快,而且只需给出参数就可通吃不同分辨率的视频。但缺点是无法精确控制视频码率与文件尺寸。
  很多人建议先用crf方式压一次决定码率,再用二次编码获得更好的动态画质。
  但我测试后发现,很多时候二次编码后的PSNR、SSIM,比直接crf要稍微低一点。所以我建议&&一般情况下只用crf方式就行了。除非该视频中存在大量动态的、复杂的场景,才使用二次编码。
  crf参数可用的值从1到51,数字越小,画质越好、码率越高。默认为23,官方推荐18至26。
  我测试后发现,选择28比较好,理由&&
1.对于大多数视频,crf28能将码率控制在1000Kbps以内。
2.只要将运动估计等参数配置的比较高,crf28也能达到不错的画质。若是动画,SSIM一般能有0.99左右;若是电影,SSIM一般能有0.97左右。
  若crf28压制后视频的码率大于1000Kbps,一般可以容忍,除非在严格追求手机播放流畅性的场合。那时可以采用二次编码,码率1000Kbps,将视频缩小为手机屏幕的分辨率(如华为U8800+应选择800x480)。
  对于视频分辨率。建议保持原始分辨率,让该视频不只局限在手机。除非发现码率过高时,才缩小为手机屏幕的分辨率。
  对于帧率。一般情况下也建议保持原始帧率。当遇到原帧率高于30,或是VFR(Variable Frame Rate:可变帧率)的视频,就将帧率锁定为24帧。因为手机对它们支持性不好。
  动画与电影,应该使用不同的编码参数。一般情况下调整tune就够了。
  比如我的动画压制参数为&&
--profile main --level 3.2 --preset placebo --tune animation --crf 28.0 --threads 2 --bframes 6 --ref 6 --merange 32 --me umh --subme 9 --psnr --ssim
  对于电影,将tune改为film就行了&&
--profile main --level 3.2 --preset placebo --tune film --crf 28.0 --threads 2 --bframes 6 --ref 6 --merange 32 --me umh --subme 9 --psnr --ssim
  参数解释&&
--profile main:配置为主要(Main)。因手机限制。
--level 3.2:级别为3.2。因手机限制。
--preset placebo:预设方案为placebo。虽然压制速度最慢,但压缩率高、画质好。
--tune animatio/film:调优为动画/电影。应根据视频类型设置此参数。
--crf 28.0:crf参数为28.0。
--threads 2:线程数量为2。据说线程多了,画质会下降(见参考文献《x264起多少个线程比较好》)。建议&&将线程数量设为物理CPU模块的数量。比如我的CPU是双核四线程的i5-430M,就将线程数量设为2。如果用的是AMD四模块八核心的推土机,就应该将线程数量设为4。因为物理CPU模块的数量决定了基础性能,开更多的线程,对转码速度的提升也十分有限。而且释放了CPU,我们可以在转码时,做收邮件、看网页等操作,不耽误工作与娱乐。
--bframes 6:B帧数量的最大值为6。因为该值超过6之后,对压缩率的贡献很低。
--ref 6:参考帧(Reference Frame)的最大值为6。因为该值超过6之后,对压缩率的贡献很低。
--merange 32:运动估计范围为32。能提高运动较为剧烈的场景的压缩率。
--me umh:运功估计算法为混合菱形(Multi hex),覆盖较广。如果想进一步提高压缩率和画质的话,可以设为tesa(SATD exhaustive:hadamard变换全面搜索)。
--subme 9:子像素优化(Subpixel Refinement)为 9。因手机限制。
--psnr --ssim:输出PSNR和SSIM信息,用于分析视频质量。平时可关闭。
  因为设置了preset和tune,deblock、analyse等比较繁琐的参数会自动设置,实际的全部参数为&&
cabac=1 / ref=6 / deblock=1:1:1 / analyse=0x1:0x131 / me=umh / subme=9 / psy=1 / psy_rd=0.40:0.00 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=6 / b_pyramid=2 / b_adapt=2 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=60 / rc=crf / mbtree=1 / crf=28.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:0.60
四、720P的评测数据(面向视频压制参数研究者)
  对于每一个视频,分别测试三套编码参数&&
crf28:就是上一节所讲的参数,crf为28.0。
crf28+:在crf28的基础上,将运动估计算法设为hadamard变换全面搜索(me=tesa)。
pass2:在crf28的基础上,将压制模式改为二次编码,码率选择与crf28相同的。(me仍是umh)
4.1 720P动画
  原视频&&
名称:Fate/Zero 第07话
下载地址:
文件大小:378,550,351
时长:0:23:59
帧率:23.976
视频码率:2103 Kbps
封装格式:mkv
  压制的结果为&&
82,501,159
82,375,303
82,325,449
  可看出&&
1.crf28+的压制时长几乎是crf28的两倍。但它的画质稍微好一些,SSIM提升了0.0001119。
2.pass2的压制时长 几乎与 crf28+ 一样了。但它的SSIM不仅不如 crf28+,甚至不如 crf28。仅PSNR评分比crf28高。
  crf28的x264输出信息&&
commandline: "F:\MeGUI\MeGUI_2050_x86\tools\x264\x264.exe" --profile main --level 3.2 --preset placebo --tune animation --crf 28.0 --threads 2 --bframes 6 --merange 32 --me umh --subme 9 --psnr --ssim --sar 1:1 --output "F:\Temp\3\a720\Fate_Zero07.264" "F:\Temp\3\a720\Fate_Zero07.mkv.avs"
avs [info]: :1 @
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile Main, level 3.2
x264 [info]: frame I:301&& Avg QP:23.08& size: 31750& PSNR Mean Y:47.35 U:50.71 V:50.74 Avg:48.17 Global:47.55
x264 [info]: frame P:8942& Avg QP:25.65& size:& 5263& PSNR Mean Y:46.08 U:49.68 V:49.62 Avg:46.92 Global:45.87
x264 [info]: frame B:25281 Avg QP:32.50& size:&& 774& PSNR Mean Y:46.15 U:49.87 V:49.81 Avg:47.02 Global:46.02
x264 [info]: consecutive B-frames:& 4.2%& 5.5%& 6.2% 40.9%& 9.2% 33.8%& 0.2%
x264 [info]: mb I& I16..4: 65.1%& 0.0% 34.9%
x264 [info]: mb P& I16..4: 20.5%& 0.0%& 2.3%& P16..4: 28.9%& 2.1%& 0.4%& 0.0%& 0.0%&&& skip:45.6%
x264 [info]: mb B& I16..4:& 0.7%& 0.0%& 0.1%& B16..8: 10.1%& 0.6%& 0.1%& direct: 0.3%& skip:88.2%& L0:35.7% L1:62.8% BI: 1.4%
x264 [info]: direct mvs& spatial:100.0% temporal:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 12.4% 36.6% 6.4% inter: 1.2% 4.4% 0.0%
x264 [info]: i16 v,h,dc,p: 39% 24% 13% 25%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 11% 38%& 6%& 6%& 5%& 5%& 5%& 6%
x264 [info]: i8c dc,h,v,p: 63% 18% 12%& 7%
x264 [info]: Weighted P-Frames: Y:5.8% UV:3.7%
x264 [info]: ref P L0: 57.2% 12.7% 18.3%& 6.4%& 4.5%& 0.9%& 0.0%
x264 [info]: ref B L0: 87.8%& 8.1%& 3.1%& 1.0%
x264 [info]: ref B L1: 97.3%& 2.7%
x264 [info]: SSIM Mean Y:0..347db)
x264 [info]: PSNR Mean Y:46.141 U:49.829 V:49.772 Avg:47.005 Global:45.993 kb/s:423.30
encoded 34524 frames, 10.68 fps, 423.30 kb/s
  crf28+的x264输出信息&&
commandline: "F:\MeGUI\MeGUI_2050_x86\tools\x264\x264.exe" --profile main --level 3.2 --preset placebo --tune animation --crf 28.0 --threads 2 --bframes 6 --merange 32 --subme 9 --psnr --ssim --sar 1:1 --output "F:\Temp\3\a720\Fate_Zero07.264" "F:\Temp\3\a720\Fate_Zero07.mkv.avs"
avs [info]: :1 @
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile Main, level 3.2
x264 [info]: frame I:304&& Avg QP:23.04& size: 31776& PSNR Mean Y:47.36 U:50.73 V:50.77 Avg:48.19 Global:47.56
x264 [info]: frame P:8996& Avg QP:25.62& size:& 5236& PSNR Mean Y:46.11 U:49.71 V:49.64 Avg:46.95 Global:45.91
x264 [info]: frame B:25224 Avg QP:32.49& size:&& 765& PSNR Mean Y:46.19 U:49.89 V:49.83 Avg:47.06 Global:46.06
x264 [info]: consecutive B-frames:& 4.4%& 5.7%& 6.2% 40.6%& 9.3% 33.5%& 0.2%
x264 [info]: mb I& I16..4: 64.9%& 0.0% 35.1%
x264 [info]: mb P& I16..4: 20.2%& 0.0%& 2.2%& P16..4: 29.2%& 2.0%& 0.4%& 0.0%& 0.0%&&& skip:45.9%
x264 [info]: mb B& I16..4:& 0.7%& 0.0%& 0.1%& B16..8: 10.1%& 0.5%& 0.1%& direct: 0.3%& skip:88.2%& L0:35.5% L1:63.0% BI: 1.5%
x264 [info]: direct mvs& spatial:100.0% temporal:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 12.2% 36.9% 6.4% inter: 1.2% 4.4% 0.0%
x264 [info]: i16 v,h,dc,p: 39% 24% 13% 24%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 12% 38%& 6%& 6%& 5%& 5%& 5%& 6%
x264 [info]: i8c dc,h,v,p: 62% 19% 12%& 7%
x264 [info]: Weighted P-Frames: Y:6.0% UV:3.8%
x264 [info]: ref P L0: 56.8% 14.3% 17.5%& 6.1%& 4.4%& 0.9%& 0.0%
x264 [info]: ref B L0: 88.0%& 7.9%& 3.1%& 1.0%
x264 [info]: ref B L1: 97.3%& 2.7%
x264 [info]: SSIM Mean Y:0..389db)
x264 [info]: PSNR Mean Y:46.181 U:49.848 V:49.791 Avg:47.041 Global:46.028 kb/s:422.60
encoded 34524 frames, 5.39 fps, 422.60 kb/s
  pass2的x264输出信息&&
commandline: "F:\MeGUI\MeGUI_2050_x86\tools\x264\x264.exe" --profile main --level 3.2 --preset placebo --tune animation --pass 2 --bitrate 422 --stats "F:\Temp\3\a720\Fate_Zero07.stats" --threads 2 --bframes 6 --merange 32 --me umh --subme 9 --psnr --ssim --sar 1:1 --output "F:\Temp\3\a720\Fate_Zero07.264" "F:\Temp\3\a720\Fate_Zero07.mkv.avs"
avs [info]: :1 @
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile Main, level 3.2
x264 [info]: frame I:301&& Avg QP:23.02& size: 32258& PSNR Mean Y:47.42 U:50.76 V:50.80 Avg:48.23 Global:47.49
x264 [info]: frame P:8942& Avg QP:25.67& size:& 5277& PSNR Mean Y:46.08 U:49.70 V:49.63 Avg:46.92 Global:45.74
x264 [info]: frame B:25281 Avg QP:32.58& size:&& 756& PSNR Mean Y:46.17 U:49.89 V:49.84 Avg:47.04 Global:45.89
x264 [info]: consecutive B-frames:& 4.2%& 5.5%& 6.2% 40.9%& 9.2% 33.8%& 0.2%
x264 [info]: mb I& I16..4: 65.3%& 0.0% 34.7%
x264 [info]: mb P& I16..4: 20.5%& 0.0%& 2.3%& P16..4: 29.9%& 2.1%& 0.5%& 0.0%& 0.0%&&& skip:44.7%
x264 [info]: mb B& I16..4:& 0.7%& 0.0%& 0.1%& B16..8: 10.2%& 0.5%& 0.1%& direct: 0.3%& skip:88.1%& L0:35.9% L1:62.7% BI: 1.4%
x264 [info]: direct mvs& spatial:93.0% temporal:7.0%
x264 [info]: coded y,uvDC,uvAC intra: 12.4% 36.8% 6.5% inter: 1.2% 4.4% 0.0%
x264 [info]: i16 v,h,dc,p: 39% 23% 13% 24%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 18% 11% 39%& 6%& 6%& 5%& 5%& 5%& 6%
x264 [info]: i8c dc,h,v,p: 63% 18% 12%& 7%
x264 [info]: Weighted P-Frames: Y:5.8% UV:3.7%
x264 [info]: ref P L0: 55.2% 14.4% 19.6%& 6.2%& 3.9%& 0.7%& 0.0%
x264 [info]: ref B L0: 87.3%& 8.9%& 3.0%& 0.8%
x264 [info]: ref B L1: 97.1%& 2.9%
x264 [info]: SSIM Mean Y:0..290db)
x264 [info]: PSNR Mean Y:46.154 U:49.848 V:49.793 Avg:47.017 Global:45.860 kb/s:422.32
encoded 34524 frames, 12.31 fps, 422.32 kb/s
  为了方便比较,我上传了crf28+转码后的视频&&
4.2 720P电影
  原视频&&
名称:《极品飞车12:无间风云》预告片
下载地址:
文件大小:137,215,415
时长:0:05:33
帧率:29.970
视频码率:3072 Kbps
封装格式:wmv
  压制的结果为&&
29,831,946
30,195,040
29,893,859
  可看出&&
1.crf28+的压制时长几乎是crf28的两倍。但它的画质稍微好一些,SSIM提升了0.000302。
2.pass2的压制时长 几乎与 crf28+ 一样了。但它的SSIM不仅不如 crf28+,甚至不如 crf28。PSNR评分也是如此。
  crf28的x264输出信息&&
commandline: "F:\MeGUI\MeGUI_2050_x86\tools\x264\x264.exe" --profile main --level 3.2 --preset placebo --tune animation --crf 28.0 --threads 2 --bframes 6 --merange 32 --me umh --subme 9 --psnr --ssim --sar 1:1 --output "F:\Temp\3\f720\nfsundercover.264" "F:\Temp\3\f720\nfsundercover.wmv.avs"
avs [info]: :1 @
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile Main, level 3.2
x264 [info]: frame I:47&&& Avg QP:24.31& size: 41912& PSNR Mean Y:44.20 U:50.16 V:50.33 Avg:45.43 Global:44.23
x264 [info]: frame P:6507& Avg QP:28.03& size:& 3548& PSNR Mean Y:42.11 U:48.63 V:48.99 Avg:43.41 Global:42.92
x264 [info]: frame B:3447& Avg QP:34.08& size:&& 962& PSNR Mean Y:40.95 U:47.63 V:47.74 Avg:42.24 Global:42.05
x264 [info]: consecutive B-frames: 52.7%& 2.1% 13.5% 21.1%& 7.7%& 2.6%& 0.2%
x264 [info]: mb I& I16..4: 55.4%& 0.0% 44.6%
x264 [info]: mb P& I16..4:& 3.6%& 0.0%& 0.4%& P16..4: 34.1%& 1.9%& 0.5%& 0.0%& 0.0%&&& skip:59.5%
x264 [info]: mb B& I16..4:& 0.3%& 0.0%& 0.0%& B16..8: 16.8%& 0.6%& 0.1%& direct: 0.3%& skip:81.9%& L0:40.3% L1:58.9% BI: 0.8%
x264 [info]: direct mvs& spatial:100.0% temporal:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 16.0% 33.8% 5.2% inter: 2.9% 3.7% 0.0%
x264 [info]: i16 v,h,dc,p: 38% 23% 14% 25%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 15% 32%& 5%& 6%& 5%& 7%& 8%& 8%
x264 [info]: i8c dc,h,v,p: 58% 24% 12%& 7%
x264 [info]: Weighted P-Frames: Y:0.8% UV:0.6%
x264 [info]: ref P L0: 59.2% 17.2% 14.6%& 3.6%& 3.0%& 2.2%& 0.0%
x264 [info]: ref B L0: 87.1%& 8.4%& 3.5%& 1.0%
x264 [info]: ref B L1: 94.2%& 5.8%
x264 [info]: SSIM Mean Y:0..501db)
x264 [info]: PSNR Mean Y:41.718 U:48.295 V:48.564 Avg:43.017 Global:42.604 kb/s:680.17
encoded 10001 frames, 8.58 fps, 680.17 kb/s
  crf28+的x264输出信息&&
commandline: "F:\MeGUI\MeGUI_2050_x86\tools\x264\x264.exe" --profile main --level 3.2 --preset placebo --tune animation --crf 28.0 --threads 2 --bframes 6 --merange 32 --subme 9 --psnr --ssim --sar 1:1 --output "F:\Temp\3\f720\nfsundercover.264" "F:\Temp\3\f720\nfsundercover.wmv.avs"
avs [info]: :1 @
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile Main, level 3.2
x264 [info]: frame I:47&&& Avg QP:24.29& size: 41931& PSNR Mean Y:44.21 U:50.18 V:50.34 Avg:45.44 Global:44.24
x264 [info]: frame P:6649& Avg QP:28.00& size:& 3554& PSNR Mean Y:42.21 U:48.64 V:48.99 Avg:43.51 Global:42.96
x264 [info]: frame B:3305& Avg QP:34.08& size:&& 948& PSNR Mean Y:40.97 U:47.63 V:47.73 Avg:42.26 Global:42.07
x264 [info]: consecutive B-frames: 54.5%& 2.3% 13.1% 20.0%& 7.4%& 2.5%& 0.1%
x264 [info]: mb I& I16..4: 55.4%& 0.0% 44.6%
x264 [info]: mb P& I16..4:& 3.6%& 0.0%& 0.3%& P16..4: 34.1%& 1.8%& 0.4%& 0.0%& 0.0%&&& skip:59.6%
x264 [info]: mb B& I16..4:& 0.3%& 0.0%& 0.0%& B16..8: 16.7%& 0.6%& 0.1%& direct: 0.3%& skip:82.1%& L0:40.3% L1:58.8% BI: 0.9%
x264 [info]: direct mvs& spatial:100.0% temporal:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 15.5% 33.7% 5.1% inter: 3.0% 3.7% 0.0%
x264 [info]: i16 v,h,dc,p: 37% 23% 14% 25%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 15% 32%& 5%& 6%& 5%& 7%& 8%& 8%
x264 [info]: i8c dc,h,v,p: 57% 24% 12%& 7%
x264 [info]: Weighted P-Frames: Y:0.8% UV:0.6%
x264 [info]: ref P L0: 59.9% 17.6% 14.0%& 3.4%& 3.0%& 2.2%& 0.0%
x264 [info]: ref B L0: 87.2%& 8.3%& 3.5%& 1.0%
x264 [info]: ref B L1: 94.3%& 5.7%
x264 [info]: SSIM Mean Y:0..548db)
x264 [info]: PSNR Mean Y:41.812 U:48.314 V:48.578 Avg:43.103 Global:42.653 kb/s:688.91
encoded 10001 frames, 4.13 fps, 688.91 kb/s
  pass2的x264输出信息&&
commandline: "F:\MeGUI\MeGUI\tools\x264\x264.exe" --profile main --level 3.2 --preset placebo --tune film --pass 2 --bitrate 681 --stats "F:\Temp\3\f720\nfsundercover.stats" --threads 2 --bframes 6 --merange 32 --me umh --subme 9 --psnr --ssim --sar 1:1 --output "F:\Temp\3\f720\nfsundercover.264" "F:\Temp\3\f720\nfsundercover.wmv.avs"
avs [info]: :1 @
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile Main, level 3.2
x264 [info]: frame I:47&&& Avg QP:24.55& size: 41881& PSNR Mean Y:43.61 U:49.95 V:50.19 Avg:44.87 Global:43.64
x264 [info]: frame P:6507& Avg QP:27.86& size:& 3508& PSNR Mean Y:41.47 U:48.52 V:48.91 Avg:42.82 Global:42.24
x264 [info]: frame B:3447& Avg QP:34.20& size:& 1055& PSNR Mean Y:40.23 U:47.51 V:47.63 Avg:41.58 Global:41.35
x264 [info]: consecutive B-frames: 52.7%& 2.1% 13.5% 21.1%& 7.7%& 2.6%& 0.2%
x264 [info]: mb I& I16..4: 53.4%& 0.0% 46.6%
x264 [info]: mb P& I16..4:& 3.2%& 0.0%& 0.4%& P16..4: 35.4%& 1.9%& 0.6%& 0.0%& 0.0%&&& skip:58.6%
x264 [info]: mb B& I16..4:& 0.4%& 0.0%& 0.0%& B16..8: 21.4%& 0.6%& 0.1%& direct: 0.3%& skip:77.2%& L0:40.8% L1:58.6% BI: 0.6%
x264 [info]: direct mvs& spatial:93.6% temporal:6.4%
x264 [info]: coded y,uvDC,uvAC intra: 18.5% 39.5% 5.8% inter: 2.4% 4.4% 0.0%
x264 [info]: i16 v,h,dc,p: 41% 24% 15% 21%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:& 9% 10% 26%& 6%& 9%& 7% 10% 10% 12%
x264 [info]: i8c dc,h,v,p: 55% 25% 14%& 6%
x264 [info]: Weighted P-Frames: Y:0.8% UV:0.6%
x264 [info]: ref P L0: 60.7% 14.5% 15.7%& 4.4%& 3.0%& 1.7%& 0.0%
x264 [info]: ref B L0: 88.6%& 8.1%& 2.6%& 0.7%
x264 [info]: ref B L1: 94.6%& 5.4%
x264 [info]: SSIM Mean Y:0..265db)
x264 [info]: PSNR Mean Y:41.048 U:48.178 V:48.476 Avg:42.399 Global:41.914 kb/s:681.66
encoded 10001 frames, 9.84 fps, 681.66 kb/s
  为了方便比较,我上传了crf28+转码后的视频&&
  建议&&
1.在一般情况下,使用crf28。速度较快,画质也不错。
2.在时间充裕的情况下,可以使用crf28+。画质更好一点。
3.仅在严格限制码率的场合下,才使用二次编码。
五、1080P的评测数据(面向视频压制参数研究者)
  虽然U8800+不支持硬解1080P,但我为了测试的完备性,也将1080P的视频测试了一下。
  测试方法与原来的一样,分别测试crf28、crf28+、pass2这三套参数。
5.1 1080P动画
  原视频&&
名称:我的妹妹不可能那么可爱-11 我的妹妹不可能这么女仆
下载地址:
文件大小:674,655,740
时长:0:24:13
帧率:23.976
视频码率:3713
封装格式:mkv
  压制的结果为&&
149,667,486
149,461,723
149,508,209
  可看出&&
1.crf28+的压制时长几乎是crf28的两倍。但它的画质稍微好一些,SSIM提升了0.0000816。
2.pass2的压制时长 几乎与 crf28+ 一样了。但它的SSIM不仅不如 crf28+,甚至不如 crf28。仅PSNR评分高。
  crf28的x264输出信息&&
commandline: "F:\MeGUI\MeGUI_2050_x86\tools\x264\x264.exe" --profile main --level 3.2 --preset placebo --tune animation --crf 28.0 --threads 2 --bframes 6 --merange 32 --me umh --subme 9 --psnr --ssim --sar 1:1 --output "F:\Temp\3\a1080\Oreimo11.264" "F:\Temp\3\a1080\Oreimo11.mkv.avs"
avs [info]: p 1:1 @
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=1/1
x264 [warning]: frame MB size (120x68) & level limit (5120)
x264 [warning]: DPB size (4 frames,
bytes) & level limit (2 frames, 7864320 bytes)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile Main, level 3.2
x264 [info]: frame I:351&& Avg QP:21.02& size: 60253& PSNR Mean Y:48.63 U:52.31 V:52.85 Avg:49.56 Global:48.55
x264 [info]: frame P:10277 Avg QP:25.00& size:& 9678& PSNR Mean Y:46.01 U:50.37 V:50.87 Avg:47.04 Global:45.06
x264 [info]: frame B:27460 Avg QP:33.16& size:&& 826& PSNR Mean Y:46.87 U:51.05 V:51.54 Avg:47.87 Global:46.41
x264 [info]: consecutive B-frames:& 4.9% 13.7%& 6.2% 18.1% 14.9% 22.4% 19.8%
x264 [info]: mb I& I16..4: 68.0%& 0.0% 32.0%
x264 [info]: mb P& I16..4:& 8.3%& 0.0%& 1.8%& P16..4: 17.8%& 2.4%& 0.5%& 0.1%& 0.0%&&& skip:69.0%
x264 [info]: mb B& I16..4:& 0.2%& 0.0%& 0.0%& B16..8:& 4.9%& 0.4%& 0.1%& direct: 0.1%& skip:94.3%& L0:36.8% L1:60.9% BI: 2.3%
x264 [info]: direct mvs& spatial:97.5% temporal:2.5%
x264 [info]: coded y,uvDC,uvAC intra: 18.8% 34.6% 12.6% inter: 1.1% 2.3% 0.1%
x264 [info]: i16 v,h,dc,p: 54% 22%& 9% 15%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 14% 27%& 7%& 7%& 6%& 6%& 6%& 6%
x264 [info]: i8c dc,h,v,p: 62% 17% 15%& 6%
x264 [info]: Weighted P-Frames: Y:1.2% UV:0.8%
x264 [info]: ref P L0: 72.4% 11.1% 16.4%& 0.1%
x264 [info]: ref B L0: 89.6% 10.4%
x264 [info]: ref B L1: 96.6%& 3.4%
x264 [info]: SSIM Mean Y:0..739db)
x264 [info]: PSNR Mean Y:46.652 U:50.879 V:51.372 Avg:47.660 Global:46.017 kb/s:721.57
encoded 38088 frames, 7.66 fps, 721.57 kb/s
  crf28+的x264输出信息&&
commandline: "F:\MeGUI\MeGUI_2050_x86\tools\x264\x264.exe" --profile main --level 3.2 --preset placebo --tune animation --crf 28.0 --threads 2 --bframes 6 --merange 32 --subme 9 --psnr --ssim --sar 1:1 --output "F:\Temp\3\a1080\Oreimo11.264" "F:\Temp\3\a1080\Oreimo11.mkv.avs"
avs [info]: p 1:1 @
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=1/1
x264 [warning]: frame MB size (120x68) & level limit (5120)
x264 [warning]: DPB size (4 frames,
bytes) & level limit (2 frames, 7864320 bytes)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile Main, level 3.2
x264 [info]: frame I:349&& Avg QP:20.98& size: 60375& PSNR Mean Y:48.61 U:52.30 V:52.84 Avg:49.54 Global:48.54
x264 [info]: frame P:10560 Avg QP:25.04& size:& 9552& PSNR Mean Y:46.00 U:50.34 V:50.84 Avg:47.02 Global:45.07
x264 [info]: frame B:27179 Avg QP:33.15& size:&& 778& PSNR Mean Y:46.96 U:51.09 V:51.58 Avg:47.95 Global:46.49
x264 [info]: consecutive B-frames:& 5.6% 14.2%& 6.8% 17.5% 14.1% 22.1% 19.7%
x264 [info]: mb I& I16..4: 67.9%& 0.0% 32.1%
x264 [info]: mb P& I16..4:& 8.2%& 0.0%& 1.7%& P16..4: 17.9%& 2.4%& 0.5%& 0.1%& 0.0%&&& skip:69.2%
x264 [info]: mb B& I16..4:& 0.2%& 0.0%& 0.0%& B16..8:& 4.8%& 0.4%& 0.1%& direct: 0.1%& skip:94.5%& L0:36.4% L1:61.4% BI: 2.2%
x264 [info]: direct mvs& spatial:97.5% temporal:2.5%
x264 [info]: coded y,uvDC,uvAC intra: 18.3% 34.4% 12.3% inter: 1.1% 2.3% 0.1%
x264 [info]: i16 v,h,dc,p: 54% 22%& 9% 15%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 14% 27%& 7%& 7%& 6%& 6%& 6%& 6%
x264 [info]: i8c dc,h,v,p: 62% 17% 15%& 6%
x264 [info]: Weighted P-Frames: Y:1.3% UV:0.9%
x264 [info]: ref P L0: 72.5% 11.6% 15.8%& 0.1%
x264 [info]: ref B L0: 89.9% 10.1%
x264 [info]: ref B L1: 96.7%& 3.3%
x264 [info]: SSIM Mean Y:0..781db)
x264 [info]: PSNR Mean Y:46.707 U:50.891 V:51.384 Avg:47.709 Global:46.063 kb/s:720.53
encoded 38088 frames, 4.43 fps, 720.53 kb/s
  pass2的x264输出信息&&
commandline: "F:\MeGUI\MeGUI_2050_x86\tools\x264\x264.exe" --profile main --level 3.2 --preset placebo --tune animation --pass 2 --bitrate 720 --stats "F:\Temp\3\a1080\Oreimo11.stats" --threads 2 --bframes 6 --merange 32 --me umh --subme 9 --psnr --ssim --sar 1:1 --output "F:\Temp\3\a1080\Oreimo11.264" "F:\Temp\3\a1080\Oreimo11.mkv.avs"
avs [info]: p 1:1 @
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=1/1
x264 [warning]: frame MB size (120x68) & level limit (5120)
x264 [warning]: DPB size (4 frames,
bytes) & level limit (2 frames, 7864320 bytes)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile Main, level 3.2
x264 [info]: frame I:351&& Avg QP:20.70& size: 61277& PSNR Mean Y:48.82 U:52.49 V:53.02 Avg:49.75 Global:48.57
x264 [info]: frame P:10277 Avg QP:25.03& size:& 9624& PSNR Mean Y:46.05 U:50.38 V:50.89 Avg:47.06 Global:44.80
x264 [info]: frame B:27460 Avg QP:33.06& size:&& 827& PSNR Mean Y:46.99 U:51.15 V:51.64 Avg:47.99 Global:46.28
x264 [info]: consecutive B-frames:& 4.9% 13.7%& 6.2% 18.1% 14.9% 22.4% 19.8%
x264 [info]: mb I& I16..4: 67.8%& 0.0% 32.2%
x264 [info]: mb P& I16..4:& 8.7%& 0.0%& 2.0%& P16..4: 17.6%& 2.4%& 0.5%& 0.1%& 0.0%&&& skip:68.7%
x264 [info]: mb B& I16..4:& 0.2%& 0.0%& 0.1%& B16..8:& 5.1%& 0.4%& 0.1%& direct: 0.1%& skip:94.1%& L0:36.7% L1:61.5% BI: 1.8%
x264 [info]: direct mvs& spatial:89.0% temporal:11.0%
x264 [info]: coded y,uvDC,uvAC intra: 18.9% 35.0% 12.8% inter: 1.0% 2.2% 0.0%
x264 [info]: i16 v,h,dc,p: 53% 23%& 9% 15%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 14% 28%& 7%& 6%& 6%& 6%& 6%& 6%
x264 [info]: i8c dc,h,v,p: 62% 17% 15%& 6%
x264 [info]: Weighted P-Frames: Y:1.2% UV:0.8%
x264 [info]: ref P L0: 74.8% 12.4% 12.7%& 0.1%
x264 [info]: ref B L0: 89.2% 10.8%
x264 [info]: ref B L1: 96.4%& 3.6%
x264 [info]: SSIM Mean Y:0..688db)
x264 [info]: PSNR Mean Y:46.755 U:50.954 V:51.448 Avg:47.757 Global:45.844 kb/s:720.77
encoded 38088 frames, 9.58 fps, 720.77 kb/s
  为了方便比较,我上传了crf28+转码后的视频&&
5.2 1080P电影
  原视频&&
名称:CoralReef.1080p(珊瑚礁)
下载地址:(忘了当初在哪下载的了。现在网上有很多)
文件大小:107,891,576
时长:0:01:43
帧率:23.976
视频码率:8000
封装格式:wmv
  压制的结果为&&
40,321,050
33,210,072
32,116,543
  可看出&&
1.crf28+的压制时长几乎是crf28的两倍。这次的画质稍微差一些,SSIM降低了0.0012539。但仔细观察后发现,它的码率下降了500Kbps。
2.pass2的压制时长 几乎与 crf28+ 一样了。但它的画质仍是垫底,PSNR、SSIM均不如。
  crf28的x264输出信息&&
commandline: "F:\MeGUI\MeGUI\tools\x264\x264.exe" --profile main --level 3.2 --preset placebo --tune film --crf 28.0 --threads 2 --bframes 6 --merange 32 --me umh --subme 9 --psnr --ssim --sar 1:1 --output "F:\Temp\3\f1080\CoralReef." "F:\Temp\3\f1080\CoralReef.1080p.wmv.avs"
avs [info]: p 1:1 @
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=1/1
x264 [warning]: frame MB size (120x68) & level limit (5120)
x264 [warning]: DPB size (4 frames,
bytes) & level limit (2 frames, 7864320 bytes)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile Main, level 3.2
x264 [info]: frame I:18&&& Avg QP:23.95& size:102524& PSNR Mean Y:45.01 U:52.03 V:50.78 Avg:46.18 Global:43.22
x264 [info]: frame P:1187& Avg QP:27.96& size: 22600& PSNR Mean Y:41.63 U:47.64 V:46.87 Avg:42.74 Global:41.22
x264 [info]: frame B:1165& Avg QP:29.17& size:& 9608& PSNR Mean Y:42.44 U:47.55 V:47.01 Avg:43.44 Global:41.34
x264 [info]: consecutive B-frames: 31.8%& 2.6% 28.0% 21.1% 12.2%& 4.3%& 0.0%
x264 [info]: mb I& I16..4: 64.5%& 0.0% 35.5%
x264 [info]: mb P& I16..4: 21.5%& 0.0%& 1.8%& P16..4: 55.0%& 4.2%& 0.5%& 0.0%& 0.0%&&& skip:17.0%
x264 [info]: mb B& I16..4:& 3.6%& 0.0%& 0.4%& B16..8: 32.0%& 2.3%& 0.5%& direct: 4.7%& skip:56.5%& L0:48.7% L1:48.8% BI: 2.5%
x264 [info]: direct mvs& spatial:99.9% temporal:0.1%
x264 [info]: coded y,uvDC,uvAC intra: 17.1% 48.4% 5.4% inter: 9.2% 20.3% 0.3%
x264 [info]: i16 v,h,dc,p: 39% 25% 20% 17%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:& 3%& 5% 25%& 6% 11%& 8% 13%& 9% 20%
x264 [info]: i8c dc,h,v,p: 47% 30% 18%& 5%
x264 [info]: Weighted P-Frames: Y:10.7% UV:8.3%
x264 [info]: ref P L0: 63.6% 18.6% 17.3%& 0.4%
x264 [info]: ref B L0: 83.1% 16.9%
x264 [info]: ref B L1: 90.7%& 9.3%
x264 [info]: SSIM Mean Y:0..278db)
x264 [info]: PSNR Mean Y:42.050 U:47.631 V:46.967 Avg:43.113 Global:41.288 kb/s:3226.26
encoded 2370 frames, 2.47 fps, 3226.26 kb/s
  crf28+的x264输出信息&&
commandline: "F:\MeGUI\MeGUI_2050_x86\tools\x264\x264.exe" --profile main --level 3.2 --preset placebo --tune animation --crf 28.0 --threads 2 --bframes 6 --merange 32 --subme 9 --psnr --ssim --sar 1:1 --output "F:\Temp\3\f1080\CoralReef." "F:\Temp\3\f1080\CoralReef.1080p.wmv.avs"
avs [info]: p 1:1 @
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=1/1
x264 [warning]: frame MB size (120x68) & level limit (5120)
x264 [warning]: DPB size (4 frames,
bytes) & level limit (2 frames, 7864320 bytes)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile Main, level 3.2
x264 [info]: frame I:18&&& Avg QP:25.35& size: 91909& PSNR Mean Y:44.69 U:51.44 V:50.23 Avg:45.82 Global:42.89
x264 [info]: frame P:1184& Avg QP:29.21& size: 18998& PSNR Mean Y:41.74 U:47.11 V:46.35 Avg:42.76 Global:41.37
x264 [info]: frame B:1168& Avg QP:31.87& size:& 7367& PSNR Mean Y:42.33 U:46.88 V:46.29 Avg:43.23 Global:41.43
x264 [info]: consecutive B-frames: 32.0%& 2.3% 27.1% 20.4% 12.0%& 5.6%& 0.6%
x264 [info]: mb I& I16..4: 68.7%& 0.0% 31.3%
x264 [info]: mb P& I16..4: 26.4%& 0.0%& 1.6%& P16..4: 44.8%& 3.2%& 0.3%& 0.0%& 0.0%&&& skip:23.7%
x264 [info]: mb B& I16..4:& 2.6%& 0.0%& 0.3%& B16..8: 22.7%& 2.2%& 0.4%& direct: 3.0%& skip:68.8%& L0:47.0% L1:50.0% BI: 2.9%
x264 [info]: direct mvs& spatial:99.9% temporal:0.1%
x264 [info]: coded y,uvDC,uvAC intra: 12.6% 40.0% 4.1% inter: 8.2% 13.5% 0.2%
x264 [info]: i16 v,h,dc,p: 37% 25% 18% 20%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:& 5%& 9% 37%& 5%& 8%& 5%& 9%& 6% 15%
x264 [info]: i8c dc,h,v,p: 59% 24% 13%& 4%
x264 [info]: Weighted P-Frames: Y:10.9% UV:8.5%
x264 [info]: ref P L0: 60.4% 23.9% 15.5%& 0.3%
x264 [info]: ref B L0: 85.0% 15.0%
x264 [info]: ref B L1: 92.3%& 7.7%
x264 [info]: SSIM Mean Y:0..135db)
x264 [info]: PSNR Mean Y:42.057 U:47.029 V:46.351 Avg:43.015 Global:41.405 kb/s:2650.77
encoded 2370 frames, 1.49 fps, 2650.77 kb/s
  pass2的x264输出信息&&
commandline: "F:\MeGUI\MeGUI\tools\x264\x264.exe" --profile main --level 3.2 --preset placebo --tune film --pass 2 --bitrate 2543 --stats "F:\Temp\3\f1080\CoralReef.1080p.stats" --threads 2 --bframes 6 --merange 32 --me umh --subme 9 --psnr --ssim --sar 1:1 --output "F:\Temp\3\f1080\CoralReef." "F:\Temp\3\f1080\CoralReef.1080p.wmv.avs"
avs [info]: p 1:1 @
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=1/1
x264 [warning]: frame MB size (120x68) & level limit (5120)
x264 [warning]: DPB size (4 frames,
bytes) & level limit (2 frames, 7864320 bytes)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile Main, level 3.2
x264 [info]: frame I:18&&& Avg QP:25.31& size: 89896& PSNR Mean Y:44.29 U:51.27 V:50.04 Avg:45.46 Global:42.34
x264 [info]: frame P:1187& Avg QP:29.71& size: 17927& PSNR Mean Y:40.71 U:46.92 V:46.13 Avg:41.84 Global:40.13
x264 [info]: frame B:1165& Avg QP:30.98& size:& 7522& PSNR Mean Y:41.77 U:47.04 V:46.47 Avg:42.79 Global:40.52
x264 [info]: consecutive B-frames: 31.8%& 2.6% 28.0% 21.1% 12.2%& 4.3%& 0.0%
x264 [info]: mb I& I16..4: 67.0%& 0.0% 33.0%
x264 [info]: mb P& I16..4: 22.1%& 0.0%& 1.5%& P16..4: 50.6%& 3.2%& 0.4%& 0.0%& 0.0%&&& skip:22.3%
x264 [info]: mb B& I16..4:& 2.9%& 0.0%& 0.3%& B16..8: 29.1%& 2.0%& 0.4%& direct: 3.7%& skip:61.7%& L0:46.8% L1:51.1% BI: 2.0%
x264 [info]: direct mvs& spatial:89.2% temporal:10.8%
x264 [info]: coded y,uvDC,uvAC intra: 12.6% 43.6% 4.1% inter: 6.8% 16.6% 0.2%
x264 [info]: i16 v,h,dc,p: 40% 25% 18% 17%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:& 3%& 4% 26%& 6% 12%& 7% 13%& 8% 19%
x264 [info]: i8c dc,h,v,p: 54% 27% 15%& 4%
x264 [info]: Weighted P-Frames: Y:10.7% UV:8.3%
x264 [info]: ref P L0: 62.5% 18.6% 18.5%& 0.5%
x264 [info]: ref B L0: 81.8% 18.2%
x264 [info]: ref B L1: 90.9%& 9.1%
x264 [info]: SSIM Mean Y:0..566db)
x264 [info]: PSNR Mean Y:41.258 U:47.016 V:46.328 Avg:42.333 Global:40.333 kb/s:2562.26
encoded 2370 frames, 3.70 fps, 2562.26 kb/s
  为了方便比较,我上传了crf28+转码后的视频&&
  建议&&
1.在一般情况下,使用crf28。速度较快,画质也不错。
2.在时间充裕的情况下,可以使用crf28+。画质一般能好一点,而且更能节省码率。
3.仅在严格限制码率的场合下,才使用二次编码。
  参考文献&&
H.264/MPEG-4 AVC:
X264 使用介绍:
尽量不浪费压制时间的简单视频高压要点:
x264 起多少个线程比较好:
X264 参数设定详细解释:
运用AVS+MeGUI制作MP4-AVC:

我要回帖

更多关于 h264文件怎么播放 的文章

 

随机推荐