tsdecrypt reads and decrypts CSA encrypted incoming mpeg transport stream over UDP/RTP using code words obtained from OSCAM or similar CAM server. tsdecrypt communicates with CAM server using cs378x (camd35 over tcp) protocol or newcamd protocol. https://georgi.unixsol.org/programs/tsdecrypt/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tsdecrypt.1 8.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. .TH TSDECRYPT "1" "November 2011" "tsdecrypt 4.0" "User Commands"
  2. .SH NAME
  3. tsdecrypt - Decrypt mpeg transport stream.
  4. .SH SYNOPSIS
  5. .B tsdecrypt
  6. [\fIoptions\fR]
  7. .SH DESCRIPTION
  8. tsdecrypt reads incoming mpeg transport stream over UDP/RTP or file and
  9. then decrypts it using libdvbcsa and keys obtained from OSCAM or similar
  10. CAMD server. tsdecrypt communicates with CAM server using cs378x (camd35
  11. over tcp) protocol or newcamd protocol.
  12. .SH OPTIONS
  13. .TP
  14. .SH MAIN OPTIONS
  15. .PP
  16. .TP
  17. \fB\-i\fR, \fB\-\-ident\fR <ident>
  18. Set ident that will be used when logging to syslog. The prefered format
  19. for the ident is PROVIDER/CHANNEL.
  20. .TP
  21. \fB\-d\fR, \fB\-\-daemon\fR <pidfile>
  22. When started become a daemon and write pid file to <pidfile>.
  23. .TP
  24. \fB\-N\fR, \fB\-\-notify\-program\fR <program>
  25. Execute \fB<program>\fR when predefined events happen. In order for
  26. this option to work \fB\-\-ident\fR should also be used.
  27. You can use \fBnotify-script.example\fR file as notification program
  28. and an example on how to create your own notification script.
  29. See \fBEVENTS\fR section for detailed description of the events.
  30. .TP
  31. \fB\-S\fR, \fB\-\-syslog\fR
  32. Write log messages to local syslog.
  33. .TP
  34. \fB\-l\fR, \fB\-\-syslog\-host\fR <addr>
  35. Set syslog host. tsdecrypt sends messages to this host over tcp in
  36. syslog compatible format. syslog-ng was tested as receiving syslog server.
  37. .TP
  38. \fB\-L\fR, \fB\-\-syslog\-port\fR <port>
  39. Syslog server port. The default value is \fB514\fR.
  40. .TP
  41. \fB\-D\fR, \fB\-\-debug\fR <level>
  42. Set message debug level. Currently there are five message levels.
  43. 0 = default messages, 1 = show PSI tables, 2 = show EMMs 3 = show
  44. duplicate ECMs, 4 = packet debug. 5 = packet debug + mpeg ts packet
  45. dump.
  46. Setting higher level enables the levels bellow.
  47. .TP
  48. \fB\-b\fR, \fB\-\-bench\fR
  49. Bechmark libdvbcsa decryption. The benchmark is single threaded.
  50. If you want to fully test your CPU, run couple of tsdecrypts in parallel.
  51. .TP
  52. \fB\-V\fR, \fB\-\-version\fR
  53. Show program version.
  54. .TP
  55. \fB\-h\fR, \fB\-\-help\fR
  56. Show program help.
  57. .TP
  58. .SH INPUT OPTIONS
  59. .PP
  60. .TP
  61. \fB\-I\fR, \fB\-\-input\fR <source>
  62. Where to read from. tsdecrypt supports input from files (-I file.ts or -I -)
  63. or multicast (-I 224.0.0.1:5000). By default tsdecrypt reads from \fBstdin\fR.
  64. .TP
  65. \fB\-R\fR, \fB\-\-input\-rtp\fR
  66. When reading from multicast assume the input is RTP stream. NOTE: No RTP
  67. processing/reordering of packets is done. The 12 byte RTP header is just
  68. stripped out and the stream is then processed as normal mpeg transport
  69. stream over UDP multicast.
  70. .TP
  71. \fB\-z\fR, \fB\-\-input\-ignore\-disc\fR
  72. Do not report input discontinuity or RTP discontinuity errors.
  73. .TP
  74. \fB\-M\fR, \fB\-\-input\-service\fR <service_id>
  75. Choose the service id. This option must be used when the input is MPTS
  76. in order to select the correct service (program). If the input is MPTS
  77. and \fB\-\-input\-service\fR is not used, tsdecrypt chooses the last service
  78. listed in PAT.
  79. .TP
  80. .SH OUTPUT OPTIONS
  81. .PP
  82. .TP
  83. \fB\-O\fR, \fB\-\-output\fR <dest>
  84. Output decrypted stream to <dest>. Destination can be multicast address
  85. (-O 239.0.0.1:5000) or a file (-O file.ts). The default output is \fBstdout\fR.
  86. .TP
  87. \fB\-o\fR, \fB\-\-output\-intf\fR <addr>
  88. Set multicast output interface.
  89. .TP
  90. \fB\-t\fR, \fB\-\-output\-ttl\fR
  91. Set multicast ttl. The default value is \fB1\fR.
  92. .TP
  93. \fB\-p\fR, \fB\-\-output\-filter\fR
  94. Enable output filtering. When output filter is enabled only PAT/PMT/SDT
  95. and data packets are left in the output. Everything else not mentioned
  96. in PMT like NIT, EIT, TDT tables and unknown pids is removed.
  97. .TP
  98. \fB\-y\fR, \fB\-\-output\-nit\-pass\fR
  99. Pass throught NIT packets when output filtering is enabled.
  100. .TP
  101. \fB\-w\fR, \fB\-\-output\-eit\-pass\fR
  102. Pass throught EIT (EPG) packets when output filtering is enabled.
  103. .TP
  104. \fB\-x\fR, \fB\-\-output\-tdt\-pass\fR
  105. Pass throught TDT/TOT packets when output filtering is enabled.
  106. .TP
  107. .SH CA OPTIONS
  108. .PP
  109. .TP
  110. \fB\-c\fR, \fB\-\-ca\-system\fR <ca_sys>
  111. Process input EMM/ECM from <ca_sys>. Currently tested and working CA systems
  112. are \fBCONAX\fR, \fBCRYPTOWORKS\fR, \fBIRDETO\fR, \fBVIACCESS\fR, \fBMEDIAGUARD\fR
  113. (\fBSECA\fR) and \fBVIDEOGUARD\fR (\fBNDS\fR). Other supported CA systems that
  114. you can choose but are not tested are \fBNAGRA\fR and \fBDRECRYPT\fR.
  115. The default <ca_sys> is \fBCONAX\fR.
  116. .TP
  117. \fB\-C\fR, \fB\-\-caid\fR <caid>
  118. Directly set CAID. This is useful if you have couple of CA streams from
  119. one CA but with different CAIDs.
  120. .TP
  121. .SH CAMD OPTIONS
  122. .PP
  123. .TP
  124. \fB\-A\fR, \fB\-\-camd\-proto\fR <protocol>
  125. Set CAMD server protocol. Valid protocols are \fBCS378X\fR and \fBNEWCAMD\fR.
  126. If this option is not used the default protocol is \fBCS378X\fR (camd35 over
  127. tcp).
  128. .TP
  129. \fB\-s\fR, \fB\-\-camd\-server\fR <addr[:port]>
  130. Set CAMD server ip and port (10.0.1.1:2233). Is not set default port
  131. is \fB2233\fR. 2233 is the default port CS378X protocol, for NEWCAMD
  132. protocol you probably should choose other port.
  133. .TP
  134. \fB\-U\fR, \fB\-\-camd\-user\fR <username>
  135. Set CAMD user name. The default is \fBuser\fR.
  136. .TP
  137. \fB\-P\fR, \fB\-\-camd\-pass\fR <password>
  138. Set CAMD user password. The default is \fBpass\fR.
  139. .TP
  140. \fB\-B\fR, \fB\-\-camd\-des\-key\fR <des_key>
  141. Set DES key used by NEWCAMD protocol. The default
  142. is \fB0102030405060708091011121314\fR.
  143. .TP
  144. .SH EMM OPTIONS
  145. .PP
  146. .TP
  147. \fB\-e\fR, \fB\-\-emm\fR
  148. Enable sending EMM's to CAMD for processing. By default EMM processing
  149. is \fBdisabled\fR and only ECM are processed.
  150. .TP
  151. \fB\-Z\fR, \fB\-\-emm\-pid\fR <pid>
  152. Set EMM pid manually. This option is useful for services that have
  153. couple of EMM streams from one CA system. Without this option tsdecrypt
  154. always chooses the first stream from the chosen CA system.
  155. .TP
  156. \fB\-E\fR, \fB\-\-emm\-only\fR <hierarchy>
  157. Disable ECM processing and stream output. This option is useful if the EMM
  158. stream has very high rate and is interfering with ECM processing. Using
  159. --emm-only you can run special tsdecrypt dedicated only to card auto update.
  160. .TP
  161. \fB\-f\fR, \fB\-\-emm\-report\-time\fR <seconds>
  162. Set interval for EMM reports. The default is \fB60\fR seconds. Set to \fB0\fR
  163. to disable EMM reports.
  164. .TP
  165. .SH ECM OPTIONS
  166. .PP
  167. .TP
  168. \fB\-X\fR, \fB\-\-ecm\-pid\fR <pid>
  169. Set ECM pid manually. This option is useful for services that have
  170. couple of ECM streams from one CA system. Without this option tsdecrypt
  171. always chooses the first stream from the chosen CA system. Run tsdecrypt
  172. with --debug 2 and look at CA descriptors in PMT to see what CA streams
  173. are available.
  174. .TP
  175. \fB\-H\fR, \fB\-\-ecm\-report\-time\fR <seconds>
  176. Set interval for ECM reports. The default is \fB60\fR seconds. Set to \fB0\fR
  177. to disable ECM reports.
  178. .TP
  179. \fB\-G\fR, \fB\-\-ecm\-irdeto\-type\fR <type>
  180. Set ECM IRDETO type. IRDETO CA send ECMs with different id mixed
  181. into one stream. Only one of the IDs are valid in given time. This
  182. option lets you choose which stream to process. The default stream
  183. type is \fB0\fR.
  184. .TP
  185. \fB\-K\fR, \fB\-\-ecm\-no\-log\fR
  186. Disable logging of ECMs and code words. Code word errors and stats
  187. reports are not affected by this option.
  188. .TP
  189. \fB\-J\fR, \fB\-\-cw\-warn\-time\fR <seconds>
  190. After how much seconds to warn if valid code word was not received.
  191. The default is \fB20\fR seconds. Set to \fB0\fR to disable the warning.
  192. .SH EVENTS
  193. Notification events are sent when \fB\-\-notify\-program\fR and \fB\-\-ident\fR
  194. options are used. The event parameters are set as environmental variables
  195. before executing the external notification program. The variables are:
  196. \fB_TS\fR Unix timestamp of the event.
  197. \fB_IDENT\fR tsdecrypt ident parameter with "/" replaced by "-".
  198. \fB_MESSAGE_ID\fR Event message id (for example START, STOP, etc...).
  199. \fB_MESSAGE_MSG\fR Event message id with "_" replaced by " ".
  200. \fB_MESSAGE_TEXT\fR Event message text. Human readable event message.
  201. currently defined events are:
  202. \fBSTART\fR tsdecrypt was started.
  203. \fBCODE_WORD_OK\fR Valid code word was received and decryption is
  204. working ok.
  205. \fBNO_CODE_WORD\fR No valid code word was received for X seconds. The
  206. decryption process have been suspended until valid
  207. code word is received.
  208. \fBINPUT_TIMEOUT\fR There was no data on the input.
  209. \fBINPUT_OK\fR The data have appeared on the input.
  210. \fBSTOP\fR tsdecrypt was stopped.
  211. See \fBnotify-script.example\fR for an example on how to create external
  212. notification program.
  213. .SH SEE ALSO
  214. See the README file for more information. If you have questions, remarks,
  215. problems or you just want to contact the developer, write to:
  216. \fIgeorgi@unixsol.org\fP
  217. .TP
  218. For more info, see the website at
  219. .I http://georgi.unixsol.org/programs/tsdecrypt/
  220. .SH AUTHORS
  221. Written by Georgi Chorbadzhiyski <\fBgeorgi@unixsol.org\fR>
  222. .SH LICENSE
  223. This program is free software; you can redistribute it and/or modify it under
  224. the terms of version 2 of the GNU General Public License as published by the
  225. Free Software Foundation.