• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

popstas / talks-reducer / 18652572969

20 Oct 2025 12:51PM UTC coverage: 69.9% (-1.3%) from 71.158%
18652572969

Pull #119

github

web-flow
Merge 4698429a8 into 936ca8722
Pull Request #119: Add Windows taskbar progress integration

83 of 196 new or added lines in 8 files covered. (42.35%)

1267 existing lines in 23 files now uncovered.

5606 of 8020 relevant lines covered (69.9%)

0.7 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

84.21
/talks_reducer/cli.py
1
"""Command line interface for the talks reducer package."""
2

3
from __future__ import annotations
1✔
4

5
import argparse
1✔
6
import os
1✔
7
import shutil
1✔
8
import subprocess
1✔
9
import sys
1✔
10
import time
1✔
11
from importlib import import_module
1✔
12
from pathlib import Path
1✔
13
from typing import Callable, Dict, List, Optional, Sequence, Tuple
1✔
14

15
from . import audio
1✔
16
from .ffmpeg import FFmpegNotFoundError
1✔
17
from .logging_config import configure_logging_from_env
1✔
18
from .models import ProcessingOptions, default_temp_folder
1✔
19
from .pipeline import speed_up_video
1✔
20
from .progress import TqdmProgressReporter
1✔
21
from .version_utils import resolve_version
1✔
22

23

24
def _build_parser() -> argparse.ArgumentParser:
1✔
25
    """Create the argument parser used by the command line interface."""
26

27
    parser = argparse.ArgumentParser(
1✔
28
        description="Modifies a video file to play at different speeds when there is sound vs. silence.",
29
    )
30

31
    # Add version argument
32
    pkg_version = resolve_version()
1✔
33

34
    parser.add_argument(
1✔
35
        "--version",
36
        action="version",
37
        version=f"talks-reducer {pkg_version}",
38
    )
39

40
    parser.add_argument(
1✔
41
        "input_file",
42
        type=str,
43
        nargs="+",
44
        help="The video file(s) you want modified. Can be one or more directories and / or single files.",
45
    )
46
    parser.add_argument(
1✔
47
        "-o",
48
        "--output_file",
49
        type=str,
50
        dest="output_file",
51
        help="The output file. Only usable if a single file is given. If not included, it'll append _ALTERED to the name.",
52
    )
53
    parser.add_argument(
1✔
54
        "--temp_folder",
55
        type=str,
56
        default=str(default_temp_folder()),
57
        help="The file path of the temporary working folder.",
58
    )
59
    parser.add_argument(
1✔
60
        "-t",
61
        "--silent_threshold",
62
        type=float,
63
        dest="silent_threshold",
64
        help="The volume amount that frames' audio needs to surpass to be considered sounded. Defaults to 0.05.",
65
    )
66
    parser.add_argument(
1✔
67
        "-S",
68
        "--sounded_speed",
69
        type=float,
70
        dest="sounded_speed",
71
        help="The speed that sounded (spoken) frames should be played at. Defaults to 1.",
72
    )
73
    parser.add_argument(
1✔
74
        "-s",
75
        "--silent_speed",
76
        type=float,
77
        dest="silent_speed",
78
        help="The speed that silent frames should be played at. Defaults to 4.",
79
    )
80
    parser.add_argument(
1✔
81
        "-fm",
82
        "--frame_margin",
83
        type=float,
84
        dest="frame_spreadage",
85
        help="Some silent frames adjacent to sounded frames are included to provide context. Defaults to 2.",
86
    )
87
    parser.add_argument(
1✔
88
        "-sr",
89
        "--sample_rate",
90
        type=float,
91
        dest="sample_rate",
92
        help="Sample rate of the input and output videos. Usually extracted automatically by FFmpeg.",
93
    )
94
    parser.add_argument(
1✔
95
        "--keyframe-interval",
96
        type=float,
97
        dest="keyframe_interval_seconds",
98
        help="Override the keyframe spacing in seconds when using --small. Defaults to 30.",
99
    )
100
    parser.add_argument(
1✔
101
        "--video-codec",
102
        choices=["h264", "hevc", "av1"],
103
        default="hevc",
104
        help=(
105
            "Select the video encoder used for the final render (default: hevc — "
106
            "h.265 for roughly 25% smaller files). Pick h264 (about 10% faster) "
107
            "when speed matters or av1 (no advantages) for experimental runs."
108
        ),
109
    )
