mirror of
https://repo.dec05eba.com/gpu-screen-recorder
synced 2026-05-06 23:06:22 +09:00
Print warning if hybrid_fragmented is not available
This commit is contained in:
@@ -1037,15 +1037,21 @@ static bool add_hdr_metadata_to_video_stream(gsr_capture *cap, AVStream *video_s
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void set_format_context_options(AVFormatContext *av_format_context) {
|
static void set_format_context_options(AVFormatContext *av_format_context) {
|
||||||
|
bool hybrid_fragmented_available = false;
|
||||||
av_opt_set(av_format_context->priv_data, "use_editlist", "1", 0);
|
av_opt_set(av_format_context->priv_data, "use_editlist", "1", 0);
|
||||||
const AVOption *opt = av_opt_find(av_format_context->priv_data, "movflags", NULL, 0, 0);
|
const AVOption *opt = av_opt_find(av_format_context->priv_data, "movflags", NULL, 0, 0);
|
||||||
if (opt && opt->unit) {
|
if (opt && opt->unit) {
|
||||||
const AVOption *flag = av_opt_find(av_format_context->priv_data, "hybrid_fragmented", opt->unit, 0, 0);
|
const AVOption *flag = av_opt_find(av_format_context->priv_data, "hybrid_fragmented", opt->unit, 0, 0);
|
||||||
if (flag)
|
if (flag) {
|
||||||
|
hybrid_fragmented_available = true;
|
||||||
av_opt_set(av_format_context->priv_data, "movflags", "+hybrid_fragmented", 0);
|
av_opt_set(av_format_context->priv_data, "movflags", "+hybrid_fragmented", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!hybrid_fragmented_available)
|
||||||
|
fprintf(stderr, "gsr warning: hybrid_fragmented movflags is not available in your FFmpeg version. If you experience stutter in the mp4 file then update your FFmpeg or record to a mkv file\n");
|
||||||
|
}
|
||||||
|
|
||||||
struct RecordingStartAudio {
|
struct RecordingStartAudio {
|
||||||
const AudioTrack *audio_track;
|
const AudioTrack *audio_track;
|
||||||
AVStream *stream;
|
AVStream *stream;
|
||||||
|
|||||||
Reference in New Issue
Block a user