Page 1 of 10

[App] SamyGO PVRtoTS E/F

Posted: Wed Sep 17, 2014 9:28 pm
by zoelechat
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

    Code: Select all

    samyGOso -p $(pidof exeTV || pidof exeDSP) -l /mnt/opt/privateer/usr/libso/libPVRtoTS.so -r
    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:
    SpoilerShow

    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": ""
    }
    Output path example: "ts_outdir": "/dtv/usb/sda1/PVR",
    Logfile is written to: /dtv/PVRtoTS.log
  • Autostart:
    1. Copy 99_91_PVRtoTS.init from archive to /mnt/etc/init.d
    2. Set permissions

      Code: Select all

      chmod 755 /mnt/etc/init.d/99_91_PVRtoTS.init
  • Bonus:
    SpoilerShow
    Here'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:

      Code: Select all

      FILENAME="${YYYY}.${MM}.${DD}_${HH}h${NN}_${CHANNEL} - ${TITLE}"
      So, resulting filename will be e.g.:

      Code: Select all

      2014.08.03_18h00_Eurosport - Cyclisme, Tour de Pologne.ts
      Usable wildcards are commented in script just under file mask.
    ts2filename.zip
    zoneinfo.zip
All credit goes to bugficks :)

Re: [App] SamyGO PVRtoTS E/F

Posted: Thu Sep 18, 2014 8:06 am
by miazza
Nice to see that Bugficks still works in background...

Re: [App] SamyGO PVRtoTS E/F

Posted: Thu Sep 18, 2014 10:50 am
by zoelechat
miazza wrote:Nice to see that Bugficks still works in background...
I hope too, but this is only recycling of not officially released stuff :)

Re: [App] SamyGO PVRtoTS E/F

Posted: Mon Nov 03, 2014 9:02 pm
by mmhorda
Doesn't work on E series.

VDLinux#> ./99_91_PVRtoTS.init start
checking /dtv/usb/sda1
checking /dtv/usb/sdj
checking /dtv/usb/sdk
samyGOso v1.2.2 (c) bugficks 2013
Injecting '/mnt/opt/privateer/usr/libso/libPVRtoTS.so' resident: '1'
Succeeded.


NO TS files where they suppose to be, instead I can see usual encrypted srf.

PS: I record over NFS to a NAS (its just by the way)

Re: [App] SamyGO PVRtoTS E/F

Posted: Mon Nov 03, 2014 9:07 pm
by zoelechat
mmhorda wrote:Doesn't work on E series.
Such report is always helpful. I use it everyday on E series :)

Re: [App] SamyGO PVRtoTS E/F

Posted: Mon Nov 03, 2014 9:07 pm
by mmhorda
zoelechat wrote:
mmhorda wrote:Doesn't work on E series.
Such report is always helpful. I use it everyday on E series :)

sorry edited :)

Re: [App] SamyGO PVRtoTS E/F

Posted: Mon Nov 03, 2014 9:10 pm
by zoelechat
Did you try to use it with default libPVRtoTS.config (the one from archive) and see if .TS are created in CONTENTS folder?

Re: [App] SamyGO PVRtoTS E/F

Posted: Mon Nov 03, 2014 9:12 pm
by mmhorda
zoelechat wrote:Did you try to use it with default libPVRtoTS.config (the one from archive) and see if .TS are created in CONTENTS folder?
yep, I used default libPVRtoTS.config.
no TS created in CONTENTS folder. (usual SRF is created)

Re: [App] SamyGO PVRtoTS E/F

Posted: Mon Nov 03, 2014 9:13 pm
by zoelechat
If you want to paste something useful:
-Inject patch
-Launch a recording for a while (more than 10secs)
-Paste here /dtv/PVRtoTS.log

Re: [App] SamyGO PVRtoTS E/F

Posted: Mon Nov 03, 2014 9:18 pm
by zoelechat
...and you should first check if it works on local USB drive attached to TV, instead of NFS/NAS :)