110
    parser.add_argument(
1✔
111
        "--add-codec-suffix",
112
        dest="add_codec_suffix",
113
        action="store_true",
114
        help="Append the selected video codec to the default output filename.",
115
    )
116
    parser.add_argument(
1✔
117
        "--prefer-global-ffmpeg",
118
        action="store_true",
119
        help="Use an FFmpeg binary from PATH before falling back to the bundled static build.",
120
    )
121
    parser.add_argument(
1✔
122
        "--small",
123
        action="store_true",
124
        help="Apply small file optimizations: resize video to 720p (or 480p with --480), audio to 128k bitrate, best compression (uses CUDA if available).",
125
    )
126
    parser.add_argument(
1✔
127
        "--480",
128
        dest="small_480",
129
        action="store_true",
130
        help="Use with --small to scale video to 480p instead of 720p.",
131
    )
132
    parser.add_argument(
1✔
133
        "--url",
134
        dest="server_url",
135
        default=None,
136
        help="Process videos via a Talks Reducer server at the provided base URL (for example, http://localhost:9005).",
137
    )
138
    parser.add_argument(
1✔
139
        "--host",
140
        dest="host",
141
        default=None,
142
        help="Shortcut for --url when targeting a Talks Reducer server on port 9005 (for example, localhost).",
143
    )
144
    parser.add_argument(
1✔
145
        "--server-stream",
146
        action="store_true",
147
        help="Stream remote progress updates when using --url.",
148
    )
149
    return parser
1✔
150

151

152
def gather_input_files(paths: List[str]) -> List[str]:
1✔
153
    """Expand provided paths into a flat list of files that contain audio streams."""
154

155
    files: List[str] = []
1✔
156
    for input_path in paths:
1✔
157
        if os.path.isfile(input_path) and audio.is_valid_input_file(input_path):
1✔
158
            files.append(os.path.abspath(input_path))
1✔
159
        elif os.path.isdir(input_path):
1✔
160
            for file in os.listdir(input_path):
1✔
161
                candidate = os.path.join(input_path, file)
1✔
162
                if audio.is_valid_input_file(candidate):
1✔
163
                    files.append(candidate)
1✔
164
    return files
1✔
165

166

167
def _print_total_time(start_time: float) -> None:
1✔
168
    """Print the elapsed processing time since *start_time*."""
169

170
    end_time = time.time()
1✔
171
    total_time = end_time - start_time
1✔
172
    hours, remainder = divmod(total_time, 3600)
1✔
173
    minutes, seconds = divmod(remainder, 60)
1✔
174
    print(f"\nTime: {int(hours)}h {int(minutes)}m {seconds:.2f}s")
1✔
175

176

177
class CliApplication:
1✔
178
    """Coordinator for CLI processing with dependency injection support."""
179

180
    def __init__(
1✔
181
        self,
182
        *,
183
        gather_files: Callable[[List[str]], List[str]],
184
        send_video: Optional[Callable[..., Tuple[Path, str, str]]],
185
        speed_up: Callable[[ProcessingOptions, object], object],
186
        reporter_factory: Callable[[], object],
187
        remote_error_message: Optional[str] = None,
188
    ) -> None:
189
        self._gather_files = gather_files
1✔
190
        self._send_video = send_video
1✔
191
        self._speed_up = speed_up
1✔
192
        self._reporter_factory = reporter_factory
1✔
193
        self._remote_error_message = remote_error_message
1✔
194

195
    def run(self, parsed_args: argparse.Namespace) -> Tuple[int, List[str]]:
1✔
196
        """Execute the CLI pipeline for *parsed_args*."""
197

198
        start_time = time.time()
1✔
199
        files = self._gather_files(parsed_args.input_file)
1✔
200

201
        args: Dict[str, object] = {
1✔
202
            key: value for key, value in vars(parsed_args).items() if value is not None
203
        }
204
        del args["input_file"]
1✔
205

206
        if "host" in args:
1✔
UNCOV
207
            del args["host"]
×
208

209
        if len(files) > 1 and "output_file" in args:
1✔
UNCOV
210
            del args["output_file"]
×
211

212
        if getattr(parsed_args, "small_480", False) and not getattr(
1✔
213
            parsed_args, "small", False
214
        ):
UNCOV
215
            print(
×
216
                "Warning: --480 has no effect unless --small is also provided.",
217
                file=sys.stderr,
218
            )
219

220
        error_messages: List[str] = []
1✔
221
        reporter_logs: List[str] = []
1✔
222

223
        if getattr(parsed_args, "server_url", None):
1✔
224
            remote_success, remote_errors, fallback_logs = self._process_via_server(
1✔
225
                files, parsed_args, start_time
226
            )
227
            error_messages.extend(remote_errors)
1✔
228
            reporter_logs.extend(fallback_logs)
1✔
229
            if remote_success:
1✔
230
                return 0, error_messages
1✔
231

232
        reporter = self._reporter_factory()
1✔
233
        for message in reporter_logs:
1✔
234
            reporter.log(message)
1✔
235

236
        for index, file in enumerate(files):
1✔
237
            print(
1✔
238
                f"Processing file {index + 1}/{len(files)} '{os.path.basename(file)}'"
239
            )
240
            local_options = dict(args)
1✔
241

242
            option_kwargs: Dict[str, object] = {"input_file": Path(file)}
1✔
243

244
            if "output_file" in local_options:
1✔
245
                option_kwargs["output_file"] = Path(local_options["output_file"])
1✔
246
            if "temp_folder" in local_options:
1✔
247
                option_kwargs["temp_folder"] = Path(local_options["temp_folder"])
1✔
248
            if "silent_threshold" in local_options:
1✔
249
                option_kwargs["silent_threshold"] = float(
1✔
250
                    local_options["silent_threshold"]
251
                )
252
            if "silent_speed" in local_options:
1✔
253
                option_kwargs["silent_speed"] = float(local_options["silent_speed"])
1✔
254
            if "sounded_speed" in local_options:
1✔
255
                option_kwargs["sounded_speed"] = float(local_options["sounded_speed"])
1✔
256
            if "frame_spreadage" in local_options:
1✔
257
                option_kwargs["frame_spreadage"] = int(local_options["frame_spreadage"])
1✔
258
            if "sample_rate" in local_options:
1✔
259
                option_kwargs["sample_rate"] = int(local_options["sample_rate"])
1✔
260
            if "keyframe_interval_seconds" in local_options:
1✔
261
                option_kwargs["keyframe_interval_seconds"] = float(
1✔
262
                    local_options["keyframe_interval_seconds"]
263
                )
264
            if "video_codec" in local_options:
1✔
265
                option_kwargs["video_codec"] = str(local_options["video_codec"])
1✔
266
            if local_options.get("add_codec_suffix"):
1✔
267
                option_kwargs["add_codec_suffix"] = True
1✔
268
            if "small" in local_options:
1✔
269
                option_kwargs["small"] = bool(local_options["small"])
1✔
270
            if local_options.get("small_480"):
1✔
UNCOV
271
                option_kwargs["small_target_height"] = 480
×
272
            if "prefer_global_ffmpeg" in local_options:
1✔
273
                option_kwargs["prefer_global_ffmpeg"] = bool(
1✔
274
                    local_options["prefer_global_ffmpeg"]
275
                )
276
            options = ProcessingOptions(**option_kwargs)
1✔
277

278
            try:
1✔
279
                result = self._speed_up(options, reporter=reporter)
1✔
UNCOV
280
            except FFmpegNotFoundError as exc:
×
UNCOV
281
                message = str(exc)
×
UNCOV
282
                return 1, [*error_messages, message]
×
283

284
            reporter.log(f"Completed: {result.output_file}")
1✔
285
            summary_parts: List[str] = []
1✔
286
            time_ratio = getattr(result, "time_ratio", None)
1✔
287
            size_ratio = getattr(result, "size_ratio", None)
1✔
288
            if time_ratio is not None:
1✔
289
                summary_parts.append(f"{time_ratio * 100:.0f}% time")
1✔
290
            if size_ratio is not None:
1✔
291
                summary_parts.append(f"{size_ratio * 100:.0f}% size")
1✔
292
            if summary_parts:
1✔
293
                reporter.log("Result: " + ", ".join(summary_parts))
1✔
294

295
        _print_total_time(start_time)
1✔
296
        return 0, error_messages
1✔
297

298
    def _process_via_server(
1✔
299
        self,
300
        files: Sequence[str],
301
        parsed_args: argparse.Namespace,
302
        start_time: float,
303
    ) -> Tuple[bool, List[str], List[str]]:
304
        """Upload *files* to the configured server and download the results."""
