OPTION_HTTP_UNCOMPRESSED_VIDEO,
OPTION_HTTP_X264_VIDEO,
OPTION_RECORD_X264_VIDEO,
OPTION_HTTP_UNCOMPRESSED_VIDEO,
OPTION_HTTP_X264_VIDEO,
OPTION_RECORD_X264_VIDEO,
+ OPTION_X264_SEPARATE_DISK_PRESET,
+ OPTION_X264_SEPARATE_DISK_TUNE,
+ OPTION_X264_SEPARATE_DISK_BITRATE,
+ OPTION_X264_SEPARATE_DISK_CRF,
+ OPTION_X264_SEPARATE_DISK_PARAM,
fprintf(stderr, " --http-x264-video send x264-compressed video to HTTP clients\n");
fprintf(stderr, " --record-x264-video store x264-compressed video to disk (implies --http-x264-video,\n");
fprintf(stderr, " removes the need for working VA-API encoding)\n");
fprintf(stderr, " --http-x264-video send x264-compressed video to HTTP clients\n");
fprintf(stderr, " --record-x264-video store x264-compressed video to disk (implies --http-x264-video,\n");
fprintf(stderr, " removes the need for working VA-API encoding)\n");
}
fprintf(stderr, " --x264-preset x264 quality preset (default " X264_DEFAULT_PRESET ")\n");
fprintf(stderr, " --x264-tune x264 tuning (default " X264_DEFAULT_TUNE ", can be blank)\n");
}
fprintf(stderr, " --x264-preset x264 quality preset (default " X264_DEFAULT_PRESET ")\n");
fprintf(stderr, " --x264-tune x264 tuning (default " X264_DEFAULT_TUNE ", can be blank)\n");
fprintf(stderr, " --x264-vbv-max-bitrate x264 local max bitrate (in kilobit/sec per --vbv-bufsize,\n");
fprintf(stderr, " 0 = no limit, default: same as --x264-bitrate, i.e., CBR)\n");
fprintf(stderr, " --x264-param=NAME[,VALUE] set any x264 parameter, for fine tuning\n");
fprintf(stderr, " --x264-vbv-max-bitrate x264 local max bitrate (in kilobit/sec per --vbv-bufsize,\n");
fprintf(stderr, " 0 = no limit, default: same as --x264-bitrate, i.e., CBR)\n");
fprintf(stderr, " --x264-param=NAME[,VALUE] set any x264 parameter, for fine tuning\n");
+ if (program == PROGRAM_NAGERU) {
+ fprintf(stderr, " --x264-separate-disk-preset x264 quality preset (default " X264_DEFAULT_PRESET ")\n");
+ fprintf(stderr, " --x264-separate-disk-tune x264 tuning (default " X264_DEFAULT_TUNE ", can be blank)\n");
+ fprintf(stderr, " --x264-separate-disk-bitrate x264 bitrate (in kilobit/sec, default %d)\n",
+ DEFAULT_X264_OUTPUT_BIT_RATE);
+ fprintf(stderr, " --x264-separate-disk-crf=VALUE quality-based VBR (-12 to 51), \n");
+ fprintf(stderr, " incompatible with --x264-separate-disk-bitrate\n");
+ fprintf(stderr, " --x264-separate-disk-param=NAME[,VALUE] set any x264 parameter, for fine tuning\n");
+ }
fprintf(stderr, " --http-mux=NAME mux to use for HTTP streams (default " DEFAULT_STREAM_MUX_NAME ")\n");
fprintf(stderr, " --http-audio-codec=NAME audio codec to use for HTTP streams\n");
fprintf(stderr, " (default is to use the same as for the recording)\n");
fprintf(stderr, " --http-mux=NAME mux to use for HTTP streams (default " DEFAULT_STREAM_MUX_NAME ")\n");
fprintf(stderr, " --http-audio-codec=NAME audio codec to use for HTTP streams\n");
fprintf(stderr, " (default is to use the same as for the recording)\n");
fprintf(stderr, " (default is %d)\n", DEFAULT_SRT_PORT);
fprintf(stderr, " --no-srt disable receiving SRT streams\n");
if (program == PROGRAM_KAERU) {
fprintf(stderr, " (default is %d)\n", DEFAULT_SRT_PORT);
fprintf(stderr, " --no-srt disable receiving SRT streams\n");
if (program == PROGRAM_KAERU) {
fprintf(stderr, " --no-transcode-audio copy encoded audio raw from the source stream\n");
fprintf(stderr, " (requires --http-audio-codec= to be set)\n");
fprintf(stderr, " --disable-audio do not include any audio in the stream\n");
fprintf(stderr, " --no-transcode-audio copy encoded audio raw from the source stream\n");
fprintf(stderr, " (requires --http-audio-codec= to be set)\n");
fprintf(stderr, " --disable-audio do not include any audio in the stream\n");
{ "http-uncompressed-video", no_argument, 0, OPTION_HTTP_UNCOMPRESSED_VIDEO },
{ "http-x264-video", no_argument, 0, OPTION_HTTP_X264_VIDEO },
{ "record-x264-video", no_argument, 0, OPTION_RECORD_X264_VIDEO },
{ "http-uncompressed-video", no_argument, 0, OPTION_HTTP_UNCOMPRESSED_VIDEO },
{ "http-x264-video", no_argument, 0, OPTION_HTTP_X264_VIDEO },
{ "record-x264-video", no_argument, 0, OPTION_RECORD_X264_VIDEO },
{ "x264-preset", required_argument, 0, OPTION_X264_PRESET },
{ "x264-tune", required_argument, 0, OPTION_X264_TUNE },
{ "x264-speedcontrol", no_argument, 0, OPTION_X264_SPEEDCONTROL },
{ "x264-preset", required_argument, 0, OPTION_X264_PRESET },
{ "x264-tune", required_argument, 0, OPTION_X264_TUNE },
{ "x264-speedcontrol", no_argument, 0, OPTION_X264_SPEEDCONTROL },
{ "x264-vbv-bufsize", required_argument, 0, OPTION_X264_VBV_BUFSIZE },
{ "x264-vbv-max-bitrate", required_argument, 0, OPTION_X264_VBV_MAX_BITRATE },
{ "x264-param", required_argument, 0, OPTION_X264_PARAM },
{ "x264-vbv-bufsize", required_argument, 0, OPTION_X264_VBV_BUFSIZE },
{ "x264-vbv-max-bitrate", required_argument, 0, OPTION_X264_VBV_MAX_BITRATE },
{ "x264-param", required_argument, 0, OPTION_X264_PARAM },
+ { "x264-separate-disk-preset", required_argument, 0, OPTION_X264_SEPARATE_DISK_PRESET },
+ { "x264-separate-disk-tune", required_argument, 0, OPTION_X264_SEPARATE_DISK_TUNE },
+ { "x264-separate-disk-bitrate", required_argument, 0, OPTION_X264_SEPARATE_DISK_BITRATE },
+ { "x264-separate-disk-crf", required_argument, 0, OPTION_X264_SEPARATE_DISK_CRF },
+ { "x264-separate-disk-param", required_argument, 0, OPTION_X264_SEPARATE_DISK_PARAM },
{ "http-mux", required_argument, 0, OPTION_HTTP_MUX },
{ "http-audio-codec", required_argument, 0, OPTION_HTTP_AUDIO_CODEC },
{ "http-audio-bitrate", required_argument, 0, OPTION_HTTP_AUDIO_BITRATE },
{ "http-port", required_argument, 0, OPTION_HTTP_PORT },
{ "srt-port", required_argument, 0, OPTION_SRT_PORT },
{ "no-srt", no_argument, 0, OPTION_NO_SRT },
{ "http-mux", required_argument, 0, OPTION_HTTP_MUX },
{ "http-audio-codec", required_argument, 0, OPTION_HTTP_AUDIO_CODEC },
{ "http-audio-bitrate", required_argument, 0, OPTION_HTTP_AUDIO_BITRATE },
{ "http-port", required_argument, 0, OPTION_HTTP_PORT },
{ "srt-port", required_argument, 0, OPTION_SRT_PORT },
{ "no-srt", no_argument, 0, OPTION_NO_SRT },
{ "no-transcode-audio", no_argument, 0, OPTION_NO_TRANSCODE_AUDIO },
{ "disable-audio", no_argument, 0, OPTION_DISABLE_AUDIO },
{ "flat-audio", no_argument, 0, OPTION_FLAT_AUDIO },
{ "no-transcode-audio", no_argument, 0, OPTION_NO_TRANSCODE_AUDIO },
{ "disable-audio", no_argument, 0, OPTION_DISABLE_AUDIO },
{ "flat-audio", no_argument, 0, OPTION_FLAT_AUDIO },
+ case OPTION_X264_SEPARATE_DISK_PRESET:
+ global_flags.x264_separate_disk_preset = optarg;
+ break;
+ case OPTION_X264_SEPARATE_DISK_TUNE:
+ global_flags.x264_separate_disk_tune = optarg;
+ break;
+ case OPTION_X264_SEPARATE_DISK_BITRATE:
+ global_flags.x264_separate_disk_bitrate = atoi(optarg);
+ break;
+ case OPTION_X264_SEPARATE_DISK_CRF:
+ global_flags.x264_separate_disk_crf = atof(optarg);
+ break;
+ case OPTION_X264_SEPARATE_DISK_PARAM:
+ global_flags.x264_separate_disk_extra_param.push_back(optarg);
+ break;
case OPTION_FLAT_AUDIO:
// If --flat-audio is given, turn off everything that messes with the sound,
// except the final makeup gain.
case OPTION_FLAT_AUDIO:
// If --flat-audio is given, turn off everything that messes with the sound,
// except the final makeup gain.
+ if (!isinf(global_flags.x264_separate_disk_crf)) { // CRF mode is selected.
+ if (global_flags.x264_separate_disk_bitrate != -1) {
+ fprintf(stderr, "ERROR: --x264-separate-disk-bitrate and --x264-separate-disk-crf are mutually incompatible.\n");
+ exit(1);
+ }
+ } else if (global_flags.x264_separate_disk_bitrate == -1) {
+ global_flags.x264_separate_disk_bitrate = DEFAULT_X264_OUTPUT_BIT_RATE;
+ }
+
if (!card_to_mjpeg_stream_export_set) {
// Fill in the default mapping (export all cards, in order).
for (unsigned card_idx = 0; card_idx < unsigned(global_flags.max_num_cards); ++card_idx) {
if (!card_to_mjpeg_stream_export_set) {
// Fill in the default mapping (export all cards, in order).
for (unsigned card_idx = 0; card_idx < unsigned(global_flags.max_num_cards); ++card_idx) {