@javagt/ozivine
v2.1.0
Published
TypeScript port of Ozivine v2.1 (Python) — Downloader for Australian & New Zealand FTA services. Ported by DeepSeek V4 Flash.
Readme
@javagt/ozivine
Version 2.1.0 — Pure TypeScript port of Ozivine v2.1, the Python downloader for Australian & New Zealand free-to-air streaming services by billybanana80.
Ported by DeepSeek V4 Flash. Version numbers are kept in sync with the original Python releases.
Installation
npm install @javagt/ozivineLibrary Usage
Use @javagt/ozivine as a library to authenticate with streaming services and obtain decryption keys programmatically.
Get Widevine keys for a TVNZ episode
import { loadConfig, tvnz } from '@javagt/ozivine';
const config = loadConfig();
const info = await tvnz(
'https://www.tvnz.co.nz/player/tvepisode/butter-up',
config.downloads_path,
config.wvd_device_path,
config.tvnz.local_storage,
);
// info contains:
// {
// mpdUrl: 'https://.../manifest.mpd',
// keys: ['c92ea35b...:5b200e68...'],
// fileName: 'Show.Name.1080p.TVNZ.WEB-DL...',
// saveDir: '/Users/Videos',
// }
console.log('MPD:', info.mpdUrl);
console.log('Keys:', info.keys);Use with @javagt/n-m3u8dl-re to download
import { loadConfig, tvnz } from '@javagt/ozivine';
import { downloadMedia } from '@javagt/n-m3u8dl-re';
const config = loadConfig();
const info = await tvnz('https://www.tvnz.co.nz/player/tvepisode/butter-up', ...);
const result = await downloadMedia({
mpdUrl: info.mpdUrl,
keys: info.keys,
saveName: info.fileName,
saveDir: info.saveDir,
});Authenticate and get keys from any supported service
import { tvnz, s7plus, n9now, abciview, sbs, t10play, threenow } from '@javagt/ozivine';
// Each returns DownloadInfo | null
const tvnzInfo = await tvnz(url, downloadsPath, wvdPath, localStoragePath);
const sevenInfo = await s7plus(url, downloadsPath, wvdPath, cookiesPath);
const nineInfo = await n9now(url, downloadsPath, wvdPath);
const iviewInfo = await abciview(url, downloadsPath, wvdPath);
const sbsInfo = await sbs(url, downloadsPath, credentials);
const tenInfo = await t10play(url, downloadsPath, credentials);
const threeInfo = await threenow(url, downloadsPath, wvdPath);Parse PSSH from an MPD manifest
import { parsePsshFromMpd } from '@javagt/ozivine';
const pssh = parsePsshFromMpd(mpdXml);Load config
import { loadConfig } from '@javagt/ozivine';
import type { Config } from '@javagt/ozivine';
const config: Config = loadConfig();
// config.downloads_path, config.wvd_device_path, config.tvnz, etc.ESM Imports
// Service functions
import { tvnz, s7plus, n9now, abciview, sbs, t10play, threenow } from '@javagt/ozivine';
// Types
import type { DownloadInfo, Config } from '@javagt/ozivine';
// Utilities
import { loadConfig, parsePsshFromMpd, safeName, tryGetKeys, askQuestion } from '@javagt/ozivine';CLI Usage
npx @javagt/ozivine <video-url>The tool authenticates, extracts keys, and offers to download via @javagt/n-m3u8dl-re.
Supported Services
| Service | Region | DRM | Import |
|---------|--------|-----|--------|
| TVNZ | NZ | Widevine | import { tvnz } from '@javagt/ozivine' |
| ThreeNow | NZ | Widevine | import { threenow } from '@javagt/ozivine' |
| 7Plus | AU | Widevine | import { s7plus } from '@javagt/ozivine' |
| 9Now | AU | Widevine | import { n9now } from '@javagt/ozivine' |
| ABC iView | AU | Widevine | import { abciview } from '@javagt/ozivine' |
| 10Play | AU | AES-128 | import { t10play } from '@javagt/ozivine' |
| SBS | AU | None | import { sbs } from '@javagt/ozivine' |
Configuration
Copy config.yaml and set:
downloads_path— where to save downloadswvd_device_path— path to your Widevine device (.wvd) filetvnz.local_storage— TVNZ auth tokens file pathcookies_path— cookies file for 7Plus
How It Works
- Authenticates with the streaming service
- Parses the MPD/HLS manifest
- Extracts PSSH and license URL
- Obtains content keys via
@javagt/widevine - Downloads via
@javagt/n-m3u8dl-re
Dependencies
- @javagt/widevine — Pure TypeScript Widevine CDM
- @javagt/n-m3u8dl-re — Media stream downloader
License
MIT
Ported from Ozivine by DeepSeek V4 Flash.
