13:40
I want to encode Blu-ray M2TS files with x264, my code is like this:
enc_ctx = avcodec_alloc_context3(codec);
enc_ctx->codec_id = AV_CODEC_ID_H264;
enc_ctx->bit_rate = 20000000;
When a video has a simple scene, such as 10 seconds, its encoding bitrate will be very small, only 1M or 2M bitrate. In order to achieve an average bitrate of 20M/s, the subsequent bitrate will be very large, sometimes reaching 150M/s. , at this time Blu-ray Player will freeze due to high bitrate. I set enc_ctx->rc_max_rate = 50000000; but it seems to have no effect. How can I limit the (...)