/*******************************************************************************\ * * * RECTOOL (c) acade.au7.de * * * * DVB TS and REC files / streams evaluation and manipulation tool. * * (Commandline tool for Linux and Windows) * * * * Status: 20-JUL-2017 * * * \*******************************************************************************/ MAIN FEATURES ============= * Evaluate and show .rec headers, .inf and .eit files * Retrieve meta-data and EPG infos from input packets * Reconstruct .inf files, import content to .rec files * Neutralize 5K .rec headers to make files playable * Rename files to EPG title, subtitle and start time * Set file times to EPG start time * Generate contents files for other players * Generate bookmark files for cutting * Analyze packets, streams and services in various ways * Retrieve detailed EPG infos of future events, save * Retrieve transponder parameters of a network, save * Extract TTX (teletext) pages, interactive display, save * Extract / demux audio/video streams as PES / ES * Auto-split TS streams at bookmarks * Output streams to a RECPIPE (e.g. mplayer) * Input / output files through a TCP/IP network * Input streams directly from a TV card (Linux only) * Video recording functions (from TV card or pipe) DOWNLOADS & LINKS ================= * Short description: http://acade.au7.de/rectool/rectool.txt (this document) * Complete package: http://acade.au7.de/rectool/rectool.zip Containing: rectool.txt this document, English only rectool Linux 64-bit binary (x86_64) rectool.32 Linux 32-bit binary (i386) rectool.mips Linux 32-bit binary (MIPS LE) rectool.exe Windows 32-bit binary (i386) netpipe* NETPIPE auxiliary binaries * German TF Forum: http://www.topfield-europe.com/forum/showthread.php?t=44837 * Australian Forum: https://oztoppy.forumchitchat.com/post/rectool-dvb-ts-and- rec-files-evaluation-and-manipulation-tool-8504879 MAIN CHANGES ============ v3.43 18-JUL-2017 Improved renaming lost+found files /w option -RN v3.42 08-JUL-2017 Improved tuner LOCK, rename lost+found .nav files v3.41 26-MAY-2017 -HE && -ARC to overwrite existing .inf files v3.40 17-MAY-2017 Latin-1 to UTF-8 conversion, XML output v3.39 15-MAY-2017 5K PVRt header support, VIDEO RECORDING new v3.38 10-MAY-2017 ITEMIZED TEXT display and -i improved, -RC new v3.37 07-MAY-2017 Support cable CRP / PVRc, itemized extended text v3.36 30-APR-2017 TTX table of page frequencies v3.35 28-APR-2017 TTX inspection in color mode, burst output v3.34 25-APR-2017 INTERACTIVE TTX inspection, screen control v3.33 23-APR-2017 TTX PAGES collection, improved file renaming v3.32 22-APR-2017 Improved packets resync, improved file open v3.31 15-APR-2017 CHANNELS SCAN, individual {meta}.txt files v3.30 06-APR-2017 Enigma .eit files evaluation, PAT abdicable v3.20 30-MAR-2017 BAT, NIT and TDT evaluation, NETPIPE v3.10 21-MAR-2017 SDT and EIT evaluation, EPG extraction v3.01 07-FEB-2017 Bookmarks listing in MKVToolNix format v3.00 05-FEB-2017 Accept Topfield TMS .rec and .inf files RELEASE NOTES ============= Currently, Topfield TMS (SRP etc.) and 5000 .rec file formats are supported. In addition, ANY transport stream files (.m2t, .m2ts etc.) are processed. 188- and 192-byte TS packets are supported. Bluray TS streams are supported. Since rectool can also evaluate the .inf files of TMS PVRs, the term "REC header" used here in this document includes .inf files infos. NEW options -i/-i2 provide "REC header" infos even for non-Topfield files. The required data is extracted from TS streams' EIT packets, if present. Executable binaries are available for Linux (64- and 32-bit Intel, little endian 32-bit Mips) and Windows (32-bit Intel). ================================================================================ rectool v3.43 (Linux x86_64 version) Jul 20 2017 (c) acade.au7.de [DVB TS and REC files / streams evaluation and manipulation tool] usage: rectool [option]* {file | - | =[=]}* (- is stdin, =[=] is [looping] NETPIPE) REC info options: -e extended EPG text (extra lines) -1 1 line output per file (list format) -l list format special (shorter, implies -1) -tf text output redirected into individual {file}.txt files -te {ext} same as -tf, but redirections to {file}{ext} files -tw {width} text width [chars/line], min. 40, dflt. COLUMNS or 80 -XML XML output of EPG text -ARC AcadeRC output mode -h header details (implies -i to reconstruct, if not a REC file) -i inquire next current event for -e/-h/-s/-r/-HI/-HE (end reading asap) -i1 same as -i, but start from beginning, not the middle of the file -i2 same as -i, but use 2nd current event (e.g. if broadcast was shifted) -HN neutralize and save 5K REC header to make a pure TS file -HR restore saved 5K REC header in TS file, file again modified -HI import TMS .inf file as neutralized REC2 header, file modified -HE export neutralized REC2 header into missing TMS .inf file -s set file time to EPG start time -r/-R rename file to EPG title / subtitle appended -d/-D date prepended / appended (implies -r) -T time appended to date (format hh:mm) -RN rename lost+found .nav files and cleanup, implies -R and -vs -L Latin-1 (converted from UTF-8 strings), default is no conversion -U UTF-8 (converted from Latin-1 strings), mutually exclusive to -L -G German weekday & month names -b bookmarks file generated (*.txt, celltimes format) -bm same as -b, but output in MKVToolNix format Packets evaluation: -n {number} number of packets to read (>= 20000, default is all) -ns {number} number of packets to skip before reading (dflt. is none) -P PAT awaited before processing, skip all packets before -RA include radio services to -o/-sp/-ep/-EP, if suppressed -p packet streams analysis (implies -ps) -ps packets summary (implied by -p/sp/ep) -sp services analysis (PAT only) -ss same as -sp, but includes SDT -fr frequencies encountered in NIT -ep event packets encountered in EIT -e2 include current events of other TS streams -e3 include scheduled events of actual TS stream -e4 include all events of all TS streams -EP {epgfile} EPG extraction (kaffeine format, implies -e3) -ER {epgfile} same as -EP, but include radio services (implies -RA) -TX {ttxfile} TTX extraction (file output, text format) -TY TTX extraction (screen control, stdin+out is a TTY) Streams extraction: -x / -X extract streams as PES / ES (demux) -y extract programs as separate TS streams -k / -K keep extracted non-A/V / PSI/PMT streams (with -x / -X) -B auto-split extracted files at REC bookmarks -o / -O output streams to RECPIPE (see below) / stdout -q same as -o, but skip to EOF first (to show live rec.) -of {file} same as -o, but output to the specified file -on {host} same as -o, but output to host via NETPIPE (see below) -np {port} NETPIPE port (default: 12181) -rc {size} RECPIPE cache size (default: 25000) -S {program} service id (program) filter, default is all SIDs -N NULL packets included to output Video recording: -rt {hh:mm,min} recording start time & duration, output as above -RT {hh:mm,min} same as -rt, but output to a file {title-subtitle}.ts Output verbosing: -v verbose (PCR search for -b and -i, services for -CS) -vs verbose statistics (memory usage, execution time) -w / -W warnings suppressed / even critical ones Debug verbosing (undocumented, may change without notice): -AF exit on adaptation field extensions -TC warn about undecoded / incomplete / bad tables -IE warn about itemized extended text (may need -ep) -DN list undecoded NIT descriptors -DS list undecoded SDT descriptors -DE list undecoded EIT descriptors -DP list undecoded PMT descriptors -DK add known undecoded descriptors -DU exit at undecoded descriptors -VT verbose TDT tables -VN verbose NIT tables -VS verbose SDT tables -VD verbose EIT tables -VX verbose TTX collection -vP {packet} verbose packets starting at packet -vS {pid} verbose stream packets Channels scan (TV card required, Linux only): (specify {file} as initial frequency, dflt. is Astra 19.2°) e.g.: 12552va Astra 19.2° 11623 Eurobird 28.5° -CS [-v] channels scan (output results to -c and/or -v) -CF same as -CS, but free to air services only -CT same as -CS, but television services only -CH same as -CS, but HD television services only -CR same as -CS, but radio services only -CD same as -CS, but data / text services only -CA same as -CS, but include non-video/audio services -S1 scan DVB-S1 frequencies only (modulation available) -c {chfile} channels output file (kaffeine format, dflt. is none) Main argument {file} may be direct input from TV card (Linux only): frq[pol][sym] | [@]ch_num[.] | [@]ch_name frq tuning frequency [MHz] pol polarization (h or v, default is h) sym symbol rate (a=22000, b=27500, default is b) @ complete transponder, otherwise channel's SID ch_num channel number (append dot for uniqueness) ch_name channel name (case-insensitive) e.g.: 11836 ARD/BR transponder 11361a ZDF HD transponder env.: DVB_ADAPTER DVB adapter directory, default: /dev/dvb/adapter0 DVB_CHANNELS channels file, dflt.: $HOME/.kde/share/apps/kaffeine/channels.dvb, -c overrides Environment variables: COLUMNS text output width, value currently set to 236 RECPIPE default: 'mplayer -cache %d - 1>/dev/null 2>&1' NETPIPE default: 'netpipe -p %d %s' (port and host) ================================================================================ DESCRIPTION & EXAMPLES ====================== rectool {file}* Examines REC headers and prints contained information to stdout, e.g.: Tue Jun 5 00:30:00 2012 58' BM:17 TV 20 zdf.kultur Paul McCartney Good Evening New York City.rec [2960 MB] Paul McCartney ** Good Evening New York City The above info is: EPG start time, duration, #bookmarks, channel, station, file name, file size, title ** subtitle If a file is not in .rec format, but any ts (transport stream) format, only file name and file size are output. rectool -1 {file}* REC header infos are printed in 1 line per file (list format), e.g.: Sat Apr 24 00:50:00 2010 3' BM:0 TV 16 Einsfestival Alice Cooper - School's Out.rec [201 MB] Top of the Pops Tue Mar 1 04:30:00 2011 38' BM:0 TV 8 3sat America - Live in Chicago.rec [2387 MB] America: Live in Chicago Sat Dec 31 00:15:00 2011 20' BM:4 TV 3 Bayerisches FS Süd BAP - Live aus der Kaltenberg Arena.rec [1159 MB] BAP feat. Klaus Doldinger Sun Jul 24 05:10:00 2011 43' BM:8 TV 20 zdf.kultur Deep Purple - Total Abandon.rec [1992 MB] Deep Purple: Total Abandon Tue Jan 11 01:20:00 2011 18' BM:0 TV 8 3sat Dire Straits - Musikvideos.rec [1139 MB] Pop-Heroes: Dire Straits Option -tf: Text output redirected into separate files {file}.txt. Option -te {ext}: Text output redirected into separate files {file}{ext}. Option -tw {width}: Text width (#characters per output line), min. 40, default is 80 or the decimal value of environment variable COLUMNS (if specified). rectool -e {file}* Additionally, extended EPG info is output (indented), like this: Thu Oct 13 17:05:00 2016 91' BM:0 TV zdf_neo HD TMS RESTORED Serie - Columbo/Columbo - 62. Der Tote in der Heizdecke.rec [9969 MB] Columbo ** Der Tote in der Heizdecke USA 1993 Die reiche Lauren Staton gibt eine große Party, zu der sie auch ihren jüngeren Liebhaber Nick Franco eingeladen hat. Franco verlässt die Party jedoch schon bald wieder. Kurz darauf erfährt sie von einer Affäre und kontaktiert diese - Lisa Martin. Die beiden betrogenen Frauen töten gemeinsam den untreuen Mann. Weil sie durch den Gebrauch einer Heizdecke den Todeszeitpunkt verfälschen, tappt Columbo zunächst im Dunkeln. Darsteller: Columbo - Peter Falk Lauren Staton - Faye Dunaway Lisa Martin - Claudia Christian ... Regie: Vincent McEveety Buch/Autor: Richard Levinson, William Link HD-Produktion Altersfreigabe: 6 rectool -h {file}* Output header details (of REC file or with -i): Magic: TFrc Version: 0x8000 Start Time #2: 13.10.2016 19:05 (PVR's local [recording] time) Duration Min: 91 Duration Sec: 1 Service Name: zdf_neo HD Service Type: 0 (0=TV 1=Radio) Service ID: 11130 PMT PID: 6300 PCR PID: 6310 Video PID: 6310 Audio PID: 6320 Video S. Type: 27 Audio S. Type: 3 Sat Index: 1 TP Index: 104 Sat Index #2: 1 Polarization: 1 (0=V 1=H) Frequency: 11361 Symbol Rate: 22000 TS ID: 1011 Network ID: 1 Event ID: 13808 Start Time: 13.10.2016 17:05 End Time: 13.10.2016 18:35 Duration Hour: 1 Duration Mins: 30 Event Name: Columbo Event Text: Der Tote in der Heizdecke Event Ext. Text: USA 1993 Die reiche Lauren Staton ... ... HD-Produktion Bookmarks: 0 Resume: 4684 rectool -i {file}* rectool -i2 {file}* Options -i/-i2 provide "REC header" infos even for non-Topfield files. The required data is extracted from TS streams' EIT packets, if present, by searching the recording's current event information. If found, the main infos (title, subtitle and start time) are output and the inquired data is used instead of any original "REC header" infos (e.g. for -h/-s/-r/-HI/-HE). If the original "REC header" is missing, -i is implied by -h/-s/-r/-HI/-HE. A special use case is .inf file restauration for TMS recordings (see below). Option -i2 searches the recording's 2nd current event information (useful e.g. when the broadcast was shifted). NOTE: As soon as all required data is encountered, any packets reading (see "PACKETS EVALUATION" below) is terminated. rectool -s {file}* Set file time (last modification time) to EPG start time. rectool -r {file}* Rename file to "EPG title".rec . -R additionally appends subtitle to title. -d/-D additionally prepends / appends start date. -T additionally appends start time to date. -RN to even rename lost+found .nav files. Option -L: Convert any UTF-8 strings to Latin-1 (affects displaying and renaming). Default is no conversion. -L and -U are mutually exclusive. Option -U: Convert any Latin-1 strings to UTF-8 (affects displaying and renaming). Default is no conversion. -L and -U are mutually exclusive. rectool -HN {file}* rectool -HR {file}* Introduction: 5K REC headers have a size of 20x a TS packet (188 bytes each). If we turn it into 20 "null" TS packets (by only writing 4 bytes into each packet header), the whole file turns into a pure TS stream, readable even by players that don't understand the REC header natively. This method avoids copying many gigabytes to just remove the REC header! -HN saves the REC header's concerned 20x 4 bytes into an unused area near the end of the REC header and then turns the whole file into a pure TS stream by the method described above. FILE IS MODIFIED! -HR restores the REC header's concerned 20x 4 bytes from the save area, thus restoring the REC header completely. EPG data etc. are now available again. FILE IS MODIFIED! rectool -HI {file}* rectool -HE {file}* Similar to the 5K REC headers explained above, TMS .inf files may be "imported" (-HI) into the first 20 TS packets of the corresponding .rec file. You can delete the .inf file afterwards, because it can be "exported" again by the -HE option, without a loss of information (except an optional still image). NOTE: .inf file restauration for TMS recordings is accomplished by command "rectool -i -HE {file}*", where -i (or -i2, see above) is only required to override a potentially present original "REC header". Similarly, "rectool -i -HI {file}*" imports a thus reconstructed "REC header" directly into the first 20 TS packets of the .rec file, even together with -HE. rectool -b {file}* rectool -bm {file}* Write the REC header's bookmarks into a file *.txt in the current directory. Each bookmark is output as a video frame number (starting with 0 at BOF). The frame numbers are accurate to the frame, since they are obtained from the timecode information inside certain video TS packets. -bm prints output in MKVToolNix format ------------------ PACKETS EVALUATION ------------------ rectool -p {file}* Analyze the complete file for all streams inside and print info about them. The output list looks like this: -------------------------------------------------------------------------------- PID PACKETS STARTS FIRST PID PRG TYPE LANG ST SI NAME STREAMS OTHER -------------------------------------------------------------------------------- 0x0 54602 54602 593 0 PAT 0x11 96181 77339 228 17 SDT 2056 BAT etc. (STARTS) 0x12 2546538 403140 13 18 EIT 0x189c 54602 54602 621 6300 11130 PMT HD 94.7% "zdf_neo HD" 6310/h264 6320/deu 6321/mis 6322/deu 6323/mul 6330/ttx 6331/subt 6170/0x05 0x181a 0 0 -1 6170 11130 0x05 5 8 0x18a6 43983869 273001 0 6310 11130 h264 27 1 0x18b0 955529 45501 10 6320 11130 mp2 deu 3 2 0x18b1 728022 45501 49 6321 11130 mp2 mis 3 4 0x18b2 1672177 34126 3 6322 11130 ac3 deu 6 5 0x18b3 728022 45501 40 6323 11130 mp2 mul 3 9 0x18ba 1092024 273006 32 6330 11130 ttx 6 3 0x18bb 13636 0 1301 6331 11130 subt 6 6 -------------------------------------------------------------------------------- PACKETS 51925202, 84.7% video, 7.9% audio, 2.1% text, 5.2% PSI, 0.1% PMT STREAMS 12, 3 PSI, 1 PMT (3 in PAT, 1 HD), 8 PES (1 video, 4 audio, 2 text) PROGRAMS 148 (including all from SDTs), TSID = 1011, NWID = 1 EVENTS 9 (30824/403138 admitted/total EITs) Latter 4 lines are a summary, that can also be obtained by -ps. ST = stream type SI = stream identifier The analysis works with any TS file, not only .rec format files. Even files with multiple programs can be processed (e.g. a complete transponder). In the above example, 3 total programs are listed in the PAT, but no TS stream packets were found for the other 2, so they are not listed. 145 more programs (services) were found in SDT tables. Option -P: Some REC files do not contain a PAT at all and rectool doesn't expect a PAT anymore after some time, but assumes all streams to belong to the same program. If rectool is too impatient to wait, -P forces to really wait for a PAT and all packets are discarded until the 1st PAT packet appears. Option -ps: Output the 4 lines packets analysis summary (see -p), that is also implied by -p/-sp/-ss/-ep. Option -sp: Option -ss: Services (programs) analysis (PAT only): PMT PID PACKETS TSID PRG ES SVT PROGRAM -------------------------------------------------------------------------------- 0x17d4 6100 0 1011 11110 0 0x19 ZDFvision ZDF HD 0x189c 6300 49173279 1011 11130 8 0x19 ZDFvision zdf_neo HD 0x1900 6400 0 1011 11140 0 0x19 ZDFvision zdf.kultur HD ES = elementary streams SVT = service type -ss additionally includes all services found in SDT tables (may be many). Option -ep: EIT packets analysis (EPG events): NWID TSID PRG PROGRAM START DUR EID LANG EVENT ---------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 1011 11110 ZDF HD Do, 13.10.2016 17:00 0:10 16479 deu heute 1 1011 11110 ZDF HD Do, 13.10.2016 17:10 0:35 16480 deu hallo deutschland 1 1011 11110 ZDF HD Do, 13.10.2016 17:45 0:15 16481 deu Leute heute 1 1011 11110 ZDF HD Do, 13.10.2016 18:00 1:00 16482 deu SOKO Stuttgart ** Rendezvous mit dem Tod 1 1011 11110 ZDF HD Do, 13.10.2016 19:00 0:20 16483 deu heute 1 1011 11130 zdf_neo HD Do, 13.10.2016 17:05 1:30 13808 deu Columbo ** Der Tote in der Heizdecke 1 1011 11130 zdf_neo HD Do, 13.10.2016 18:35 0:45 13809 deu Bares für Rares ** Die Trödel-Show mit Horst Lichter 1 1011 11140 zdf.kultur HD Do, 13.10.2016 12:00 12:00 2 deu ZDFkultur wurde am 30.09.2016 eingestellt. 1 1011 11140 zdf.kultur HD Fr, 14.10.2016 00:00 12:00 3 deu ZDFkultur wurde am 30.09.2016 eingestellt. Option -EP {epgfile}: EPG extraction into a file (kaffeine format). Option -fr: NIT packets analysis (network frequencies): -------------------------------------------------------------------------------- NWID TSID f [MHz] SR FEC MOD +19.2° ASTRA 1 -------------------------------------------------------------------------------- 1. 1 1050 10729.00 V 22000 2/3 8PSK DVB-S2 2. 1 1051 10743.75 H 22000 2/3 QPSK 3. 1 1052 10758.50 V 22000 2/3 QPSK 4. 1 1053 10773.25 H 22000 2/3 8PSK DVB-S2 5. 1 1054 10788.00 V 22000 2/3 QPSK 6. 1 1055 10802.75 H 22000 2/3 8PSK DVB-S2 7. 1 1056 10817.50 V 22000 2/3 8PSK DVB-S2 8. 1 1057 10832.25 H 22000 2/3 8PSK DVB-S2 9. 1 1058 10847.00 V 22000 2/3 QPSK 10. 1 1060 10876.50 V 22000 2/3 QPSK 11. 1 1061 10891.25 H 22000 2/3 8PSK DVB-S2 12. 1 1062 10906.00 V 22000 2/3 8PSK DVB-S2 ... Option -TX {ttxfile}: TTX (teletext) extraction into a file (all collected pages). Option -TY: Interactive TTX (teletext) display, available commands: nnn specific page SPACE burst output BACKSP. burst output back RETURN update page RIGHT next page LEFT previous page DOWN next available page UP previous available page PgDn next magazine PgUp previous magazine Pos1,^A first page (100) End, ^E last available page F1-F12 page shortcuts c toggle color mode r toggle raw mode s rows statistics t table page frequencies p show packets summary q, ^C quit current input Q, ^\\ terminate program 0 restart with arg0 ? show this help text Typical output of a TTX page (without colors here): ======================================== 100 100 ZDFtext Di 19.04.05 19:20:57 Mit dem Zweiten sieht man besser Rom: Ratzinger neuer Papst ...... 120 Jubel im bayerischen Geburtsort . 123 Im Porträt: Benedikt XVI. ....... 126 Unwetterwarnung für NRW ......... 143 Fußball: Smolarek bleibt beim BVB 204 DFB-Pokal-Euphorie in Bielefeld . 209 Champions-League-Finale in Paris 225 19.00 heute ................... 310 danach ZDF spezial Inhalt (A-Z) 101 Wetter Nachrichten 112 Regionalwetter . 171 Sport ...... 200 Pollenflug ..... 178 Programm ... 300 Europawetter ... 181 Burst output exploits the full width of your display and may show e.g. 10 pages at a time! Example for page frequencies (command t): ZDF: relative frequency of 1132/4068 TTX pages (collected/updated): 100: 90 200: 86 250: 13 300: 21 350: 11 400: 11 450: 11 500: 29 550: 27 600: 31 650: 11 700: 9 750: 9 800: 9 101: 29 151: 9 201: 31 251: 15 301: 29/2 351: 11 401: 11 451: 11 501: 11 551: 11 601: 11 651: 11/4 701: 33 751: 9 801: 9 102: 9 152: 9 202: 29 252: 23 302: 19 352: 13 402: 11 452: 11 502: 11 552: 11/3 602: 11 652: 11/4 702: 9 752: 9/2 802: 9 103: 9 153: 9 203: 11 253: 11 303: 27/2 353: 11 403: 11 453: 13 503: 11 553: 11/4 603: 11 653: 11/4 703: 9 753: 9/2 803: 9 104: 9 154: 9 204: 9 254: 11 304: 29 354: 13 404: 11/2 454: 11 504: 11 554: 11 604: 11 654: 11/4 704: 9 754: 9 804: 11 105: 9 155: 9 205: 9/2 255: 11 305: 13/2 355: 11 405: 11 455: 11/4 505: 11 555: 11 605: 11 655: 11/4 705: 9 755: 9 805: 11 106: 9 206: 9 256: 11/2 306: 11 356: 11 406: 11/2 506: 11 556: 29 606: 11 656: 11/4 756: 9 806: 9 107: 9 207: 11 257: 13 307: 13 357: 11/2 407: 11/2 507: 11 557: 11 607: 11 657: 11/4 707: 9 807: 9 108: 9 208: 11 258: 11/2 308: 11 358: 11/2 408: 11/3 558: 11/2 608: 11 658: 11/4 758: 9 808: 9 109: 9 209: 11 259: 11 309: 11 359: 13/2 409: 11 559: 11 609: 11 659: 13/2 709: 9 759: 9 809: 9 110: 9 210: 11 260: 11/2 310: 11 360: 13/2 410: 11/2 510: 11 560: 11/4 610: 11 660: 11 710: 11 760: 9 810: 9 111: 9 211: 11 261: 11 311: 11 361: 11/2 411: 11 511: 11 561: 13/5 611: 11/2 661: 11/4 711: 9/3 761: 9 811: 9 112: 29 212: 11 262: 11/2 312: 11 362: 11/2 412: 13 512: 13 562: 11/6 612: 11/2 662: 11/4 712: 9/3 762: 9 812: 9 113: 9 213: 11 263: 11 313: 11 363: 13 413: 11 513: 11 613: 11/3 663: 11/2 713: 9/5 763: 9 813: 9 114: 9 214: 11 264: 11/2 314: 11/2 364: 11/2 414: 11 514: 11 564: 11 614: 11 664: 11/4 714: 9/5 764: 9 814: 9 115: 9 165: 9 215: 11 265: 11 315: 11 365: 11 415: 11/2 515: 13 565: 11 615: 11 665: 11/4 715: 9 765: 9 815: 9 116: 9 166: 9 216: 11 266: 11/2 316: 11/2 366: 11/2 416: 13/4 616: 11 666: 11/6 716: 9/3 766: 9 117: 11 167: 9 217: 11 267: 11 317: 11 367: 11 417: 11/2 617: 11/4 667: 11/4 717: 9/2 767: 9 168: 9 218: 11 268: 11/2 318: 11/2 368: 11/2 418: 13 618: 11/4 668: 9/4 718: 9/4 768: 9/2 169: 9 219: 11 269: 15 319: 11/2 369: 11 419: 11/4 619: 11/4 669: 9/4 719: 9/4 769: 9/3 120: 29 170: 27 220: 11 270: 11/2 320: 11 370: 11/2 420: 11 620: 11/4 670: 9/4 770: 9 820: 9 121: 9 171: 9 221: 11 271: 11 321: 11 371: 11 421: 11/4 621: 11/4 671: 9/4 821: 9 122: 29 172: 9 222: 45 272: 11 322: 11 372: 11/2 422: 11/3 472: 11 622: 11/4 672: 9/4 822: 9 123: 9 173: 9/2 223: 11 273: 11 323: 11/2 373: 11 423: 11/2 473: 11 573: 11 623: 11/4 673: 9/4 823: 9 124: 9 174: 9/2 224: 11 274: 11 324: 11 374: 11/2 424: 11/3 474: 11 574: 11/3 624: 11/4 674: 9/4 824: 9 125: 9 175: 11 225: 13 275: 11 325: 11/2 375: 11 425: 11 475: 11 575: 11 675: 9/4 725: 9/2 825: 9 126: 31 176: 11/3 226: 11 276: 11 326: 11 376: 11 426: 11 476: 11 576: 11/6 626: 11 676: 9/4 726: 9/2 127: 9 177: 9 227: 11 277: 11 327: 11 377: 11/2 427: 11/2 477: 11 577: 11/6 627: 13/2 677: 9/4 727: 9 128: 9 178: 9/2 228: 11 278: 11 328: 11 378: 11 428: 11/2 478: 11/6 578: 11/3 628: 11 678: 9/4 728: 9/2 129: 9 179: 9 229: 11 279: 11 329: 11 379: 11 429: 11/2 579: 11/3 629: 11 679: 9/4 729: 9/4 130: 9 180: 9/3 230: 11 280: 11 330: 11 430: 11 530: 11 580: 11 630: 11 680: 9/4 730: 9 830: 9 131: 29 181: 9 231: 11 281: 11 331: 11 431: 11/2 531: 11 581: 11/2 631: 11 681: 9/4 731: 9/4 831: 9 132: 9 182: 9/3 232: 9 282: 11 332: 11 432: 11/2 532: 11 582: 11/2 632: 11/4 682: 9/4 732: 9/4 832: 9 133: 9 183: 9/2 233: 11 283: 11 333: 13 433: 11/2 533: 11 583: 11/2 633: 11/4 683: 9/4 733: 9/4 833: 9 134: 9 184: 9 234: 13 284: 11 334: 11/2 434: 11/2 484: 13/3 534: 13 584: 11/2 634: 11 684: 9/4 734: 9/4 834: 9 135: 9 185: 11 235: 11 285: 11 335: 13/2 435: 11/2 485: 11 535: 11 585: 11/2 635: 11/4 685: 9/4 735: 9/4 835: 9 136: 9 186: 9 236: 11 286: 11 336: 13 436: 11/2 486: 11 536: 11 586: 11/2 636: 11/3 686: 9/4 736: 9/4 836: 9 137: 11 187: 9 237: 11 287: 11 337: 11 437: 11/3 487: 11 537: 11 587: 11 637: 11/4 687: 9/4 737: 11/5 887: 9 138: 9 188: 9 238: 11 288: 11 338: 11 438: 13/2 488: 11 538: 11 588: 11 638: 11/5 688: 9/4 738: 9/3 888: 53 139: 9 189: 9 289: 11 339: 11/2 439: 11/2 489: 13/2 539: 11 589: 11 639: 11/5 689: 9/4 739: 9/5 889: 9 140: 9 190: 9 240: 9 290: 11 340: 11 440: 11/2 490: 13/2 540: 11 590: 27 640: 11/4 690: 9/4 740: 9 840: 9 890: 9 141: 9 191: 9 241: 9 291: 11/2 341: 11 441: 11/2 491: 11/2 541: 11/6 591: 11 641: 11/5 691: 9/4 741: 11/3 841: 9 891: 9/3 142: 9 192: 11/3 242: 9 292: 11/2 342: 11 442: 11/2 492: 11/2 542: 11/6 592: 11 642: 11/4 692: 9/4 742: 9/3 842: 9 892: 9/5 143: 9 193: 9/3 293: 11/2 343: 11/2 443: 11/4 493: 11 543: 11/6 593: 11 643: 11/4 693: 9/4 743: 9/3 843: 9 893: 9/5 144: 9 194: 9/3 244: 15 294: 11/2 444: 53 494: 11/2 544: 11/6 594: 13 644: 11/5 694: 9/4 744: 9/5 844: 9 145: 9 195: 9/4 245: 13 295: 11/2 445: 13 495: 11/5 545: 11/6 595: 13 645: 11/5 695: 9/2 745: 9/3 196: 9/4 296: 11/2 446: 11/2 496: 11 546: 11 596: 11/6 646: 11/5 746: 9/5 197: 9/2 247: 11/2 297: 11 447: 11 497: 11/2 597: 11 647: 11/2 747: 9/5 897: 9/2 198: 9/2 248: 11/2 298: 11 448: 11 498: 11/2 648: 11 748: 9/5 898: 9 199: 9/3 249: 11/3 299: 11 399: 11 449: 11 499: 11/6 599: 29 649: 11 749: 9/5 899: 15/4 ------------------ STREAMS EXTRACTION ------------------ rectool -x {file}* Extract the (TS-packetized) PES streams as separate files to the current directory (demuxing). Current file extensions are: .mpg1, .mpg2, .h264, .hevc, .mp2, .mp2a, .ac3, .aac etc. rectool -X {file}* Extract the (elementary) ES streams (without TS-packet envelopes). Video streams are nonetheless extracted as PES streams. Extensions: .mpg1, .mpg2, .h264, .mp2, .ac3 etc. rectool -y {file}* Extract each program's streams into program-specific TS files, this is useful for input files with multiple programs (e.g. complete transponder). rectool -y -B {file}* Auto-split the program-specific TS files (see -y above) into parts delimited by REC bookmarks (useful even for single-program input files). Option -o: Output streams to a pipe defined by env. var. RECPIPE, default is "mplayer" (must be located somewhere in PATH). A cache size may be specified for RECPIPE by option "-rc {bytes}". Option -of {file}: Output streams to specified file. Option -on {host}: Output streams to a pipe defined by env. var. NETPIPE, default is "netpipe" (must be located somewhere in PATH). Default port is 12181. A port number may be specified for NETPIPE by option "-np {port}". Option -O: Output streams to stdout. Useful for other filter chains or for redirecting the packets into a file. Option -RA: Include radio services for options -o/-on/-sp/-ep/-EP. Radio services are omitted otherwise for these options. Option -rt {hh:mm,min}: Video recording start time & duration. Input source must not be a file. Output destination as above, default is stdout. Option -RT {hh:mm,min}: Same as -rt, but output to a file {title-subtitle}.ts (will be renamed from a temporary file, so you can add -d/-D/-T and -s). --------------------- SPECIAL INPUT SOURCES --------------------- Input from stdin: rectool can also accept its input from stdin, filename is just "-". So you can use rectool as a pipe from e.g. TV application programs. Input from NETPIPE: rectool can also accept its input from a NETPIPE (see -on above) running on a remote (or the local) host, filename is "=". Input from TV card (Linux only): Special input filename syntax: frq[pol][sym] | [@]ch_num[.] | [@]ch_name frq tuning frequency [MHz] pol polarization (h or v, default is h) sym symbol rate (a=22000, b=27500, default is b) @ complete transponder, otherwise channel's SID ch_num channel number (append dot for uniqueness) ch_name channel name (case-insensitive) e.g.: 11836 ARD/BR transponder 11361a ZDF HD transponder env.: DVB_ADAPTER DVB adapter directory, default: /dev/dvb/adapter0 DVB_CHANNELS kaffeine channels file, default: $HOME/.kde/share/apps/kaffeine/channels.dvb (-c {chfile} overrides, see below) ------------- CHANNELS SCAN ------------- This feature requires input from a TV card (Linux only). Detailed results are output to -c {chfile} in kaffeine format (as required above) and/or to -v (verbose screen) in text format. Available options: -CS channels scan -CF same as -CS, but free to air services only -CT same as -CS, but television services only -CH same as -CS, but HD television services only -CR same as -CS, but radio services only -CD same as -CS, but data / text services only -CA same as -CS, but include non-video/audio services -S1 scan DVB-S1 frequencies only (modulation available) ================================================================================ MODIFICATION HISTORY ==================== * V1.00 27-FEB-2009 First private use * * New: [Extended] EPG infos * * New: Set file time * * V1.10 23-APR-2010 New: Rename files * * V1.20 24-JAN-2011 New: Renaming extension .tp * * * * V2.00 14-JUL-2012 First public release * * New: Bookmarks lists * * New: Neutralize / restore .rec header * * New: Streams analysis * * New: Streams extraction * * * * V2.01 15-JUL-2012 New option: Warnings suppression * * V2.02 26-JUL-2012 New option: Wait for first PAT * * New option: Keep extracted PSI/PMT streams * * PIDs < 0x20 treated as PSI * * New extraction file naming scheme * * New: Output streams to RECPIPE (e.g. mplayer) * * New: Direct input from TV card (Linux only) * * * * V2.10 19-AUG-2012 Next public release * * New: Direct input via own rectune.c (Linux only) * * New: Direct input from stdin * * New: Output streams to stdout * * New: ^C signal handler to stop processing * * New option: Keep extracted non-A/V streams * * New option: SID (program) output filter * * Null packets removal * * Multi-program handling (analysis part) * * New: Programs extraction (as TS streams) * * Auto-split extracted files at REC file bookmarks * * * * V2.11 11-SEP-2012 Bug fixed: -y didn't call packets() * * V2.12 07-MAR-2013 Bug fixed: Number of bookmarks allowed to be 64 * * Bug fixed: Positioning of files > 4 GB for Win32 * * * * V2.13 16-MAR-2013 Bug fixed: Too many open files (channels.dvb) * * New option: List format special * * * * V2.14 27-JUL-2013 New option: Skip to EOF to play live streams * * * * V2.15 08-JAN-2014 Renaming improved (omit empty subtitle) * * * * V2.16 23-NOV-2014 Strict adaptation field extension check removed * * * * V2.20 25-OCT-2015 192-byte packets (ignore prefixed 4-byte timecode) * * * * v3.00 05-FEB-2017 Accept Topfield TMS .rec and .inf files * * Autosplit at TMS bookmarks * * Changed old option -C into new option -HN * * Changed old option -G into new option -HR * * New option -HI: Import TMS .inf file * * New option -HE: Export TMS .inf file * * New option -h: REC header details * * Removed: Renaming extension .tp * * Optional UTF-8 to Latin-1 conversion * * Binary program for MIPS LE available * * v3.01 07-FEB-2017 * * -LD: Deny renaming, if converted filename different * * -bm: Bookmarks in MKVToolNix format * * Celltimes output for TMS bookmarks verified * * v3.10 21-MAR-2017 * * Changed m1v/m2v/m4v to mpg1/mpg2/h264 * * Changed m1a/m2a to mp2/mp2a * * Added 4K support (hevc, aac) * * Added Bluray .m2ts files support * * -vs: Statistics (memory usage, execution time) * * -N: NULL packets included to output * * TS_SYNC bytes or 5K header required at BOF * * Sort packets analysis list * * Added stream type and identifier into list * * Added orphan streams statistics * * Fixed program descriptors offset in PMT * * Improved descriptor evalution * * Added SDT and EIT evaluation * * -ps: Packets summary (included by -p/sp/ep) * * -sp: List PAT services (name/provider from SDT) * * -ss: List all SDT services (includes -sp) * * -ep: List EIT events (-e2/e3 include other/sched.) * * -EP/ER: EPG extraction (kaffeine format) * * -i/i2: Inquiry from current event for -h/-s/-r/-H* * * -vp: Verbose PCR search (for -b and -i) * * Removed old option -v (general verbose) * * Removed old option -E (special renaming with date) * * v3.20 30-MAR-2017 * * Show current events, if output to RECPIPE * * No radio services output to RECPIPE (-o) * * -RA: Include radio services to -sp/-ep/-o * * Input / output via NETPIPE (= / -on) * * -np: NETPIPE port * * -rc: RECPIPE cache size * * -tw: Text output width * * -h output reduced for non-TF files * * Fix: Crash -h with non-TF 188-byte streams * * Fix: Packets /w adapt. field AND payload retained * * Improved descriptors evaluation and tracing * * Added BAT and NIT evaluation * * Added TDT and TOT evaluation * * v3.30 06-APR-2017 * * New: Channels search (currently only Astra 19.2°) * * Fix: Stuffing Table shall be ignored * * Fix: All PSI tables have sufficient space now (4K) * * Workaround: PSI padding pointer out of range * * Fix: Streams summary components were incomplete * * Better TSID and NWID control * * Show bouquet and network names in summary * * PAT not necessarily needed anymore * * PMTs may have same pid with different prg * * Fix: -r now also renames .inf and .nav (if present) * * Enigma .eit files evaluation * * v3.31 15-APR-2017 * * -tf: Text output redirected into {file}.txt files * * Fix: etext still contained charset specifiers * * Recording start time / duration by TDT / TOT for -i * * Show number of free services in summary * * -c: Channels file for -CS output (kaffeine format) * * -c: Channels file also input for channel specific. * * -v: Verbose (replace old -vp, list services in -CS) * * Removed old option -vp (PCR search for -b and -i) * * -CF: Channels scan (free to air services only) * * -CT: Channels scan (television services only) * * -CH: Channels scan (HD television services only) * * -CR: Channels scan (radio services only) * * -CD: Channels scan (data/text services only) * * -CA: Channels scan (include non-video/audio) * * Decoding NIT transport stream loop descriptors * * Channels scan by NIT descriptors * * -S1: Scan DVB-S1 frequencies only (modulation) * * -fr: Frequencies encountered in NIT * * -TX: TTX extraction (basic decoding) * * v3.32 22-APR-2017 * * -ns: Number of packets to skip before reading * * TS container check prepended, continue on error * * Fix: Continue on missing or empty files * * Fix: Semi-endless loop in resync possible * * Improved getduration (resync) * * Improved getduration2 (resync, extended begin) * * v3.33 23-APR-2017 * * Consecutive numbering for renaming, if file exists * * Some more warnings made suppressable by -w * * Fix: %lld statistics for Win32 * * TTX extraction (array of pages) * * v3.34 25-APR-2017 * * Fix: Bad size from ftell on MIPS (32 bits) * * Fix: Save titles containing a dot for renaming * * -T: time appended to date for renaming * * -TY: TTX extraction (screen control / output) * * v3.35 28-APR-2017 * * TTX extraction (color mode, burst output etc.) * * SIGQUIT to terminate arguments loop (Linux only) * * v3.36 30-APR-2017 * * Fix: TTX end of background color, blinking * * New TY command BS (burst output back) * * New TY command t (table of page frequencies) * * New TY command p (show packets summary) * * New TY command 0 (restart with arg0) * * Some Fx shortcut commands for TY * * Burst output for nnn and other TY commands * * -G: German weekday names * * v3.37 07-MAY-2017 * * SIT evaluation (no interesting descriptors found) * * -IE: Check itemized extended text in headers + EITs * * Display itemized text of headers + EITs correctly * * Accept .inf files and 5K fragments as input files * * Corrections for 5K and TMS PVRc header TP info * * Header reading redesigned * * v3.38 10-MAY-2017 * * -i: Start inquiring from the middle of the file now * * -i1: Start inquiring from the beginning of the file * * Improved display of itemized extended text * * -RC: AcadeRC output mode * * v3.39 15-MAY-2017 * * Corrections for 5K PVRt header structure * * -te {ext}: Text output redirected into {file}{ext} * * -rt {hh:mm,min}: Video recording start time & dur. * * -of {file}: Streams output to the specified file * * v3.40 17-MAY-2017 * * -RT {hh:mm,min}: Output to {title-subtitle}.ts * * -U: Latin-1 to UTF-8 conversion * * -XML: Output phead text as XML * * Old option -LD removed (deny renaming diff. filen.) * * v3.41 26-MAY-2017 * * -HE && -ARC: Overwrite .inf, if existing * * Some fixes in rectune.c for S2API * * v3.42 08-JUL-2017 * * Make interrupt possible again, if NO LOCK * * au_msleep (1100) before dvbinit to improve LOCK * * -RN: Rename lost+found .nav files * * v3.43 20-JUL-2017 * * 10 Improved PAT / EIT search for -RN (RENAV_FACTOR) * * No "unknown input specification" message for -RN * * new No "not a TS container" message for -RN .nav files * * Remove empty files for -RN * * <200K If (is_inf && !isext_inf && -HE && -RN) rm file * * Imply -vs for -RN (verbose statistics) * ================================================================================ LICENCE & DISCLAIMER ==================== You are free to use this program for non-commercial purposes. Acade disclaims all warranties as to this software, whether express or implied, including without limitation any implied warranties of mer- chantability, fitness for a particular purpose or functionality. Any responsibility for any damages (including consequential ones) caused directly or by reliance on this program is denied. Using this program is an acknowledgement of these conditions. Any trademarks mentioned are property of their respective owners. ================================================================================