perf(dl): overlap hybrid builds with muxing, tag in the mux thread, preload DRM in parallel

Submit standalone mux tasks largest-first as soon as they are enqueued and build hybrid tracks while they run, each muxed from its own pool slot when ready; run mkvpropedit inside the mux thread instead of a serial pass at the end; load per-track DRM from a thread pool; decode m3u8 playlists as UTF-8 instead of letting requests run chardet over them.
This commit is contained in:
imSp4rky
2026-08-20 12:41:04 -06:00
parent 537a1dc973
commit 3312c218df
3 changed files with 151 additions and 120 deletions
+3 -1
View File
@@ -15,7 +15,7 @@ from uuid import UUID
from zlib import crc32
from langcodes import Language
from requests import Session
from requests import Response, Session
from requests.adapters import HTTPAdapter, Retry
from unshackle.core import binaries
@@ -805,6 +805,8 @@ class Track:
session = getattr(self, "session", None) or Session()
response = session.get(self.url)
if isinstance(response, Response):
response.encoding = response.encoding or "utf-8"
playlist = m3u8.loads(response.text, self.url)
drm_list = []