[FFmpeg-user] Configure lossless h264

jaden phamthuyngoc at yahoo.com
Tue Jan 6 16:27:04 CET 2015


Hello, 
I would like to set up a lossless compression and use av_opt_set to set
qp=0. The output qp is q=-1--1, but the results are not correct. Please tell
me how to set this parameter in ffmpeg. Thanks you.

This is the setting: 

  codecContext->pix_fmt = AV_PIX_FMT_YUV420P;
  codecContext->codec_id = AV_CODEC_ID_H264 ;
  codecContext->width    = width;
  codecContext->height   = height;
  codecContext->time_base.den = 25;
  codecContext->time_base.num = 1;
  codecContext->max_b_frames  = 0;
*  av_opt_set(codecContext->priv_data, "qp", 0, 0);*


And the result:


    Stream #0:0: Video: h264 (libx264), yuv420p, 512x512, q=-1--1, 25 tbc
[h264 @ 0x2052ec0] Using AVStream.codec.time_base as a timebase hint to the
muxer is deprecated. Set AVStream.time_base instead.
[libx264 @ 0x2053960] frame I:4     Avg QP:19.85  size: 16631
[libx264 @ 0x2053960] frame P:774   Avg QP:22.96  size:  4185
[libx264 @ 0x2053960] mb I  I16..4:  3.5% 79.2% 17.4%
[libx264 @ 0x2053960] mb P  I16..4:  0.0%  1.6%  0.0%  P16..4: 43.7% 14.7% 
7.0%  0.0%  0.0%    skip:32.8%
[libx264 @ 0x2053960] 8x8 transform intra:91.6% inter:73.2%
[libx264 @ 0x2053960] coded y,uvDC,uvAC intra: 80.4% 0.0% 0.0% inter: 32.9%
0.0% 0.0%
[libx264 @ 0x2053960] i16 v,h,dc,p: 19% 19% 60%  3%
[libx264 @ 0x2053960] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  7% 11% 32%  7% 10%  7%
10%  6%  9%
[libx264 @ 0x2053960] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 12% 17% 23%  8% 11%  8% 
9%  6%  7%
[libx264 @ 0x2053960] i8c dc,h,v,p: 100%  0%  0%  0%
[libx264 @ 0x2053960] Weighted P-Frames: Y:51.9% UV:0.0%
[libx264 @ 0x2053960] ref P L0: 87.1% 12.9%
[libx264 @ 0x2053960] kb/s:849.89
Input #0, h264, from '../../video/tmp.h264':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (High), yuv420p, 512x512, 25 fps, 25 tbr, 1200k
tbn, 50 tbc



--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Configure-lossless-h264-tp4668775.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list