From: Steinar H. Gunderson Date: Thu, 21 Jul 2022 15:12:09 +0000 (+0200) Subject: Support --record-x264-video with AV1 HTTP output. X-Git-Tag: 2.2.0~18 X-Git-Url: https://git.sesse.net/?p=nageru;a=commitdiff_plain;h=23a236b4b2c551376b90c31d9a6cf72025da368c Support --record-x264-video with AV1 HTTP output. --- diff --git a/nageru/flags.cpp b/nageru/flags.cpp index 2bd0eec..1878038 100644 --- a/nageru/flags.cpp +++ b/nageru/flags.cpp @@ -460,7 +460,6 @@ void parse_flags(Program program, int argc, char * const argv[]) break; case OPTION_RECORD_X264_VIDEO: global_flags.x264_video_to_disk = true; - global_flags.x264_video_to_http = true; break; case OPTION_SEPARATE_X264_DISK_ENCODE: global_flags.x264_video_to_disk = true; @@ -706,6 +705,9 @@ void parse_flags(Program program, int argc, char * const argv[]) global_flags.x264_video_to_http = true; } } + if (global_flags.x264_video_to_disk && !global_flags.uncompressed_video_to_http && !global_flags.av1_video_to_http) { + global_flags.x264_video_to_http = true; // Quick Sync to HTTP but x264 to disk doesn't make sense. + } if (global_flags.min_num_cards <= 0) { fprintf(stderr, "ERROR: --num-cards must be at least 1\n"); exit(1); diff --git a/nageru/video_encoder.cpp b/nageru/video_encoder.cpp index 3342cfb..31c6b4d 100644 --- a/nageru/video_encoder.cpp +++ b/nageru/video_encoder.cpp @@ -224,7 +224,7 @@ void VideoEncoder::open_output_stream() avctx->flags = AVFMT_FLAG_CUSTOM_IO; string video_extradata; - if (global_flags.x264_video_to_http || global_flags.x264_video_to_disk) { + if (global_flags.x264_video_to_http) { video_extradata = x264_encoder->get_global_headers(); #ifdef HAVE_AV1 } else if (global_flags.av1_video_to_http) {