Use medium instead of p4 and slow instead of p7 for old ffmpeg
This commit is contained in:
parent
2bceeb182c
commit
2a788b5533
11
src/main.cpp
11
src/main.cpp
@ -807,7 +807,7 @@ static void open_video(AVCodecContext *codec_context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
AVDictionary *options = nullptr;
|
AVDictionary *options = nullptr;
|
||||||
if(very_old_gpu || !supports_p7) {
|
if(very_old_gpu) {
|
||||||
switch(video_quality) {
|
switch(video_quality) {
|
||||||
case VideoQuality::MEDIUM:
|
case VideoQuality::MEDIUM:
|
||||||
av_dict_set_int(&options, "qp", 37, 0);
|
av_dict_set_int(&options, "qp", 37, 0);
|
||||||
@ -853,10 +853,11 @@ static void open_video(AVCodecContext *codec_context,
|
|||||||
// with pretty good performance but you now have to choose p1-p7, which are gpu agnostic and on
|
// with pretty good performance but you now have to choose p1-p7, which are gpu agnostic and on
|
||||||
// older gpus p5-p7 slow the gpu down to a crawl...
|
// older gpus p5-p7 slow the gpu down to a crawl...
|
||||||
// "hq" is now just an alias for p7 in ffmpeg :(
|
// "hq" is now just an alias for p7 in ffmpeg :(
|
||||||
if(very_old_gpu && supports_p4)
|
if(very_old_gpu)
|
||||||
av_dict_set(&options, "preset", "p4", 0);
|
av_dict_set(&options, "preset", supports_p4 ? "p4" : "medium", 0);
|
||||||
else if(supports_p7)
|
else
|
||||||
av_dict_set(&options, "preset", "p7", 0);
|
av_dict_set(&options, "preset", supports_p7 ? "p7" : "slow", 0);
|
||||||
|
|
||||||
av_dict_set(&options, "tune", "hq", 0);
|
av_dict_set(&options, "tune", "hq", 0);
|
||||||
av_dict_set(&options, "rc", "constqp", 0);
|
av_dict_set(&options, "rc", "constqp", 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user