Skip to content

About

LG TV Recording Parser and Decryptor

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

LG TV Recording Parser (lg_tv_rec_parser_v2.py)

Step-by-step instructions to decrypt LG STR segments and generate one full output file.

1) Requirements

  • Python 3.9+ (or similar)
  • cryptography package:
python3 -m pip install cryptography

2) Put files in one folder

Your folder should contain:

  • lg_tv_rec_parser_v2.py
  • segment files: ...STR and ...IDX
  • metadata files (PIF, DIF, NPI, SNF) when available
  • dvr key file

Key formats supported by dvr:

  • raw 16-byte AES key
  • 32-character ASCII hex key (for example: 00000000000000000000000000000000)

3) Generate decrypted segments + full joined file

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 \
  --pretty

What this does:

  • decrypts each STR segment to ./_dec_out/*.m2ts (or .ts for 188-byte layout)
  • concatenates all decrypted segments in PIF order 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-str using sanitized DIF.title as the filename.

4) Confirm join status

Check the joined_output section in report.json.
Expected for success:

  • "status": "success"
  • "segment_count_joined" equals number of segments
  • "missing_stems": []

5) Optional: IDX correlation check

python3 lg_tv_rec_parser_v2.py . \
  --decrypt-str ./_dec_out \
  --correlate \
  --report-file ./_dec_out/report_with_correlation.json \
  --pretty

6) Troubleshooting

  • If output is unplayable, regenerate files after any parser/key fix (old outputs may be invalid).
  • Keep .m2ts extension for 192-byte transport stream outputs.
  • --join requires successful decryption (--decrypt-str + valid dvr key) and a valid DIF.title.
  • If key format is unusual, check stderr warnings for key loading mode/fallback.

About

LG TV Recording Parser and Decryptor

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages