Hi,
I am encoding using x264(ffmpeg) from live footage and i have some
performance issues.
(I am using mkv container)
1. It doesn't encode fast enough. the function avcodec_encode_video is
exectued in 50 to 300ms, and for some frames (probably keyframe) is can go
up to 1.8 seconds.
So i can't encode 25 fps, and when i read my video i see that sometimes
mouvements aren't regular, it fastes up (or jump) then slow down.
2. It doesn't compress enough. A 38 secondes movie (10 fps, 4CIF) is 29 Mo
large. Which is only 10 times smaller than raw YUV420.
I am pretty sure it can be compressed some 10 times more smaller.
Here is my avcodeccontext :
c->codec_id = Codec_ID;
c->profile= FF_PROFILE_H264_BASELINE;
c->codec_type = CODEC_TYPE_VIDEO;
c->bit_rate = 1000000;
c->width = width;
c->height = height;
// for fps =10
c->time_base.den = 10;
c->time_base.num = 1;
c->gop_size = 10;
c->pix_fmt = Pixel_Format;
c->me_method = ME_HEX;
c->qcompress = 0.6;
c->qmin = 10;
c->qmax = 51;
c->coder_type = 1;
c->me_range = 16;
c->max_qdiff = 4;
c->i_quant_factor = 0.71;
c->aq_mode =0;
c->keyint_min=25;
c->scenechange_threshold=0;
c->i_quant_factor=0.71;
c->b_frame_strategy=1;
c->refs=1;
c->directpred=1;
c->trellis=0;
c->flags2 |= CODEC_FLAG2_BPYRAMID + CODEC_FLAG2_MIXED_REFS +
CODEC_FLAG2_WPRED + CODEC_FLAG2_8X8DCT + CODEC_FLAG2_FASTPSKIP;
c->weighted_p_pred=0;
c->rc_lookahead = 0;
Any advice please ?
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user