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

15
modules/c4/go.mod Normal file
View file

@ -0,0 +1,15 @@
module null-drm/modules/c4
go 1.25.0
require (
drmdecryption v0.0.0
drmdecryption/modules v0.0.0
)
require gopkg.in/yaml.v3 v3.0.1 // indirect
replace (
drmdecryption => ../../apps/pkg
drmdecryption/modules => ../../apps/modules
)

4
modules/c4/go.sum Normal file
View file

@ -0,0 +1,4 @@
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

171
modules/c4/main.go Normal file
View file

@ -0,0 +1,171 @@
// Command c4 is the external Channel 4 provider module.
// Built on demand by the drm host: modules/c4/.bin/c4[.exe]
package main
import (
"encoding/json"
"flag"
"fmt"
"os"
"drmdecryption/adb"
appreg "drmdecryption/app"
"drmdecryption/modcfg"
"drmdecryption/modhost"
"drmdecryption/modules/c4"
)
func main() {
if len(os.Args) < 2 {
usage()
os.Exit(2)
}
cmd, args := os.Args[1], os.Args[2:]
var err error
switch cmd {
case "describe":
err = cmdDescribe()
case "launch":
err = cmdLaunch(args)
case "autoplay":
err = cmdAutoplay(args)
case "catalog":
err = cmdCatalog(args)
case "help", "-h", "--help":
usage()
return
default:
usage()
err = fmt.Errorf("unknown command %q", cmd)
}
if err != nil {
fmt.Fprintln(os.Stderr, "[!]", err)
os.Exit(1)
}
}
func usage() {
fmt.Fprint(os.Stderr, `c4 — Null DRM external module (Channel 4 / All 4)
Usage:
c4 describe
c4 launch [--serial SERIAL]
c4 autoplay --channel ID [--serial SERIAL]
c4 catalog --channel ID [--json]
`)
}
func loadApp() (appreg.App, error) {
return c4.New()
}
func cmdDescribe() error {
a, err := loadApp()
if err != nil {
return err
}
d := modhost.Describe{
Protocol: modhost.ProtocolVersion,
Name: a.Name(),
Package: a.Package(),
LicenseURL: a.LicenseURL(),
KeyMode: a.KeyMode(),
ProxyBin: a.ProxyBin(),
CAHash: a.CAHash(),
TransparentMITM: true,
Rewriter: "none",
ValuesPath: modcfg.Path(a.Name()),
}
if rw, ok := a.(appreg.RequireWVD); ok {
d.RequireWVD = rw.RequireWVD()
}
if mh, ok := a.(appreg.MitmHostList); ok {
d.MitmHosts = mh.MitmHosts()
}
if sd, ok := a.(appreg.StreamDefaults); ok {
d.Rewriter = sd.RewriterName()
}
type loaded interface {
ConfigLoaded() bool
ConfigPath() string
}
if L, ok := a.(loaded); ok {
d.ValuesLoaded = L.ConfigLoaded()
if L.ConfigPath() != "" {
d.ValuesPath = L.ConfigPath()
}
}
if _, ok := a.(appreg.Catalog); ok {
d.HasCatalog = true
}
h := a.CaptureHints()
d.Require = h.Require
d.Score = h.Score
d.ChannelMPDPrefer = map[string][]string{
"channel4": {"channel(c4)"},
"e4": {"channel(e4)"},
"more4": {"channel(m4)"},
"film4": {"channel(f4)"},
"fourseven": {"channel(4s)"},
}
for _, ch := range a.Channels() {
d.Channels = append(d.Channels, modhost.Channel{ID: ch.ID, Label: ch.Label})
}
enc := json.NewEncoder(os.Stdout)
enc.SetIndent("", " ")
return enc.Encode(d)
}
func cmdLaunch(args []string) error {
fs := flag.NewFlagSet("launch", flag.ContinueOnError)
serial := fs.String("serial", "", "adb device serial")
if err := fs.Parse(args); err != nil {
return err
}
a, err := loadApp()
if err != nil {
return err
}
c := adb.New()
if *serial != "" {
c = c.WithSerial(*serial)
}
return a.Launch(c)
}
func cmdAutoplay(args []string) error {
fs := flag.NewFlagSet("autoplay", flag.ContinueOnError)
serial := fs.String("serial", "", "adb device serial")
channel := fs.String("channel", "", "channel id")
if err := fs.Parse(args); err != nil {
return err
}
if *channel == "" {
return fmt.Errorf("--channel is required")
}
a, err := loadApp()
if err != nil {
return err
}
c := adb.New()
if *serial != "" {
c = c.WithSerial(*serial)
}
return a.AutoPlay(c, *channel)
}
func cmdCatalog(args []string) error {
fs := flag.NewFlagSet("catalog", flag.ContinueOnError)
channel := fs.String("channel", "", "channel id")
_ = fs.Bool("json", false, "print JSON")
if err := fs.Parse(args); err != nil {
return err
}
if *channel == "" {
return fmt.Errorf("--channel is required")
}
if _, err := loadApp(); err != nil {
return err
}
return fmt.Errorf("c4 module has no catalog — use phone capture (UK geo)")
}

View file

@ -0,0 +1,84 @@
# Channel 4 (All 4) — published universal values (renamed to module.yaml in release zips).
# Live cards: content-desc "Select to watch Channel Four" / "E Four" / "More Four" / …
package: com.channel4.ondemand
proxy_bin: bin/proxy-android-arm64
# SENSITIVE — set in local module.yaml:
# license_url: "https://c4.eme.lp.aws.redbeemedia.com/wvlicenceproxy-service/widevine/acquire"
# Transparent mode only MITMs open.live by default. Force C4 playlist / license hosts.
mitm_hosts:
- c4assets.com
- olsp.live.dash.c4assets.com
- stream.c4assets.com
- channel4.com
- api.channel4.com
- c4.eme.lp.aws.redbeemedia.com
- redbeemedia.com
- all4nav.channel4.com
score:
hosts:
- c4assets.com
- olsp.live.dash.c4assets.com
- stream.c4assets.com
- channel4.com
- api.channel4.com
- redbeemedia.com
- akamaized.net
deny:
- google-analytics
- googletagmanager
- doubleclick
- scorecardresearch
- facebook.com
- crashlytics
- appsflyer
- optimizely
aliases:
c4: channel4
four: channel4
ch4: channel4
channel: channel4
e: e4
more: more4
film: film4
"4seven": fourseven
seven: fourseven
channels:
channel4:
label: Channel Four
chip_desc: ["(?i)Select to watch\\s+Channel Four"]
e4:
label: E Four
chip_desc: ["(?i)Select to watch\\s+E Four"]
more4:
label: More Four
chip_desc: ["(?i)Select to watch\\s+More Four"]
film4:
label: Film Four
chip_desc: ["(?i)Select to watch\\s+Film Four"]
fourseven:
label: Four Seven
chip_desc: ["(?i)Select to watch\\s+Four Seven"]
ui:
launch_desc_contains: ["Home", "Live TV", "My Shows", "Downloads", "Search"]
live_tab: ["Live TV"]
live_tab_desc_re: ["(?i)^Live TV$"]
live_tab_text_re: ["(?i)^Live TV$"]
watch_live: ["Select to watch", "Play Episode"]
playback_desc_contains: ["Pause", "Unmute", "Cast"]
channel_scroll_max: 16
timeouts:
launch_wait_ui: 30s
launch_settle: 5s
live_nav: 20s
channel_find: 45s
after_channel: 2s
watch_live: 20s
playback: 45s