Skip to content

[Bug] Tool crashes on 404 Key URI even when manual --key is provided #832

@athulkrishna2015

Description

@athulkrishna2015

The tool aborts the download process if the URI inside the #EXT-X-KEY tag returns a 404 error, even if I explicitly provide the correct decryption key using the --key argument.

It seems the tool attempts to validate/fetch the URI from the m3u8 file before checking if a manual key override exists.

To Reproduce

  1. Target an m3u8 file where the #EXT-X-KEY:URI="..." points to a dead link (returns 404 Not Found).
  2. Obtain the valid key manually.
  3. Run the command with the --key argument to bypass the dead link.

Command used:

N_m3u8DL-RE "http://example.com/video.m3u8" --key eb7e63a6765a4daa9bbaa8878f6bc8cf -M mkv

Logs / Output:

17:42:17.050 WARN : Master List detected, try parse all streams
...
17:42:21.312 WARN : One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).) retryCount: 3
...
17:42:26.566 ERROR: Failed to get KEY, ignore.: One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).)
17:42:26.576 WARN : An unrecognized encryption method is detected, binary merging is automatically enabled
...
17:43:02.308 ERROR: Mux failed (Invalid data found when processing input)

Expected behavior
If --key is provided via CLI, the tool should prioritize it and ignore the URI in the m3u8 file, or strictly treat the URI download failure as a non-fatal warning rather than failing to decrypt.


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