libdvbtee adalah pengurai aliran dan perpustakaan agregator informasi layanan untuk aliran transportasi MPEG2. Pustaka ini mencakup parser informasi layanan program (PSI) dan dukungan untuk berbagai metode streaming jaringan dan mengetahui API kernel linux-dvb serta API streaming jaringan HDHomeRun.
Perpustakaan berisi fungsionalitas yang cukup untuk mendukung aplikasi middleware televisi berfitur lengkap, termasuk kemampuan untuk memperoleh dan mengalirkan data melalui UDP, TCP, HTTP, DMA dan berbagai mekanisme lainnya.
libdvbtee_server
memungkinkan fitur-fitur ini dikontrol dari sesi http atau antarmuka baris perintah, dan dapat digunakan untuk mengontrol beberapa tuner.
libdvbtee_parser
adalah perpustakaan yang dibangun dari sumber libdvbtee untuk digunakan oleh node-dvbtee libdvbtee_parser
dihosting dalam repositori pengembangan git yang sama dengan libdvbtee
dan dengan demikian, mereka berbagi file README.md tunggal yang sama.
Aplikasi dvbtee yang dapat dieksekusi menyediakan berbagai fitur, termasuk: pemindaian, penyetelan, penelusuran EPG, menerima aliran jaringan masuk, mengalirkan aliran jaringan, mengelola banyak tuner, dan banyak lagi...
Server dapat diakses baik melalui telnet atau http. Nomor port default adalah 64080
, namun ini dapat dikonfigurasi. server_example
menggunakan nomor port 62080
.
Saat mengakses server melalui http, awali perintah dengan / dan argumen dengan =. Saat mengakses server melalui telnet, masukkan form 'command=argument' dan tekan enter.
Michael Ira Krufky
mkrufky di linuxtv dot org
Cara yang disarankan untuk membangun libdvbtee adalah dengan menggunakan skrip build-auto.sh
:
./build-auto.sh
dvbtee/dvbtee < mpegfile.ts
libdvbtee awalnya dikembangkan menggunakan sistem build qmake untuk dukungan build multi-platform yang mudah. libdvbtee masih mendukung sistem qmake, tetapi sekarang menggunakan autotools sebagai sistem build pilihan karena berbagai alasan.
autoreconf --install
./configure
make
dvbtee/dvbtee < mpegfile.ts
Jika, karena alasan yang aneh, Anda ingin membuat libdvbtee menggunakan dekoder tabel/deskriptor versi lama, tentukan --enable-olddecoder untuk mengonfigurasi
autoreconf --install
./configure --enable-olddecoder
make
dvbtee/dvbtee < mpegfile.ts
Jika Anda lebih suka menggunakan qmake daripada autotools, gunakan perintah berikut:
qmake -r
make
LD_LIBRARY_PATH=libdvbtee:libdvbtee_server dvbtee/dvbtee < mpegfile.ts
Jika, karena alasan yang aneh, Anda ingin membuat libdvbtee menggunakan dekoder tabel/deskriptor versi lama, tentukan CONFIG+=olddecoder ke qmake
qmake -r CONFIG+=olddecoder
make
LD_LIBRARY_PATH=libdvbtee:libdvbtee_server dvbtee/dvbtee < mpegfile.ts
libdvbtee bergantung pada libdvbpsi untuk penguraian PSIP. Meskipun libdvbtee akan dibuat berdasarkan rilis libdvbpsi yang lebih lama, diperlukan versi yang lebih baru untuk menyediakan semua fitur terbaru libdvbtee, seperti dukungan ATSC.
Sistem pembangunan libdvbtee mampu membangun dan menghubungkan dengan versi terbaru libdvbpsi dengan menempatkan salinan repositori libdvbpsi di tingkat atas pohon sumber libdvbtee.
Daripada memberikan petunjuk langkah demi langkah dalam README ini, skrip shell disediakan yang akan mengambil sumber libdvbpsi terbaru, mengonfigurasi sistem build, dan membangun kedua perpustakaan secara bersamaan.
Untuk build terintegrasi libdvbtee bersama dengan libdvbpsi versi terbaru menggunakan autotools (disarankan):
./build-auto.sh
dvbtee/dvbtee < mpegfile.ts
Untuk build terintegrasi libdvbtee bersama dengan libdvbpsi versi terbaru menggunakan qmake:
./build-qmake.sh
LD_LIBRARY_PATH=libdvbtee:libdvbtee_server dvbtee/dvbtee < mpegfile.ts
-a adapter id
-A (1 for ATSC, 2 for ClearQAM)
-b display bitrates & statistics
-c channel to tune /
comma (,) separated list of channels to scan /
scan minimum channel
-C channel to tune /
comma (,) separated list of channels to scan /
scan maximum channel
-f frontend id
-F filename to use as input
-t timeout
-T number of tuners (dvb adapters) allowed to use, 0 for all
-s scan, optional arg when using multiple tuners:
1 for speed, 2 for redundancy,
3 for speed AND redundancy,
4 for optimized speed / partial redundancy
-S server mode, optional arg 1 for command server,
2 for http stream server, 3 for both
-i pull local/remote tcp/udp port for data
-n bind to a specific network interface
-I request a service and its associated PES streams by its service id
-E enable EPG scan, optional arg to limit the number of EITs to parse
-e enable ETT extended text tables (EPG descriptions, ATSC only)
-o output filtered data, optional arg is a filename / URI, ie udp://127.0.0.1:1234
-O output options: (or-able) 1 = PAT/PMT, 2 = PES, 4 = PSIP, 8 = AUDIO, 16 = VIDEO
-H use a HdHomeRun device, optional arg to specify the device string
-j enable json output of decoded tables & descriptors
-d debug level
-q quiet most logging
-h display additional help
Untuk menyetel ke id layanan 1 saluran fisik 33 dan mengalirkannya ke port udp:
dvbtee -c33 -I1 -oudp://192.168.1.100:1234
Untuk menyetel frontend kedua adaptor 1 dan mengalirkan TS lengkap saluran fisik 44 ke pendengar tcp:
dvbtee -c44 -otcp://192.168.1.200:5555
Untuk mendengarkan port TCP dan melakukan streaming ke port UDP:
dvbtee -itcp://5555 -oudp://192.168.1.100:1234
Untuk mengurai file yang diambil dan memfilter data PSIP, menyimpan aliran PAT/PMT dan PES ke file:
dvbtee -Finput.ts -O3 -ofile://output.ts
Untuk mengurai aliran UDP selama sepuluh detik:
dvbtee -iudp://127.0.0.1:1234 -t10
Untuk memindai layanan menggunakan tuner pertama yang terhubung:
dvbtee -s -a0
Untuk memindai layanan ClearQAM menggunakan 5 tuner yang dioptimalkan untuk kecepatan dan redundansi parsial:
dvbtee -A2 -T5 -s4
Untuk memindai layanan ATSC menggunakan 2 tuner HdHomeRun yang dioptimalkan untuk kecepatan dan redundansi:
dvbtee -A1 -H -T2 -s3
Untuk memulai server menggunakan adaptor 0:
dvbtee -a0 -S
Untuk memulai server menggunakan tuner1 perangkat HdHomeRun tertentu (misal: ABCDABCD):
dvbtee -H ABCDABCD-1 -S
Untuk memindai saluran dengan output JSON diaktifkan, perintah berikut:
dvbtee -s -c13 -j
...harus menghasilkan keluaran yang mirip dengan berikut:
scan channel 13...
store PAT: v0, ts_id: 2011
3 | 30
4 | 40
5 | 50
store PMT: v12, service_id 3, pcr_pid 49
es_pid | type
31 | 0x02 (Video MPEG-2) |
34 | 0x81 (Audio AC3 (ATSC)) | eng
35 | 0x81 (Audio AC3 (ATSC)) | spa
36 | 0x81 (Audio AC3 (ATSC)) | fre
store VCT: v6, ts_id 2011, b_cable_vct 0
channel | service_id | source_id | service_name
13.1 | 3 | 1 | WNET-HD | eng, spa, fre
13.2 | 4 | 2 | KIDS | eng, spa, fre
13.3 | 5 | 3 | V-Me | eng
store MGT: v6
table type | pid | ver | bytes
0x0000 | 0x1ffb | 6 | 187
0x0100 | 0x1d00 | 6 | 1103
0x0101 | 0x1d01 | 6 | 1105
0x0102 | 0x1d02 | 6 | 1132
0x0103 | 0x1d03 | 6 | 1305
0x0200 | 0x1e00 | 6 | 1197
0x0201 | 0x1e01 | 6 | 1220
0x0202 | 0x1e02 | 6 | 1157
0x0203 | 0x1e03 | 6 | 1213
store PMT: v12, service_id 5, pcr_pid 81
es_pid | type
51 | 0x02 (Video MPEG-2) |
54 | 0x81 (Audio AC3 (ATSC)) | eng
store PMT: v12, service_id 4, pcr_pid 65
es_pid | type
41 | 0x02 (Video MPEG-2) |
44 | 0x81 (Audio AC3 (ATSC)) | eng
45 | 0x81 (Audio AC3 (ATSC)) | spa
46 | 0x81 (Audio AC3 (ATSC)) | fre
# channel 13, 213000000,
13.1-WNET-HD:213000000:8VSB:49:52:3
13.2-KIDS:213000000:8VSB:65:68:4
13.3-V-Me:213000000:8VSB:81:84:5
found 3 services
TSID#07db: [ { "programs": [ { "number": 3, "pid": 48 }, { "number": 4, "pid": 64 }, { "number": 5, "pid": 80 } ], "tableId": 0, "tableName": "PAT", "tsId": 2011, "version": 0 }, { "pcrPid": 49, "program": 3, "streams": [ { "pid": 49, "streamType": 2, "streamTypeString": "Video MPEG-2" }, { "descriptors": [ { "bitRateCode": 14, "bsid": 8, "bsmod": 0, "description": "", "descriptorTag": 129, "fullSvc": true, "language": "eng", "numChannels": "2/0", "sampleRate": "48", "surroundMode": "Not indicated" }, { "ISO639Lang": [ { "audioType": 0, "language": "eng" } ], "descriptorTag": 10 } ], "pid": 52, "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" }, { "descriptors": [ { "bitRateCode": 8, "bsid": 8, "bsmod": 0, "description": "", "descriptorTag": 129, "fullSvc": true, "language": "spa", "numChannels": "2/0", "sampleRate": "48", "surroundMode": "Not indicated" }, { "ISO639Lang": [ { "audioType": 0, "language": "spa" } ], "descriptorTag": 10 } ], "pid": 53, "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" }, { "descriptors": [ { "bitRateCode": 8, "bsid": 8, "bsmod": 2, "description": "", "descriptorTag": 129, "fullSvc": true, "language": "fre", "numChannels": "2/0", "sampleRate": "48", "surroundMode": "Not indicated" }, { "ISO639Lang": [ { "audioType": 0, "language": "fre" } ], "descriptorTag": 10 } ], "pid": 54, "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" } ], "tableId": 2, "tableName": "PMT", "version": 12 }, { "channels": [ { "accessControlled": false, "carrierFreq": 0, "descriptors": [ { "descriptorTag": 161, "serviceLocation": [ { "esPid": 49, "streamType": 2, "streamTypeString": "Video MPEG-2" }, { "esPid": 52, "lang": "eng", "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" }, { "esPid": 53, "lang": "spa", "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" }, { "esPid": 54, "lang": "fre", "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" } ] } ], "etmLocation": 0, "hidden": false, "hideGuide": false, "major": 13, "minor": 1, "modulation": 4, "outOfBand": true, "pathSelect": true, "program": 3, "serviceName": "WNET-HD", "serviceType": 2, "sourceId": 1, "tsId": 2011 }, { "accessControlled": false, "carrierFreq": 0, "descriptors": [ { "descriptorTag": 161, "serviceLocation": [ { "esPid": 65, "streamType": 2, "streamTypeString": "Video MPEG-2" }, { "esPid": 68, "lang": "eng", "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" }, { "esPid": 69, "lang": "spa", "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" }, { "esPid": 70, "lang": "fre", "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" } ] } ], "etmLocation": 0, "hidden": false, "hideGuide": false, "major": 13, "minor": 2, "modulation": 4, "outOfBand": true, "pathSelect": true, "program": 4, "serviceName": "KIDS", "serviceType": 2, "sourceId": 2, "tsId": 2011 }, { "accessControlled": false, "carrierFreq": 0, "descriptors": [ { "descriptorTag": 161, "serviceLocation": [ { "esPid": 81, "streamType": 2, "streamTypeString": "Video MPEG-2" }, { "esPid": 84, "lang": "eng", "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" } ] } ], "etmLocation": 0, "hidden": false, "hideGuide": false, "major": 13, "minor": 3, "modulation": 4, "outOfBand": true, "pathSelect": true, "program": 5, "serviceName": "V-Me", "serviceType": 2, "sourceId": 3, "tsId": 2011 } ], "isCableVCT": false, "tableId": 200, "tableName": "VCT", "tsId": 2011, "version": 6 }, { "tableId": 199, "tableName": "MGT", "tables": [ { "bytes": 187, "pid": 8187, "type": 0, "version": 6 }, { "bytes": 1103, "pid": 7424, "type": 256, "version": 6 }, { "bytes": 1105, "pid": 7425, "type": 257, "version": 6 }, { "bytes": 1132, "pid": 7426, "type": 258, "version": 6 }, { "bytes": 1305, "pid": 7427, "type": 259, "version": 6 }, { "bytes": 1197, "pid": 7680, "type": 512, "version": 6 }, { "bytes": 1220, "pid": 7681, "type": 513, "version": 6 }, { "bytes": 1157, "pid": 7682, "type": 514, "version": 6 }, { "bytes": 1213, "pid": 7683, "type": 515, "version": 6 } ], "version": 6 }, { "pcrPid": 81, "program": 5, "streams": [ { "descriptors": [ { "CaptionService": [ { "digital_cc": "708", "easyReader": false, "iso639lang": "eng", "line21field": true, "serviceNumber": 1, "wideAspectRatio": false } ], "descriptorTag": 134 } ], "pid": 81, "streamType": 2, "streamTypeString": "Video MPEG-2" }, { "descriptors": [ { "bitRateCode": 10, "bsid": 8, "bsmod": 0, "description": "", "descriptorTag": 129, "fullSvc": true, "language": "eng", "numChannels": "2/0", "sampleRate": "48", "surroundMode": "Not indicated" }, { "ISO639Lang": [ { "audioType": 0, "language": "eng" } ], "descriptorTag": 10 } ], "pid": 84, "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" } ], "tableId": 2, "tableName": "PMT", "version": 12 }, { "pcrPid": 65, "program": 4, "streams": [ { "descriptors": [ { "CaptionService": [ { "digital_cc": "708", "easyReader": false, "iso639lang": "eng", "line21field": true, "serviceNumber": 1, "wideAspectRatio": false } ], "descriptorTag": 134 } ], "pid": 65, "streamType": 2, "streamTypeString": "Video MPEG-2" }, { "descriptors": [ { "bitRateCode": 14, "bsid": 8, "bsmod": 0, "description": "", "descriptorTag": 129, "fullSvc": true, "language": "eng", "numChannels": "2/0", "sampleRate": "48", "surroundMode": "Not indicated" }, { "ISO639Lang": [ { "audioType": 0, "language": "eng" } ], "descriptorTag": 10 } ], "pid": 68, "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" }, { "descriptors": [ { "bitRateCode": 8, "bsid": 8, "bsmod": 0, "description": "", "descriptorTag": 129, "fullSvc": true, "language": "spa", "numChannels": "2/0", "sampleRate": "48", "surroundMode": "Not indicated" }, { "ISO639Lang": [ { "audioType": 0, "language": "spa" } ], "descriptorTag": 10 } ], "pid": 69, "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" }, { "descriptors": [ { "bitRateCode": 8, "bsid": 8, "bsmod": 2, "description": "", "descriptorTag": 129, "fullSvc": true, "language": "fre", "numChannels": "2/0", "sampleRate": "48", "surroundMode": "Not indicated" }, { "ISO639Lang": [ { "audioType": 0, "language": "fre" } ], "descriptorTag": 10 } ], "pid": 70, "streamType": 129, "streamTypeString": "Audio AC3 (ATSC)" } ], "tableId": 2, "tableName": "PMT", "version": 12 } ]
tuner specify tuner id
feeder specify feeder id
scan scan for services, optional arg comma (,) separated list of channels to scan
scanepg same as 'scan' with EPG data collection enabled during scan
startscan same as 'scan' but asynchronous
startscanepg combo of 'scanepg' and 'startscan'
tune tune to a channel or service, ie:
tune=33 (full mux) / tune=44~3 (svc id 3)
channels list channels
channel tune physical channel (unsafe - use tune instead)
service select service (unsafe - use tune instead)
stream add output file / tcp / udp / http stream, ie:
stream=udp:192.168.1.100:1234
stream=tcp:192.168.1.200:5555
stream=file:output.ts
stream (over http with no arg will begin streaming to current socket)
epg dump collected EPG data
xmltv dump collected EPG data in XMLTV format
stop stop the tuner
stopoutput stop the tuner and output
check display debug info if debug is enabled
debug enable debug
parser enable / disable the parser for data shovel
listen listen for TS on a TCP or UDP port
save save scanned channels
quit stop the server and exit