Change qmin and qmax again. They are too low
This commit is contained in:
parent
008f119f4c
commit
534c9fd299
@ -40,3 +40,4 @@ libraries at compile-time.
|
|||||||
* Fix segfault in debug mode (happens because audio codec becomes NULL?)
|
* Fix segfault in debug mode (happens because audio codec becomes NULL?)
|
||||||
* Fix blackscreen at start that appears until the second keyframe, which can be several seconds on a non-moving screen. Why does this happen? ffmpeg says the first frame should always be a keyframe!
|
* Fix blackscreen at start that appears until the second keyframe, which can be several seconds on a non-moving screen. Why does this happen? ffmpeg says the first frame should always be a keyframe!
|
||||||
* Dynamically change bitrate to match desired fps. This would be helpful when streaming for example, where the encode output speed also depends on upload speed to the stream service.
|
* Dynamically change bitrate to match desired fps. This would be helpful when streaming for example, where the encode output speed also depends on upload speed to the stream service.
|
||||||
|
* Random frames are skipped, why?
|
||||||
|
@ -451,16 +451,16 @@ static AVStream *add_video_stream(AVFormatContext *av_format_context, AVCodec **
|
|||||||
codec_context->color_range = AVCOL_RANGE_JPEG;
|
codec_context->color_range = AVCOL_RANGE_JPEG;
|
||||||
switch(video_quality) {
|
switch(video_quality) {
|
||||||
case VideoQuality::HIGH:
|
case VideoQuality::HIGH:
|
||||||
codec_context->qmin = 10;
|
codec_context->qmin = 12;
|
||||||
codec_context->qmax = 15;
|
codec_context->qmax = 18;
|
||||||
//av_opt_set(codec_context->priv_data, "preset", "slow", 0);
|
//av_opt_set(codec_context->priv_data, "preset", "slow", 0);
|
||||||
//av_opt_set(codec_context->priv_data, "profile", "high", 0);
|
//av_opt_set(codec_context->priv_data, "profile", "high", 0);
|
||||||
//codec_context->profile = FF_PROFILE_H264_HIGH;
|
//codec_context->profile = FF_PROFILE_H264_HIGH;
|
||||||
break;
|
break;
|
||||||
case VideoQuality::ULTRA:
|
case VideoQuality::ULTRA:
|
||||||
codec_context->bit_rate = 10000000 + (codec_context->width * codec_context->height) / 2;
|
codec_context->bit_rate = 10000000 + (codec_context->width * codec_context->height) / 2;
|
||||||
codec_context->qmin = 10;
|
codec_context->qmin = 12;
|
||||||
codec_context->qmax = 15;
|
codec_context->qmax = 18;
|
||||||
//av_opt_set(codec_context->priv_data, "preset", "veryslow", 0);
|
//av_opt_set(codec_context->priv_data, "preset", "veryslow", 0);
|
||||||
//av_opt_set(codec_context->priv_data, "profile", "high", 0);
|
//av_opt_set(codec_context->priv_data, "profile", "high", 0);
|
||||||
//codec_context->profile = FF_PROFILE_H264_HIGH;
|
//codec_context->profile = FF_PROFILE_H264_HIGH;
|
||||||
@ -1114,6 +1114,7 @@ int main(int argc, char **argv) {
|
|||||||
cuMemcpy2D(&memcpy_struct);
|
cuMemcpy2D(&memcpy_struct);
|
||||||
// res = cuCtxPopCurrent(&old_ctx);
|
// res = cuCtxPopCurrent(&old_ctx);
|
||||||
glfwSwapBuffers(window);
|
glfwSwapBuffers(window);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
frame->pts = frame_count;
|
frame->pts = frame_count;
|
||||||
|
Loading…
Reference in New Issue
Block a user