streamd: preview quality picker, dashboard polish, C4 wrap keys
All checks were successful
release / build-and-upload (push) Successful in 6m18s
modules-release / build-and-upload (push) Successful in 5m18s

- Preview player can select FHD/HD/SD (or ABR master) from publish links
- Embed dashboard screenshots in README; Linux streamd+agent setup guide
- C4 Widevine wrap license mode + require --wvd; prefer Widevine PSSH
- Channel 4 and My5 modules; streamd auth, variants, schedules, HLS gate
This commit is contained in:
404errordeveloper 2026-10-09 20:57:43 +02:00
parent b3955bd81e
commit 066e018749
113 changed files with 19002 additions and 1541 deletions

View file

@ -19,11 +19,13 @@ type Options struct {
PID string
LicenseURL string
UserAgent string
// WrapJSON is a captured phone license POST body (RedBee / wrapped Widevine).
WrapJSON string
}
// Fetch runs wvkey.py --quiet (ModularDrm) and returns the first KID:KEY line.
func Fetch(opt Options) (string, error) {
lines, err := run(opt, false, false)
lines, err := run(opt, "modulardrm", false)
if err != nil {
return "", err
}
@ -35,7 +37,7 @@ func Fetch(opt Options) (string, error) {
// FetchRaw runs wvkey.py --mode raw (Brightcove / octet-stream license).
func FetchRaw(opt Options) (string, error) {
lines, err := run(opt, true, false)
lines, err := run(opt, "raw", false)
if err != nil {
return "", err
}
@ -47,10 +49,15 @@ func FetchRaw(opt Options) (string, error) {
// FetchRawAll returns every CONTENT key from a raw license response.
func FetchRawAll(opt Options) ([]string, error) {
return run(opt, true, true)
return run(opt, "raw", true)
}
func run(opt Options, raw, all bool) ([]string, error) {
// FetchWrapAll re-POSTs a captured JSON license body with a local CDM challenge.
func FetchWrapAll(opt Options) ([]string, error) {
return run(opt, "wrap", true)
}
func run(opt Options, mode string, all bool) ([]string, error) {
py := opt.Python
if py == "" {
py = findPython()
@ -73,12 +80,19 @@ func run(opt Options, raw, all bool) ([]string, error) {
"--wvd", opt.WVD,
"--pssh", opt.PSSH,
"--license-url", opt.LicenseURL,
"--mode", mode,
"--quiet",
}
if raw {
args = append(args, "--mode", "raw")
} else {
args = append(args, "--mode", "modulardrm", "--auth", opt.Auth, "--pid", opt.PID)
switch mode {
case "raw":
// no extra fields
case "wrap":
if strings.TrimSpace(opt.WrapJSON) == "" {
return nil, fmt.Errorf("wvkey wrap mode requires a captured license_body from the phone (playback must start so RedBee gets a token)")
}
args = append(args, "--wrap-json", opt.WrapJSON)
default:
args = append(args, "--auth", opt.Auth, "--pid", opt.PID)
}
if all {
args = append(args, "--all")