Step-by-step instructions to decrypt LG STR segments and generate one full output file.
- Python 3.9+ (or similar)
cryptographypackage:
python3 -m pip install cryptographyYour folder should contain:
lg_tv_rec_parser_v2.py- segment files:
...STRand...IDX - metadata files (
PIF,DIF,NPI,SNF) when available dvrkey file
Key formats supported by dvr:
- raw 16-byte AES key
- 32-character ASCII hex key (for example:
00000000000000000000000000000000)
Run from the folder that contains the recording files:
python3 lg_tv_rec_parser_v2.py . \
--decrypt-str ./_dec_out \
--join \
--report-file ./_dec_out/report.json \
--prettyWhat this does:
- decrypts each
STRsegment to./_dec_out/*.m2ts(or.tsfor 188-byte layout) - concatenates all decrypted segments in
PIForder into:./_dec_out/<Program Title>.m2ts(sanitized for safe filename characters)
- writes a JSON report to:
./_dec_out/report.json
Filename note:
- If you pass
--join, the parser writes the joined file inside--decrypt-strusing sanitizedDIF.titleas the filename.
Check the joined_output section in report.json.
Expected for success:
"status": "success""segment_count_joined"equals number of segments"missing_stems": []
python3 lg_tv_rec_parser_v2.py . \
--decrypt-str ./_dec_out \
--correlate \
--report-file ./_dec_out/report_with_correlation.json \
--pretty- If output is unplayable, regenerate files after any parser/key fix (old outputs may be invalid).
- Keep
.m2tsextension for 192-byte transport stream outputs. --joinrequires successful decryption (--decrypt-str+ validdvrkey) and a validDIF.title.- If key format is unusual, check stderr warnings for key loading mode/fallback.