305

306
        if not self._send_video:
1✔
307
            message = self._remote_error_message or "Server processing is unavailable."
1✔
308
            fallback_notice = "Falling back to local processing pipeline."
1✔
309
            return False, [message, fallback_notice], [message, fallback_notice]
1✔
310

311
        server_url = parsed_args.server_url
1✔
312
        if not server_url:
1✔
UNCOV
313
            message = "Server URL was not provided."
×
UNCOV
314
            fallback_notice = "Falling back to local processing pipeline."
×
UNCOV
315
            return False, [message, fallback_notice], [message, fallback_notice]
×
316

317
        output_override: Optional[Path] = None
1✔
318
        if parsed_args.output_file and len(files) == 1:
1✔
UNCOV
319
            output_override = Path(parsed_args.output_file).expanduser()
×
320
        elif parsed_args.output_file and len(files) > 1:
1✔
321
            print(
1✔
322
                "Warning: --output is ignored when processing multiple files via the server.",
323
                file=sys.stderr,
324
            )
325

326
        remote_option_values: Dict[str, object] = {}
1✔
327
        if parsed_args.silent_threshold is not None:
1✔
328
            remote_option_values["silent_threshold"] = float(
1✔
329
                parsed_args.silent_threshold
330
            )
331
        if parsed_args.silent_speed is not None:
1✔
332
            remote_option_values["silent_speed"] = float(parsed_args.silent_speed)
1✔
333
        if parsed_args.sounded_speed is not None:
1✔
334
            remote_option_values["sounded_speed"] = float(parsed_args.sounded_speed)
1✔
335
        if getattr(parsed_args, "video_codec", None):
1✔
336
            remote_option_values["video_codec"] = str(parsed_args.video_codec)
1✔
337
        if getattr(parsed_args, "add_codec_suffix", False):
1✔
UNCOV
338
            remote_option_values["add_codec_suffix"] = True
×
339
        if getattr(parsed_args, "prefer_global_ffmpeg", False):
1✔
340
            remote_option_values["prefer_global_ffmpeg"] = True
1✔
341

342
        unsupported_options: List[str] = []
1✔
343
        for name in (
1✔
344
            "frame_spreadage",
345
            "sample_rate",
346
            "temp_folder",
347
            "keyframe_interval_seconds",
348
        ):
349
            if getattr(parsed_args, name) is not None:
1✔
350
                unsupported_options.append(f"--{name.replace('_', '-')}")
1✔
351

352
        if unsupported_options:
1✔
353
            print(
1✔
354
                "Warning: the following options are ignored when using --url: "
355
                + ", ".join(sorted(unsupported_options)),
356
                file=sys.stderr,
357
            )
358

359
        small_480_mode = bool(getattr(parsed_args, "small_480", False)) and bool(
1✔
360
            getattr(parsed_args, "small", False)
361
        )
362
        if small_480_mode:
1✔
363
            remote_option_values["small_480"] = True
×
364

365
        for index, file in enumerate(files, start=1):
1✔
366
            basename = os.path.basename(file)
1✔
367
            print(
1✔
368
                f"Processing file {index}/{len(files)} '{basename}' via server {server_url}"
369
            )
370
            printed_log_header = False
1✔
371
            progress_state: dict[str, tuple[Optional[int], Optional[int], str]] = {}
1✔
372
            stream_updates = bool(getattr(parsed_args, "server_stream", False))
1✔
373

374
            def _stream_server_log(line: str) -> None:
1✔
375
                nonlocal printed_log_header
376
                if not printed_log_header:
1✔
377
                    print("\nServer log:", flush=True)
1✔
378
                    printed_log_header = True
1✔
379
                print(line, flush=True)
1✔
380

381
            def _stream_progress(
1✔
382
                desc: str, current: Optional[int], total: Optional[int], unit: str
383
            ) -> None:
384
                key = desc or "Processing"
1✔
385
                state = (current, total, unit)
1✔
386
                if progress_state.get(key) == state:
1✔
387
                    return
1✔
388
                progress_state[key] = state
1✔
389

390
                parts: List[str] = []
1✔
391
                if current is not None and total and total > 0:
1✔
392
                    percent = (current / total) * 100
1✔
393
                    parts.append(f"{current}/{total}")
1✔
394
                    parts.append(f"{percent:.1f}%")
1✔
395
                elif current is not None:
