]> git.sesse.net Git - nageru/commitdiff
Support --record-x264-video with AV1 HTTP output.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 21 Jul 2022 15:12:09 +0000 (17:12 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 21 Jul 2022 15:12:09 +0000 (17:12 +0200)
nageru/flags.cpp
nageru/video_encoder.cpp

index 2bd0eeca0aa183b01f13c4ba03dfbb1ecf831d17..1878038a46fb58ed2bc39b9e2a0994169c0bd2c0 100644 (file)
@@ -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);
index 3342cfb0c21b9d460c209067312029a1a83b78d4..31c6b4d8e24834d960205a3790e8dcc02169d88f 100644 (file)
@@ -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) {