mirror of
https://github.com/NohamR/OqeeRewind.git
synced 2026-01-09 23:58:17 +00:00
Add mp4ff verification and OUTPUT_DIR support
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
OQEE_USERNAME=your_username
|
||||
OQEE_PASSWORD=your_password
|
||||
API_KEY=your_api_key_here
|
||||
API_URL=https://example.com/get-cached-keys
|
||||
API_URL=https://example.com/get-cached-keys
|
||||
OUTPUT_DIR=./download
|
||||
@@ -115,9 +115,9 @@ In order to decrypt DRM content, you will need to have a dumped CDM, after that
|
||||
- [x] Lib to install (pip + mp4ff + ffmpeg)
|
||||
- [ ] Demo GIF
|
||||
- [ ] Lint code
|
||||
- [ ] Oqee widevine license implementation (.wvd) + mention README
|
||||
- [x] Oqee widevine license implementation (.wvd) + mention README
|
||||
- [x] Full implementation
|
||||
- [ ] Verify mp4ff installation
|
||||
- [x] Verify mp4ff installation
|
||||
- [x] CLI arguments implementation + documentation
|
||||
- [ ] French/English full translation
|
||||
- [ ] Better output system
|
||||
|
||||
5
main.py
5
main.py
@@ -13,7 +13,7 @@ from utils.input import (
|
||||
)
|
||||
from utils.oqee import OqeeClient
|
||||
from utils.downloader import get_keys
|
||||
from utils.utilities import verify_cmd, merge_segments, decrypt
|
||||
from utils.utilities import verify_cmd, merge_segments, decrypt, verify_mp4ff
|
||||
from utils.times import (
|
||||
convert_date_to_sec,
|
||||
convert_sec_to_ticks,
|
||||
@@ -90,6 +90,7 @@ def parse_arguments():
|
||||
|
||||
if __name__ == "__main__":
|
||||
args = parse_arguments()
|
||||
verify_mp4ff()
|
||||
|
||||
# Check if CLI mode
|
||||
cli_mode = any(
|
||||
@@ -196,7 +197,7 @@ if __name__ == "__main__":
|
||||
title = title or f"{freebox_id}_{start_date.strftime('%Y%m%d_%H%M%S')}"
|
||||
keys = []
|
||||
|
||||
output_dir = args.output_dir if cli_mode else "./download"
|
||||
output_dir = os.getenv("OUTPUT_DIR") or (args.output_dir if cli_mode else "./download")
|
||||
|
||||
start_tick_user = int(convert_sec_to_ticks(convert_date_to_sec(start_date), TIMESCALE))
|
||||
|
||||
|
||||
@@ -2,6 +2,17 @@ import os
|
||||
import sys
|
||||
import logging
|
||||
import subprocess
|
||||
import shutil
|
||||
|
||||
|
||||
def verify_mp4ff():
|
||||
"""Verify if mp4ff-decrypt is installed and available in PATH."""
|
||||
if shutil.which("mp4ff-decrypt") is None:
|
||||
print("❌ Error: mp4ff-decrypt is not installed or not in PATH.")
|
||||
print("Please install it using:")
|
||||
print("go install github.com/Eyevinn/mp4ff/cmd/mp4ff-decrypt@latest")
|
||||
sys.exit(1)
|
||||
return True
|
||||
|
||||
|
||||
def verify_cmd(path: str) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user