1✔
UNCOV
396
                    parts.append(str(current))
×
397
                if unit:
1✔
398
                    parts.append(unit)
1✔
399
                message = " ".join(parts).strip()
1✔
400
                print(f"{key}: {message or 'update'}", flush=True)
1✔
401

402
            try:
1✔
403
                destination, summary, log_text = self._send_video(
1✔
404
                    input_path=Path(file),
405
                    output_path=output_override,
406
                    server_url=server_url,
407
                    small=bool(parsed_args.small),
408
                    small_480=small_480_mode,
409
                    **remote_option_values,
410
                    log_callback=_stream_server_log,
411
                    stream_updates=stream_updates,
412
                    progress_callback=_stream_progress if stream_updates else None,
413
                )
414
            except Exception as exc:  # pragma: no cover - network failure safeguard
415
                message = f"Failed to process {basename} via server: {exc}"
416
                fallback_notice = "Falling back to local processing pipeline."
417
                return False, [message, fallback_notice], [message, fallback_notice]
418

419
            print(summary)
1✔
420
            print(f"Saved processed video to {destination}")
1✔
421
            if log_text.strip() and not printed_log_header:
1✔
422
                print("\nServer log:\n" + log_text)
1✔
423

424
        _print_total_time(start_time)
1✔
425
        return True, [], []
1✔
426

427

428
def _launch_gui(argv: Sequence[str]) -> bool:
1✔
429
    """Attempt to launch the GUI with the provided arguments."""
430

UNCOV
431
    try:
×
UNCOV
432
        gui_module = import_module(".gui", __package__)
×
UNCOV
433
    except ImportError:
×
UNCOV
434
        return False
×
435

UNCOV
436
    gui_main = getattr(gui_module, "main", None)
×
UNCOV
437
    if gui_main is None:
×
UNCOV
438
        return False
×
439

UNCOV
440
    return bool(gui_main(list(argv)))
×
441

442

443
def _launch_server(argv: Sequence[str]) -> bool:
1✔
444
    """Attempt to launch the Gradio server with the provided arguments."""
445

UNCOV
446
    try:
×
UNCOV
447
        server_module = import_module(".server", __package__)
×
UNCOV
448
    except ImportError:
×
UNCOV
449
        return False
×
450

UNCOV
451
    server_main = getattr(server_module, "main", None)
×
UNCOV
452
    if server_main is None:
×
UNCOV
453
        return False
×
454

UNCOV
455
    server_main(list(argv))
×
UNCOV
456
    return True
×
457

458

459
def _find_server_tray_binary() -> Optional[Path]:
1✔
460
    """Return the best available path to the server tray executable."""
461

462
    binary_name = "talks-reducer-server-tray"
1✔
463
    candidates: List[Path] = []
1✔
464

465
    which_path = shutil.which(binary_name)
1✔
466
    if which_path:
1✔
467
        candidates.append(Path(which_path))
1✔
468

469
    try:
1✔
470
        launcher_dir = Path(sys.argv[0]).resolve().parent
1✔
UNCOV
471
    except Exception:
×
472
        launcher_dir = None
×
473

474
    potential_names = [binary_name]
1✔
475
    if sys.platform == "win32":
1✔
UNCOV
476
        potential_names = [f"{binary_name}.exe", binary_name]
×
477

478
    if launcher_dir is not None:
1✔
479
        for name in potential_names:
1✔
480
            candidates.append(launcher_dir / name)
1✔
481

482
    for candidate in candidates:
1✔
483
        if candidate and candidate.exists() and os.access(candidate, os.X_OK):
1✔
484
            return candidate
1✔
485

UNCOV
486
    return None
×
487

488

489
def _should_hide_subprocess_console() -> bool:
1✔
490
    """Return ``True` ` when a detached Windows launch should hide the console."""
491

492
    if sys.platform != "win32":
1✔
493
        return False
1✔
494

495
    try:
1✔
496
        import ctypes
1✔
497
    except Exception:  # pragma: no cover - optional runtime dependency
498
        return False
499

500
    try:
1✔
501
        get_console_window = ctypes.windll.kernel32.GetConsoleWindow  # type: ignore[attr-defined]
1✔
502
    except Exception:  # pragma: no cover - platform specific guard
503
        return False
504

505
    try:
1✔
506
        handle = get_console_window()
1✔
507
    except Exception:  # pragma: no cover - defensive fallback
508
        return False
