fprintf(stderr, "ERROR: Invalid range %u-%u in --mjpeg-export-cards=\n", range_begin, range_end);
exit(1);
}
fprintf(stderr, "ERROR: Invalid range %u-%u in --mjpeg-export-cards=\n", range_begin, range_end);
exit(1);
}
// There are situations where we could possibly want to
// include FFmpeg inputs (CEF inputs are unlikely),
// but they're not necessarily in 4:2:2 Y'CbCr, so it would
// require more functionality the the JPEG encoder.
fprintf(stderr, "ERROR: Asked for (zero-indexed) card %u in --mjpeg-export-cards=, but there are only %u cards\n",
// There are situations where we could possibly want to
// include FFmpeg inputs (CEF inputs are unlikely),
// but they're not necessarily in 4:2:2 Y'CbCr, so it would
// require more functionality the the JPEG encoder.
fprintf(stderr, "ERROR: Asked for (zero-indexed) card %u in --mjpeg-export-cards=, but there are only %u cards\n",
fprintf(stderr, " -w, --width output width in pixels (default 1280)\n");
fprintf(stderr, " -h, --height output height in pixels (default 720)\n");
if (program == PROGRAM_NAGERU) {
fprintf(stderr, " -w, --width output width in pixels (default 1280)\n");
fprintf(stderr, " -h, --height output height in pixels (default 720)\n");
if (program == PROGRAM_NAGERU) {
- fprintf(stderr, " -c, --num-cards set number of input cards (default 2)\n");
+ fprintf(stderr, " -c, --num-cards set minimum number of input cards (default 2)\n");
+ fprintf(stderr, " --max-num-cards set maximum number of input cards (default %d)\n", MAX_VIDEO_CARDS);
fprintf(stderr, " -o, --output-card=CARD also output signal to the given card (default none)\n");
fprintf(stderr, " -t, --theme=FILE choose theme (default theme.lua)\n");
fprintf(stderr, " -I, --theme-dir=DIR search for theme in this directory (can be given multiple times)\n");
fprintf(stderr, " -o, --output-card=CARD also output signal to the given card (default none)\n");
fprintf(stderr, " -t, --theme=FILE choose theme (default theme.lua)\n");
fprintf(stderr, " -I, --theme-dir=DIR search for theme in this directory (can be given multiple times)\n");
fprintf(stderr, " --midi-mapping=FILE start with the given MIDI controller mapping (implies --multichannel)\n");
fprintf(stderr, " --default-hdmi-input default to HDMI over SDI inputs for cards that have both\n");
fprintf(stderr, " --fake-cards-audio make fake (disconnected) cards output a simple tone\n");
fprintf(stderr, " --midi-mapping=FILE start with the given MIDI controller mapping (implies --multichannel)\n");
fprintf(stderr, " --default-hdmi-input default to HDMI over SDI inputs for cards that have both\n");
fprintf(stderr, " --fake-cards-audio make fake (disconnected) cards output a simple tone\n");
fprintf(stderr, " --http-uncompressed-video send uncompressed NV12 video to HTTP clients\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, " --http-uncompressed-video send uncompressed NV12 video to HTTP clients\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");
DEFAULT_AUDIO_OUTPUT_BIT_RATE / 1000);
fprintf(stderr, " --http-port=PORT which port to use for the built-in HTTP server\n");
fprintf(stderr, " (default is %d)\n", DEFAULT_HTTPD_PORT);
DEFAULT_AUDIO_OUTPUT_BIT_RATE / 1000);
fprintf(stderr, " --http-port=PORT which port to use for the built-in HTTP server\n");
fprintf(stderr, " (default is %d)\n", DEFAULT_HTTPD_PORT);
+ fprintf(stderr, " --srt-port=PORT which port to use for receiving SRT streams\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, " --no-transcode-audio copy encoded audio raw from the source stream\n");
fprintf(stderr, " (requires --http-audio-codec= to be set)\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");
{ "width", required_argument, 0, 'w' },
{ "height", required_argument, 0, 'h' },
{ "num-cards", required_argument, 0, 'c' },
{ "width", required_argument, 0, 'w' },
{ "height", required_argument, 0, 'h' },
{ "num-cards", required_argument, 0, 'c' },
{ "output-card", required_argument, 0, 'o' },
{ "theme", required_argument, 0, 't' },
{ "theme-dir", required_argument, 0, 'I' },
{ "output-card", required_argument, 0, 'o' },
{ "theme", required_argument, 0, 't' },
{ "theme-dir", required_argument, 0, 'I' },
{ "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 },
{ "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 },
+ if (global_flags.max_num_cards <= 0) {
+ fprintf(stderr, "ERROR: --max-num-cards must be at least 1\n");
+ exit(1);
+ }
+ if (global_flags.max_num_cards < global_flags.min_num_cards) {
+ fprintf(stderr, "ERROR: --max-num-cards can not be lower than --num-cards\n");
+ exit(1);
+ }
- if (mapping.second >= global_flags.num_cards) {
- fprintf(stderr, "ERROR: Signal %d mapped to card %d, which doesn't exist (try adjusting --num-cards)\n",
+ if (mapping.second >= global_flags.max_num_cards) {
+ fprintf(stderr, "ERROR: Signal %d mapped to card %d, which doesn't exist (try adjusting --max-num-cards)\n",
if (!card_to_mjpeg_stream_export_set) {
// Fill in the default mapping (export all cards, in order).
if (!card_to_mjpeg_stream_export_set) {
// Fill in the default mapping (export all cards, in order).