Skip to content

[BUG] Shaka Packager fails silently when --save-name contains a comma #834

@Molier

Description

@Molier

Description and cause

When using --use-shaka-packager combined with a --save-name that includes a comma (e.g., "Movie, The"), the download completes but decryption fails silently, resulting in a corrupted/encrypted muxed file.

Shaka Packager uses commas as delimiters for stream descriptors and does not support commas in filenames, even if escaped (See Shaka Issue #1174). So its a known upstream limitation

Reproduction:

N_m3u8DL-RE.exe "URL" --save-name "Test, Name" --use-shaka-packager
Logs:
The log shows an empty ERROR line for Shaka because it crashes immediately on the argument parsing:

INFO : Decrypting using SHAKA_PACKAGER...
ERROR:

Suggested Fix:

N_m3u8DL-RE should sanitize filenames passed to Shaka Packager (replacing commas with underscores) or warn the user that commas are not supported with this decryptor.

  1. Sanitization: Automatically replace commas with underscores (or another safe character) in the temporary file paths passed specifically to Shaka Packager.
  2. Validation: Detect commas in the filename when --use-shaka-packager is active and fallback to mp4decrypt (or abort with a descriptive warning).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions