Repository navigation
Releases: m314dev/m314dl
Release list
v0.3.6
Changelog
- e3a6704 Move the module to github.com/m314dev/m314dl
- 9d6812c Release with goreleaser on tag push, rewrite the README
- 7679c0d dash: split on-demand SegmentBase files by their sidx (#8)
- f99002d docs,bench: rewrite README and add hot-path benchmarks
- bc7caea docs: restore the detailed README, reorganized
- 2fa4437 engine: don't log every in-flight fetch as failed on stop
- 7cc8e1b engine: prune the feeder's seen-map to the live window
- 01f52e9 engine: strip fake image headers after AES-128 decrypt, not before
- fd76844 feat: added m3u downloader
- 83ea6ee mp4,bbts: drop per-block/per-sample allocations in the decrypt hot loops
- 34bb6c2 mp4: fix cbcs decryption for the skip=0 (no-skip) pattern
- c5693d4 pick: numeric width/height bounds with nearest-rendition fallback
- a444ed6 restream: O(1) segment lookup and cached manifest/playlist bodies
- 366482c restream: fix DASH VOD that downloads but never plays (#8)
v0.3.5
v0.3.5
A restream-focused fix release. If you use -serve or -worker, upgrade —
several failures reported against v0.3.4 are fixed here.
Fixed
-
DASH restream of a VOD now starts immediately. A still-downloading VOD was
served as a dynamic MPD whose segment availability is gated by wall-clock time,
but m314dl spools the asset far faster than real time, so a compliant player
saw the already-downloaded segments as "not yet available" and never started.
The manifest'savailabilityStartTimeis now back-dated so every spooled
segment is immediately playable and seekable (and it still finalizes to a
static, fully-seekable MPD on completion). -
Restream no longer runs the machine out of memory on a large VOD. Segments
were spooled under the system temp dir, which is tmpfs (RAM) on most Linux
hosts — so a big asset (e.g. a long 4K stream) filled memory and was
OOM-killed. Spooling now goes to real disk by default (the current working
directory), with a new-spool-dir <path>flag to choose the location and
a warning if the chosen directory is RAM-backed. -
Multi-
trunfragments decrypt correctly. A fragment whosetrafcarried
more than onetrunkept only the last run's sample map while the encryption
info covered all samples, decrypting the rest to garbage. Single-trun
fragments (the common case) are unchanged and remain byte-exact against the
reference tools. -
Trick-play tracks are no longer offered as normal video. DASH trick-mode
(I-frame-only) representations marked with the DASH-IFEssentialPropertyare
now excluded from selection instead of appearing as ordinary renditions.
Notes
Decryption still requires you to supply the content key; the tool performs no
license/CDM handshake. In -worker/-serve on a host where /tmp is tmpfs,
point -spool-dir at a real-disk path for large VODs (the default already does
the right thing).
v0.3.4
v0.3.4
A big feature release: new source formats, a general file downloader, and a
rewrite of how restreaming serves on-demand content — plus fixes for the restream
issues reported against v0.3.3.
New
-
Smooth Streaming (MSS). Point the tool at a Microsoft Smooth Streaming
manifest (.ism/Manifest,.isml/Manifest), VOD or live, and download,
decrypt, or restream it like HLS and DASH. MSS ships no init segment, so one is
synthesized from the manifest'sCodecPrivateData; PlayReady is handled the
same way as the tool's other DRM — the KID is read from theProtectionHeader
and you supply the key with-key KID:KEY. H.264 + AAC covered. -
HLS SAMPLE-AES decryption.
SAMPLE-AESstreams (AAC + H.264) now decrypt
in-process with a supplied key, alongside the existing CENC / cbcs / AES-128
support. No license handshake — you provide the key. -
Plain-file downloads (aria2c-style). Give it a direct file URL —
.mp4,
.mkv,.zip,.iso, anything — and it downloads over many byte-range
connections at once, with the same resume, retries, and adaptive concurrency as
the stream pipeline. Falls back to a single connection when the server won't do
ranges, keeps the real filename and extension, and skips ffmpeg (the file is
already complete). -
Paste a curl command (
-curl). For a URL that needs specific request
headers, hand the tool a browser's "Copy as cURL" instead of retyping each
-H: a file path,-for stdin, or the command inline. It takes the URL and
every header (folding-A/-e/-binto User-Agent/Referer/Cookie); an
explicit URL or-Hstill overrides. -
Update check. Once a day the tool checks GitHub for a newer release and
prints a one-line notice if you're behind. It never blocks the download; turn
it off with-no-update-checkorM314DL_NO_UPDATE_CHECK=1. -
Seekable VOD restreaming. A finite (VOD) source served over
-serve/
-workeris now presented as a proper seekable video — the whole timeline
is scrubbable — instead of a live window. Segments spool to disk, so memory
stays flat regardless of the asset's length, and the HLS playlist gains
EXT-X-ENDLISTonce the source completes. Live sources still roll a bounded
window (a live stream has no full timeline to seek).
Fixed
-
MPEG-TS restream cut viewers off after a few seconds (
-serve-format ts),
live sources included. The fan-out dropped a viewer by counting publish units,
but the remux path emits tiny pipe-sized chunks, so the buffer was worth under a
second and any burst kicked everyone. It now measures by bytes, primes a joining
viewer for instant start, drains the queued tail when the stream ends instead of
cutting mid-play, and aligns remux output to TS packet boundaries. -
VOD restream stopped after the initial buffer and kept growing memory. A
finite source was presented as a live stream that snapshotted mid-download and
stopped; it is now the seekable, disk-spooled VOD described above — playback
follows through to the end and memory stays flat. -
Latent byte-range corruption on the shared segment path. A ranged request
answered with a whole-object200used to be written as if it were the
requested slice, misplacing bytes; it is now refused (a file download retries on
a single connection), and a short206retries for the remainder instead of
committing a truncated chunk.
Notes
Decryption still requires you to supply the content key; the tool performs no
license/CDM/FairPlay handshake. MSS AC-3/E-AC-3 and HEVC-over-TS are not decrypted
yet (they're reported clearly rather than passed through scrambled).
v0.3.3
v0.3.2
m314dl v0.3.1
m314dl v0.3.1
Fast HLS (.m3u8) and DASH (.mpd) video downloader in a single static binary,
with native in-process CENC decryption — no mp4decrypt, no shaka-packager.
Fixes since v0.3.0
- Decrypted output is now a clean, unprotected stream. After CENC
decryption the boxes still declared the stream encrypted (init typed its
samplesencv/encawithsinf/tenc/pssh; every fragment carried
senc/saiz/saio), so a player orffmpegthat trusted them tried to
"decrypt" the already-plaintext samples and rendered a black picture. The
init is now de-protected (codec fourcc restored fromsinf→frma,sinf
andpsshremoved) andsenc/saiz/saioare stripped from each fragment —
correct for any mux target and for-no-mux. - Flags work in any order relative to the URL —
m314dl -o out.mp4 URL -t 16
andm314dl URL -o out.mp4now behave identically (flags after the URL were
previously ignored).
Core features
- Native CENC / cbcs decryption, per-fragment as the stream downloads
(byte-exact vsmp4decrypt). Supply the key with-key KID:KEY. - HLS + DASH, VOD and live; AES-128; BBTS; multi-period DASH; subtitles
(first subtitle flagged default, or-sub-externalsidecars). - Restream / live republish (
-serve:hls/ts/dash), plus a
multi-channel worker (-worker) and an RPC server (-rpc). - Kill-proof resume: segments stream to part files with HTTP byte-range
resume, checkpointed on every commit — an interrupted download continues
byte-exact, losing at most the segment in flight. - Fast on real networks: one HTTP/1.1 connection per in-flight request;
adaptive concurrency, or a held-t N. Backs off from rate limits. - Local file input, page scraping, cookies, proxy, custom headers,
-ffmpeg.
NeedsffmpegonPATH(or-ffmpeg) for muxing.
Downloads
| Platform | Archive |
|---|---|
| Linux x86-64 | m314dl_v0.3.1_linux_amd64.tar.gz |
| Linux ARM64 | m314dl_v0.3.1_linux_arm64.tar.gz |
| Linux ARMv7 | m314dl_v0.3.1_linux_arm.tar.gz |
| macOS Intel | m314dl_v0.3.1_darwin_amd64.tar.gz |
| macOS Apple Silicon | m314dl_v0.3.1_darwin_arm64.tar.gz |
| Windows x86-64 | m314dl_v0.3.1_windows_amd64.zip |
| Windows ARM64 | m314dl_v0.3.1_windows_arm64.zip |
Install (Linux/macOS)
tar xzf m314dl_v0.3.1_<os>_<arch>.tar.gz
sudo mv m314dl_v0.3.1_<os>_<arch>/m314dl /usr/local/bin/
m314dl -versionVerify downloads against SHA256SUMS.
m314dl v0.3.0
m314dl v0.3.0
Fast HLS (.m3u8) and DASH (.mpd) video downloader in a single static binary,
with native in-process CENC decryption — no mp4decrypt, no shaka-packager.
New since v0.2.0
- Restream / live republish (
-serve): republish the selected streams live
instead of downloading to a file —hls(/live.m3u8), continuousts
(/live.ts), ordash(/live.mpd), with an optional ffmpeg transcode path. - Multi-channel restream worker (
-worker) and an RPC server (-rpc)
for running m314dl as a service (control API, bounded concurrency, auth token). -ffmpeg <path>to point at an ffmpeg binary that isn't onPATH.- Default in-memory cookie jar so an auth cookie set on the manifest is
carried to the segment requests that need it (no-cookiesfile required). - Robustness: a broken/optional subtitle track no longer sinks the whole
download (warn + skip); WebVTT cue tags are stripped and entities decoded in
the SRT path; an idle-connection watchdog retries a silently-throttled segment
instead of stalling at 0 B/s.
Core features
- Native CENC / cbcs decryption, per-fragment as the stream downloads
(byte-exact vsmp4decrypt). Supply the key with-key KID:KEY. - HLS + DASH, VOD and live; AES-128; BBTS; multi-period DASH; subtitles
(first subtitle flagged default, or-sub-externalsidecars). - Kill-proof resume: segments stream to part files with HTTP byte-range
resume, checkpointed on every commit — an interrupted or hard-killed download
continues byte-exact, losing at most the segment in flight. - Fast on real networks: one HTTP/1.1 connection per in-flight request;
adaptive concurrency, or a held-t N. Backs off from rate limits. - Local file input, page scraping, cookies, proxy, custom headers. Needs
ffmpegonPATH(or-ffmpeg) for muxing.
Downloads
| Platform | Archive |
|---|---|
| Linux x86-64 | m314dl_v0.3.0_linux_amd64.tar.gz |
| Linux ARM64 | m314dl_v0.3.0_linux_arm64.tar.gz |
| Linux ARMv7 | m314dl_v0.3.0_linux_arm.tar.gz |
| macOS Intel | m314dl_v0.3.0_darwin_amd64.tar.gz |
| macOS Apple Silicon | m314dl_v0.3.0_darwin_arm64.tar.gz |
| Windows x86-64 | m314dl_v0.3.0_windows_amd64.zip |
| Windows ARM64 | m314dl_v0.3.0_windows_arm64.zip |
Install (Linux/macOS)
tar xzf m314dl_v0.3.0_<os>_<arch>.tar.gz
sudo mv m314dl_v0.3.0_<os>_<arch>/m314dl /usr/local/bin/
m314dl -versionVerify downloads against SHA256SUMS.
m314dl v0.2.0
m314dl v0.2.0
Fast HLS (.m3u8) and DASH (.mpd) video downloader in a single static binary,
with native in-process CENC decryption — no mp4decrypt, no shaka-packager.
New since v0.1.0
- First subtitle is flagged default in the muxed output, so a player turns
subtitles on without the viewer picking a track. - BBTS decryption (
-bbts-key) for iQiyi-style encrypted MPEG-TS segments —
whole-segment AES with the per-segment IV read from the stream's SDT. - Idle watchdog: a silently-throttled connection that sends no bytes for 30s
is abandoned and retried (resuming from disk) instead of stalling the whole
download at 0 B/s. - Smarter stream scheduling: many streams run concurrently while each
subtitle track is capped to a few workers, so 25 tiny-segment subtitle tracks
no longer serialize into a latency tail after the video finishes.
Core features
- Native CENC / cbcs decryption, per-fragment as the stream downloads
(byte-exact vsmp4decrypt). Supply the key with-key KID:KEY. - HLS + DASH, VOD and live; AES-128; multi-period DASH; subtitles.
- Kill-proof resume: segments stream to part files with HTTP byte-range
resume, checkpointed on every commit — an interrupted or hard-killed download
continues byte-exact, losing at most the segment in flight. - Fast on real networks: one HTTP/1.1 connection per in-flight request
(not a single multiplexed HTTP/2 flow); adaptive concurrency, or a held-t N.
Backs off from rate limits (honorsRetry-After). - Local file input, page scraping, cookies, proxy, custom headers. Needs
ffmpegonPATHfor muxing.
Downloads
| Platform | Archive |
|---|---|
| Linux x86-64 | m314dl_v0.2.0_linux_amd64.tar.gz |
| Linux ARM64 | m314dl_v0.2.0_linux_arm64.tar.gz |
| Linux ARMv7 | m314dl_v0.2.0_linux_arm.tar.gz |
| macOS Intel | m314dl_v0.2.0_darwin_amd64.tar.gz |
| macOS Apple Silicon | m314dl_v0.2.0_darwin_arm64.tar.gz |
| Windows x86-64 | m314dl_v0.2.0_windows_amd64.zip |
| Windows ARM64 | m314dl_v0.2.0_windows_arm64.zip |
Install (Linux/macOS)
tar xzf m314dl_v0.2.0_<os>_<arch>.tar.gz
sudo mv m314dl_v0.2.0_<os>_<arch>/m314dl /usr/local/bin/
m314dl -versionVerify downloads against SHA256SUMS.
m314dl v0.1.0
m314dl v0.1.0
Fast HLS (.m3u8) and DASH (.mpd) video downloader in a single static binary,
with native in-process CENC decryption — no mp4decrypt, no shaka-packager.
Highlights
- Native CENC / cbcs decryption, per-fragment as the stream downloads
(byte-exact vsmp4decrypt). Supply the key with-key KID:KEY. - HLS + DASH, VOD and live; AES-128; multi-period DASH; subtitles
(WebVTT / TTML → SRT/VTT, or-sub-externalsidecars). - Kill-proof resume: segments stream to part files with HTTP byte-range
resume, checkpointed on every commit — an interrupted or hard-killed download
continues byte-exact, losing at most the segment in flight. - Fast on real networks: one HTTP/1.1 connection per in-flight request (not a
single multiplexed HTTP/2 flow), adaptive concurrency by default, or a held
-t N. Backs off from rate limits (honorsRetry-After). - Local
.m3u8/.mpdfile input, page scraping, cookies, proxy, custom headers. - Single static binary; needs
ffmpegonPATHfor muxing.
Downloads
| Platform | Archive |
|---|---|
| Linux x86-64 | m314dl_v0.1.0_linux_amd64.tar.gz |
| Linux ARM64 | m314dl_v0.1.0_linux_arm64.tar.gz |
| Linux ARMv7 | m314dl_v0.1.0_linux_arm.tar.gz |
| macOS Intel | m314dl_v0.1.0_darwin_amd64.tar.gz |
| macOS Apple Silicon | m314dl_v0.1.0_darwin_arm64.tar.gz |
| Windows x86-64 | m314dl_v0.1.0_windows_amd64.zip |
| Windows ARM64 | m314dl_v0.1.0_windows_arm64.zip |
Install (Linux/macOS)
tar xzf m314dl_v0.1.0_<os>_<arch>.tar.gz
sudo mv m314dl_v0.1.0_<os>_<arch>/m314dl /usr/local/bin/
m314dl -versionRequires ffmpeg on PATH. Verify downloads against SHA256SUMS.