509

510
    return handle == 0
1✔
511

512

513
def _launch_server_tray_binary(argv: Sequence[str]) -> bool:
1✔
514
    """Launch the packaged server tray executable when available."""
515

516
    command = _find_server_tray_binary()
1✔
517
    if command is None:
1✔
518
        return False
1✔
519

520
    tray_args = [str(command), *list(argv)]
1✔
521

522
    run_kwargs: Dict[str, object] = {"check": False}
1✔
523

524
    if sys.platform == "win32":
1✔
525
        no_window_flag = getattr(subprocess, "CREATE_NO_WINDOW", 0)
1✔
526
        if no_window_flag and _should_hide_subprocess_console():
1✔
527
            run_kwargs["creationflags"] = no_window_flag
1✔
528

529
    try:
1✔
530
        result = subprocess.run(tray_args, **run_kwargs)
1✔
UNCOV
531
    except OSError:
×
UNCOV
532
        return False
×
533

534
    return result.returncode == 0
1✔
535

536

537
def _launch_server_tray(argv: Sequence[str]) -> bool:
1✔
538
    """Attempt to launch the server tray helper with the provided arguments."""
539

540
    if _launch_server_tray_binary(argv):
1✔
UNCOV
541
        return True
×
542

543
    try:
1✔
544
        tray_module = import_module(".server_tray", __package__)
1✔
UNCOV
545
    except ImportError:
×
546
        return False
×
547

548
    tray_main = getattr(tray_module, "main", None)
1✔
549
    if tray_main is None:
1✔
UNCOV
550
        return False
×
551

552
    tray_main(list(argv))
1✔
553
    return True
1✔
554

555

556
def main(argv: Optional[Sequence[str]] = None) -> None:
1✔
557
    """Entry point for the command line interface.
558

559
    Launch the GUI when run without arguments, otherwise defer to the CLI.
560
    """
561

562
    configure_logging_from_env()
1✔
563

564
    if argv is None:
1✔
UNCOV
565
        argv_list = sys.argv[1:]
×
566
    else:
567
        argv_list = list(argv)
1✔
568

569
    if "--server" in argv_list:
1✔
570
        index = argv_list.index("--server")
1✔
571
        tray_args = argv_list[index + 1 :]
1✔
572
        if not _launch_server_tray(tray_args):
1✔
573
            print("Server tray mode is unavailable.", file=sys.stderr)
1✔
574
            sys.exit(1)
1✔
575
        return
1✔
576

577
    if argv_list and argv_list[0] in {"server", "serve"}:
1✔
578
        if not _launch_server(argv_list[1:]):
1✔
579
            print("Gradio server mode is unavailable.", file=sys.stderr)
1✔
580
            sys.exit(1)
1✔
581
        return
1✔
582

583
    if not argv_list:
1✔
584
        if _launch_gui(argv_list):
1✔
585
            return
1✔
586

UNCOV
587
        parser = _build_parser()
×
UNCOV
588
        parser.print_help()
×
UNCOV
589
        return
×
590

591
    parser = _build_parser()
1✔
592
    parsed_args = parser.parse_args(argv_list)
1✔
593

594
    host_value = getattr(parsed_args, "host", None)
1✔
595
    if host_value:
1✔
UNCOV
596
        parsed_args.server_url = f"http://{host_value}:9005"
×
597

598
    send_video = None
1✔
599
    remote_error_message: Optional[str] = None
1✔
600
    try:  # pragma: no cover - optional dependency guard
601
        from . import service_client
UNCOV
602
    except ImportError as exc:
×
UNCOV
603
        remote_error_message = (
×
604
            "Server mode requires the gradio_client dependency. " f"({exc})"
605
        )
606
    else:
607
        send_video = service_client.send_video
1✔
608

609
    application = CliApplication(
1✔
610
        gather_files=gather_input_files,
611
        send_video=send_video,
612
        speed_up=speed_up_video,
613
        reporter_factory=TqdmProgressReporter,
614
        remote_error_message=remote_error_message,
615
    )
616

617
    exit_code, error_messages = application.run(parsed_args)
1✔
618
    for message in error_messages:
1✔
UNCOV
619
        print(message, file=sys.stderr)
×
620
    if exit_code:
1✔
UNCOV
621
        sys.exit(exit_code)
×
622

623

624
if __name__ == "__main__":
1✔
UNCOV
625
    main()
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc