dxxzx / CPractice

practice in studing
0 stars 0 forks source link

fail while using libx264 encoder #1

Open XingxianDeng opened 6 years ago

XingxianDeng commented 6 years ago

failed while using libx264 encoder.

need set below parameter to encoder:

enc_codec_ctx->me_range = 16;
enc_codec_ctx->max_qdiff = 4;
enc_codec_ctx->qmin = 10;
enc_codec_ctx->qmax = 51;
enc_codec_ctx->qcompress = 0.6;
XingxianDeng commented 6 years ago

error log when added above parameter.

[mp4 @ 0x91bce0] pts has no value
in: pts:846 pts_time:22.0996 dts:846 dts_time:22.0996 duration:1 duration_time:0.0261224 stream_index:1
out: pts:974592 pts_time:22.0996 dts:974592 dts_time:22.0996 duration:1152 duration_time:0.0261224 stream_index:1
[mp4 @ 0x91bce0] pts has no value
[libx264 @ 0x91a920] specified frame type is not compatible with max B-frames
Succeed to encode frame:        size:11498
out: pts:NOPTS pts_time:NOPTS dts:663663 dts_time:22.1221 duration:1001 duration_time:0.0333667 stream_index:2
in: pts:NOPTS pts_time:NOPTS dts:663 dts_time:22.1221 duration:1 duration_time:0.0333667 stream_index:0
out: pts:NOPTS pts_time:NOPTS dts:1990989 dts_time:22.1221 duration:3003 duration_time:0.0333667 stream_index:0
[mp4 @ 0x91bce0] pts has no value
in: pts:847 pts_time:22.1257 dts:847 dts_time:22.1257 duration:1 duration_time:0.0261224 stream_index:1
out: pts:975744 pts_time:22.1257 dts:975744 dts_time:22.1257 duration:1152 duration_time:0.0261224 stream_index:1
[mp4 @ 0x91bce0] pts has no value
[libx264 @ 0x91a920] specified frame type is not compatible with max B-frames
Flush Encoder: Succeed to encode 1 frame!       size:16803
[mp4 @ 0x91bce0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1990989 >= NOPTS
[libx264 @ 0x91a920] specified frame type is not compatible with max B-frames
Flush Encoder: Succeed to encode 1 frame!       size:14439
[mp4 @ 0x91bce0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1990989 >= NOPTS
Flush Encoder: Succeed to encode 1 frame!       size:12270
[mp4 @ 0x91bce0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1990989 >= NOPTS
[libx264 @ 0x91a920] specified frame type is not compatible with max B-frames
Flush Encoder: Succeed to encode 1 frame!       size:10702
[mp4 @ 0x91bce0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1990989 >= NOPTS
[libx264 @ 0x91a920] specified frame type is not compatible with max B-frames
Flush Encoder: Succeed to encode 1 frame!       size:14588
[mp4 @ 0x91bce0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1990989 >= NOPTS
[libx264 @ 0x91a920] specified frame type is not compatible with max B-frames
Flush Encoder: Succeed to encode 1 frame!       size:12379
[mp4 @ 0x91bce0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1990989 >= NOPTS
[libx264 @ 0x91a920] specified frame type (3) at 649 is not compatible with keyframe interval
Flush Encoder: Succeed to encode 1 frame!       size:50339
[mp4 @ 0x91bce0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1990989 >= NOPTS
Flush Encoder: Succeed to encode 1 frame!       size:37660
[mp4 @ 0x91bce0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1990989 >= NOPTS
[libx264 @ 0x91a920] specified frame type is not compatible with max B-frames
Flush Encoder: Succeed to encode 1 frame!       size: 6732
[mp4 @ 0x91bce0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1990989 >= NOPTS
[libx264 @ 0x91a920] specified frame type is not compatible with max B-frames
Flush Encoder: Succeed to encode 1 frame!       size:11069
[mp4 @ 0x91bce0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1990989 >= NOPTS
[libx264 @ 0x91a920] specified frame type is not compatible with max B-frames
Flush Encoder: Succeed to encode 1 frame!       size:13697
[mp4 @ 0x91bce0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1990989 >= NOPTS
Flush Encoder: Succeed to encode 1 frame!       size: 8342
[mp4 @ 0x91bce0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1990989 >= NOPTS
[libx264 @ 0x91a920] specified frame type is not compatible with max B-frames
Flush Encoder: Succeed to encode 1 frame!       size: 6330
[mp4 @ 0x91bce0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1990989 >= NOPTS
[mp4 @ 0x91bce0] pts has no value
[libx264 @ 0x91a920] frame I:101   Avg QP:23.45  size: 49404
[libx264 @ 0x91a920] frame P:555   Avg QP:24.60  size:  9386
[libx264 @ 0x91a920] mb I  I16..4: 40.8% 44.8% 14.4%
[libx264 @ 0x91a920] mb P  I16..4:  8.2%  2.6%  0.4%  P16..4: 46.6%  4.7%  1.6%  0.0%  0.0%    skip:35.9%
[libx264 @ 0x91a920] final ratefactor: 20.96
[libx264 @ 0x91a920] 8x8 transform intra:36.5% inter:63.7%
[libx264 @ 0x91a920] coded y,uvDC,uvAC intra: 31.4% 92.3% 60.2% inter: 2.6% 41.1% 1.9%
[libx264 @ 0x91a920] i16 v,h,dc,p: 47% 18% 10% 26%
[libx264 @ 0x91a920] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 16%  7% 11% 10% 11% 15% 10% 12%  8%
[libx264 @ 0x91a920] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22%  9%  7%  9% 13% 18%  8% 10%  5%
[libx264 @ 0x91a920] i8c dc,h,v,p: 39% 18% 24% 19%
[libx264 @ 0x91a920] Weighted P-Frames: Y:0.4% UV:0.4%
[libx264 @ 0x91a920] kb/s:3727.55
*** Error in `./add_video_stream': corrupted size vs. prev_size: 0x000000000091ada0 ***
Aborted