[App] SamyGO PVRtoTS E/F
Posted: Wed Sep 17, 2014 9:28 pm
This thing hooks a bunch of functions in exeTV, grabs drm key, decrypts while recording and saves a .ts file in contents dir.

- Extract attached archive, copy libPVRtoTS.so and libPVRtoTS.config to /mnt/opt/privateer/usr/libso (folder may not exist on E series, create it if needed)
- Copy samyGOso to /mnt/opt/privateer/usr/bin if not already present
- Set file permissions if it wasn't there
Code: Select all
chmod 755 /mnt/opt/privateer/usr/bin/samyGOso
- Execute
By default, PVRtoTS will save unencrypted .TS and keyfile in the same folder as original encrypted recording (CONTENTS dir). Yet it's possible to edit and customize libPVRtoTS.config:
Code: Select all
samyGOso -p $(pidof exeTV || pidof exeDSP) -l /mnt/opt/privateer/usr/libso/libPVRtoTS.so -r
Logfile is written to: /dtv/PVRtoTS.logSpoilerShowOutput path example: "ts_outdir": "/dtv/usb/sda1/PVR",Code: Select all
{ // key_only == 1 -> save keyfile only, no background decryption "key_only" : 0, // ts_outdir == "" -> save ts in srf dir // != "" has to be existent "ts_outdir": "", // "ts_outext": ".srf" && ts_outdir == "" -> overwrite .srf with decrypted .ts "ts_outext": ".ts", // wait until 'wait_frame_cnt' frames are available for decryption, check again after 'wait_ms' millisecs "wait_frame_cnt": 2000, "wait_ms": 50, // $1 = decrypted file path //e.g. "exec_when_done": "/path/to/scripts/ts2mkv" "exec_when_done": "" }
- Autostart:
- Copy 99_91_PVRtoTS.init from archive to /mnt/etc/init.d
- Set permissions
Code: Select all
chmod 755 /mnt/etc/init.d/99_91_PVRtoTS.init
- Bonus:
SpoilerShowHere's a script for automatic renaming of .TS files generated by libPVRtoTS.
- Extract attached ts2filename.zip and copy both files to TV in /mnt/opt/privateer/usr/libso
- Telnet to TV and set file permissions
Code: Select all
chmod +x /mnt/opt/privateer/usr/libso/ts2filename
- Copy/overwrite latest samyGOso (v1.2.4 or higher required) to /mnt/opt/privateer/usr/bin
- Edit /mnt/opt/privateer/usr/libso/libPVRtoTS.config and set "exec_when_done" script path to:
Code: Select all
... "exec_when_done": "/mnt/opt/privateer/usr/libso/ts2filename" ...
- Reboot TV and check if (newly) generated .ts are well renamed
- If resulting date/time in filenames are not the correct localtime but UTC only, extract attached zoneinfo.zip, find the file suiting your country/city and rename it to CSP_TimeZone, then copy it to TV in /mtd_rwcommon
- You can change file mask by editing FILENAME value in ts2filename script. Default filemask is:So, resulting filename will be e.g.:
Code: Select all
FILENAME="${YYYY}.${MM}.${DD}_${HH}h${NN}_${CHANNEL} - ${TITLE}"
Usable wildcards are commented in script just under file mask.Code: Select all
2014.08.03_18h00_Eurosport - Cyclisme, Tour de Pologne.ts
