Merge: promote dev to prod
This commit is contained in:
commit
0e17de22ed
3 changed files with 27 additions and 2 deletions
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
||||||
0.22.0
|
0.22.1
|
||||||
|
|
@ -44,6 +44,11 @@ _DEFAULTS = {
|
||||||
"sponsorblock": False,
|
"sponsorblock": False,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Bump when the spec→output-bytes mapping changes so an identical spec gets a fresh cache
|
||||||
|
# identity instead of hitting a stale asset produced by the old rule. v2: mp4 downloads now
|
||||||
|
# prefer H.264+AAC (browser/iOS-compatible) rather than yt-dlp's default VP9/Opus best.
|
||||||
|
_SIG_VERSION = 2
|
||||||
|
|
||||||
_SPONSORBLOCK_CATEGORIES = ["sponsor", "selfpromo", "interaction"]
|
_SPONSORBLOCK_CATEGORIES = ["sponsor", "selfpromo", "interaction"]
|
||||||
_VCODEC_SORT = {"h264": "vcodec:h264", "vp9": "vcodec:vp9", "av1": "vcodec:av01"}
|
_VCODEC_SORT = {"h264": "vcodec:h264", "vp9": "vcodec:vp9", "av1": "vcodec:av01"}
|
||||||
|
|
||||||
|
|
@ -69,7 +74,9 @@ def normalize(spec: dict) -> dict:
|
||||||
def format_sig(spec: dict) -> str:
|
def format_sig(spec: dict) -> str:
|
||||||
"""Stable short hash of the output-affecting spec — the MediaAsset cache key component."""
|
"""Stable short hash of the output-affecting spec — the MediaAsset cache key component."""
|
||||||
s = normalize(spec)
|
s = normalize(spec)
|
||||||
payload = json.dumps({k: s[k] for k in _SIG_KEYS}, sort_keys=True, separators=(",", ":"))
|
data = {k: s[k] for k in _SIG_KEYS}
|
||||||
|
data["_v"] = _SIG_VERSION
|
||||||
|
payload = json.dumps(data, sort_keys=True, separators=(",", ":"))
|
||||||
return hashlib.sha256(payload.encode()).hexdigest()[:24]
|
return hashlib.sha256(payload.encode()).hexdigest()[:24]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -145,6 +152,16 @@ def build_ydl_opts(
|
||||||
if s["container"]:
|
if s["container"]:
|
||||||
opts["merge_output_format"] = s["container"]
|
opts["merge_output_format"] = s["container"]
|
||||||
sort = []
|
sort = []
|
||||||
|
# Compatibility-first for mp4 (the universal container): prefer H.264 video + AAC
|
||||||
|
# audio so shared/downloaded files play in EVERY browser, including iOS/Safari.
|
||||||
|
# WebKit (which every iOS browser, Brave included, is forced to use) decodes only
|
||||||
|
# H.264/H.265 + AAC inside mp4 — a VP9/Opus-in-mp4 file shows a broken player there,
|
||||||
|
# even though Chromium plays it fine. These sort keys rank codec ABOVE resolution, so
|
||||||
|
# a 720p H.264 stream is chosen over a 1080p-VP9-only one; VP9/AV1 remain a graceful
|
||||||
|
# fallback only when no H.264 stream exists. A custom profile that explicitly sets
|
||||||
|
# `vcodec` opts out (its codec choice wins over the compatibility default).
|
||||||
|
if s["container"] == "mp4" and s["vcodec"] is None:
|
||||||
|
sort += ["vcodec:h264", "acodec:aac"]
|
||||||
if h:
|
if h:
|
||||||
sort.append(f"res:{h}")
|
sort.append(f"res:{h}")
|
||||||
if s["vcodec"] in _VCODEC_SORT:
|
if s["vcodec"] in _VCODEC_SORT:
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,14 @@ export interface ReleaseEntry {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const RELEASE_NOTES: ReleaseEntry[] = [
|
export const RELEASE_NOTES: ReleaseEntry[] = [
|
||||||
|
{
|
||||||
|
version: "0.22.1",
|
||||||
|
date: "2026-07-04",
|
||||||
|
summary: "Downloaded and shared videos now play in every browser, including on iPhone and iPad.",
|
||||||
|
fixes: [
|
||||||
|
"Downloads now use widely-compatible video (H.264) and audio (AAC) so a saved file — and a public watch link — plays everywhere, including iOS/Safari, where the previous format left a broken player. Existing downloads keep their old format; re-download to get the compatible version.",
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
version: "0.22.0",
|
version: "0.22.0",
|
||||||
date: "2026-07-04",
|
date: "2026-07-04",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue