Feature #2043
Passthrough muxer: Improve table rewriter (SDT, NIT, BAT, EIT)
100%
Description
Would it be posible to add a sdt rewriter, that when taking out single channels from a multi program stream with http pass, removes the sdt tables for the other channels.
Currently for example when you take out a channel from a satelite feed tvheadend send the complete sdt table for that dvb mux.
Subtasks
History
Updated by Adam Sutton over 10 years ago
- Assignee deleted (
Andreas Smas)
It's certainly possible, needs investigation though. Same goes for some other common tables.
Adam
Updated by danny skjodt over 10 years ago
By the way, the reason I ask for this is that currently when you add a http mux pass channel as a iptv mux on another tvheadend server, the services tab will hold ghost services for the additianal services found, But maybe there is another way arround this ?
Updated by Jaroslav Kysela almost 10 years ago
- Subject changed from SDT rewriter to Passthough muxer: Improve table rewriter (SDT, NIT, BAT, EIT)
- Category changed from Parsers to Muxers
Updated by Jaroslav Kysela almost 10 years ago
- Subject changed from Passthough muxer: Improve table rewriter (SDT, NIT, BAT, EIT) to Passthrough muxer: Improve table rewriter (SDT, NIT, BAT, EIT)
Updated by Sam Stenvall almost 10 years ago
I have a feeling that this used to work once upon a time (only one service showed up when adding a channel or service URL), but Jaroslav said it should never have worked so I'm beginning to wonder. Anyway it would be awesome if this got fixed somehow.
Updated by danny skjodt almost 10 years ago
Sam Stenvall wrote:
I have a feeling that this used to work once upon a time (only one service showed up when adding a channel or service URL), but Jaroslav said it should never have worked so I'm beginning to wonder. Anyway it would be awesome if this got fixed somehow.
It has never worked, before the dvb rewrite around v 3.6 no sdt was passed through, so the service would show up as 1 service only but with no name.
A simple way to fix this would be to stripe away any service sid's in the sdt table thats not the service sid for the current passed channel, the sdt table is pretty simple it links sid's to channel and provider names and some other stuff like service types.
Updated by Jaroslav Kysela almost 10 years ago
danny skjodt wrote:
A simple way to fix this would be to stripe away any service sid's in the sdt table thats not the service sid for the current passed channel, the sdt table is pretty simple it links sid's to channel and provider names and some other stuff like service types.
Unfortunately, there's no simple fix. The tables are protected with CRC. So the only solution means to develop pretty complex code which:
- completes the table data
- parse the whole table
- filter data
- create new MPEG-TS bytestream for new table
The parsers can be shared with the current table processors (the code must be more abstracted), but the "encoders" must be created from scratch :-( I assume it's a work for a week or so..
Updated by danny skjodt almost 10 years ago
Jaroslav Kysela wrote:
danny skjodt wrote:
A simple way to fix this would be to stripe away any service sid's in the sdt table thats not the service sid for the current passed channel, the sdt table is pretty simple it links sid's to channel and provider names and some other stuff like service types.
Unfortunately, there's no simple fix. The tables are protected with CRC. So the only solution means to develop pretty complex code which:
- completes the table data
- parse the whole table
- filter data
- create new MPEG-TS bytestream for new tableThe parsers can be shared with the current table processors (the code must be more abstracted), but the "encoders" must be created from scratch :-( I assume it's a work for a week or so..
Damn hm well, there is another way then, the problem boils down to if you add like 100 services this way you'll have 100x~5 ghost services if cable source, and like 100x10 ghost services if satelite, and you have no way of knowing what services are ghosts and not, So under Configuration -> DVB Input -> Services, A columm with pid count ?
This is how a normal service looks like :
Index PID Type Language Details
0x0ce5 / 3301 PCR
0x0ce4 / 3300 PMT
1 0x0ce5 / 3301 MPEG2VIDEO
2 0x0ce6 / 3302
And these ghost services look like this (no pids) :
Index PID Type Language Details
None
Updated by Jaroslav Kysela over 9 years ago
- Status changed from New to Fixed
Applied in changeset commit:tvheadend|9ee27b671ba19eed5b29da9751edda555343d92b.
Updated by danny skjodt over 9 years ago
Jaroslav Kysela wrote:
Applied in changeset commit:tvheadend|9ee27b671ba19eed5b29da9751edda555343d92b.
Nice work, ive tested it, and now other channels are just empty, its not posible to remove them completely ?
Input #0, mpegts, from 'xxx':
Duration: N/A, start: 87140.035267, bitrate: 1148 kb/s
Program 903
Program 935
Program 3100
Program 3110
Program 3120
Program 3130
Metadata:
service_name : ?VFilm Classic
service_provider:
Stream #0:0[0xc3b]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 15000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0xc3c](swe): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 191 kb/s
Stream #0:2[0xc3d](nor): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 191 kb/s
Stream #0:3[0xc3e](dan): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 191 kb/s
Stream #0:4[0xc3f](fin): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 191 kb/s
Stream #0:5[0xc41](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream #0:6[0xc40](swe,nor,dan,fin): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
Program 3140
Program 3160
Program 3170
Program 3180
Program 3190
Updated by danny skjodt over 9 years ago
Jaroslav Kysela wrote:
Applied in changeset commit:tvheadend|9ee27b671ba19eed5b29da9751edda555343d92b.
Nice work, ive tested it, and now other channels are just empty, its not posible to remove them completely ?
Input #0, mpegts, from 'xxx':
Duration: N/A, start: 87140.035267, bitrate: 1148 kb/s
Program 903
Program 935
Program 3100
Program 3110
Program 3120
Program 3130
Metadata:
service_name : ?VFilm Classic
service_provider:
Stream #0:0[0xc3b]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv), 720x576 [SAR 64:45 DAR 16:9], max. 15000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0xc3c](swe): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 191 kb/s
Stream #0:2[0xc3d](nor): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 191 kb/s
Stream #0:3[0xc3e](dan): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 191 kb/s
Stream #0:4[0xc3f](fin): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 191 kb/s
Stream #0:5[0xc41](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
Stream #0:6[0xc40](swe,nor,dan,fin): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
Program 3140
Program 3160
Program 3170
Program 3180
Program 3190
After some more testing i noticed that i need to enable rewrite pat then all other services also the numbers are striped.
Updated by danny skjodt over 9 years ago
Makes sense as the PAT holds service numbers, nevermind this post
Updated by Jaroslav Kysela over 9 years ago
danny skjodt wrote:
Makes sense as the PAT holds service numbers, nevermind this post
Yep, all checkboxes should be checked (PAT, PMT, SDT, EIT) to filter out the other services completely.
Updated by danny skjodt over 9 years ago
Jaroslav Kysela wrote:
danny skjodt wrote:
Makes sense as the PAT holds service numbers, nevermind this post
Yep, all checkboxes should be checked (PAT, PMT, SDT, EIT) to filter out the other services completely.
Seems just PAT and SDT are needed, pat is a table that links program id's to pmt pid's.
So without PAT rewrite you will still get multiple services detected, but with no name only a program id.
There is something wrong tho, even with all rewriters enabled i get 2 services detected when cascading the channel onto another server.
Index PID Type Language Details
0x0c3b / 3131 PCR
0x0c3a / 3130 PMT
1 0x0c3b / 3131 MPEG2VIDEO
2 0x0c3c / 3132 MPEG2AUDIO swe
3 0x0c3d / 3133 MPEG2AUDIO nor
4 0x0c3e / 3134 MPEG2AUDIO dan
5 0x0c3f / 3135 MPEG2AUDIO fin
6 0x0c41 / 3137 AC3 eng
This is the right one, But this service with SID 9202 is also detected, and the input before rewriting has no such SID :
Index PID Type Language Details
0x11f5 / 4597 PMT
After filtering and reordering (without PCR and PMT)
Index PID Type Language Details
None
PMT rewriting by the way has a bug, if you take a channel from http from a server with PMT rewriting on, pass and matroska users cant subscribe it at the same time, if a pass clients starts first and a matroska clients starts the same after, the pass client dies at 0B/s.
Updated by Jaroslav Kysela over 9 years ago
danny skjodt wrote:
Jaroslav Kysela wrote:
danny skjodt wrote:
Makes sense as the PAT holds service numbers, nevermind this post
Yep, all checkboxes should be checked (PAT, PMT, SDT, EIT) to filter out the other services completely.
Seems just PAT and SDT are needed, pat is a table that links program id's to pmt pid's.
So without PAT rewrite you will still get multiple services detected, but with no name only a program id.
There is something wrong tho, even with all rewriters enabled i get 2 services detected when cascading the channel onto another server.
Index PID Type Language Details
0x0c3b / 3131 PCR
0x0c3a / 3130 PMT
1 0x0c3b / 3131 MPEG2VIDEO
2 0x0c3c / 3132 MPEG2AUDIO swe
3 0x0c3d / 3133 MPEG2AUDIO nor
4 0x0c3e / 3134 MPEG2AUDIO dan
5 0x0c3f / 3135 MPEG2AUDIO fin
6 0x0c41 / 3137 AC3 engThis is the right one, But this service with SID 9202 is also detected, and the input before rewriting has no such SID :
Index PID Type Language Details
0x11f5 / 4597 PMTAfter filtering and reordering (without PCR and PMT)
Index PID Type Language Details
None
Provide output from '--trace pat,sdt,pmt,bat,nit' from the tvh "client" when you stream this service from it.
PMT rewriting by the way has a bug, if you take a channel from http from a server with PMT rewriting on, pass and matroska users cant subscribe it at the same time, if a pass clients starts first and a matroska clients starts the same after, the pass client dies at 0B/s.
I can't reproduce this here. Both clients are receiving the data. Maybe an IPTV bug...
Updated by danny skjodt over 9 years ago
Jaroslav Kysela wrote:
Provide output from '--trace pat,sdt,pmt,bat,nit' from the tvh "client" when you stream this service from it.
Sure ill make one tonight.
I can't reproduce this here. Both clients are receiving the data. Maybe an IPTV bug...
Im pretty sure its an iptv bug, I can enable PMT rewriting on my satelite tvheadend server for example, and both a pass and matroska client can watch it directly from the satelite tvheadned server, but if I cascade the channel onto another server by adding it as a http iptv mux, clients on that cascaded server can not watch both pass and matroska. Its only when cascading a pmt rewritten channel onto another tvheadend server that this comes up.