Project

General

Profile

Biss at 27.5W

Added by Philip Reynolds over 7 years ago

Hello,
does anyone know if it's possible for Tvheadend in combination with Oscam to decode the BBC mux on 11495 V, 27.5W?
Tvheadend will detect the 42 services and display the correct service names, but I've tried everything within my limited knowledge to get a picture, but had no luck.

I have the correct constcw keys, and Tvheadend will connect to this EBU card through Oscam. I can see from the 'info' part of the service that most of the stream details are missing, and it shows as not encrypted.

I've tried to edit a service entry for one service with the correct VPID's and APID's, and given a PID for decryption. The service then shows as encrypted, but stll doesn't decode- I recieve 'no access' in the log.

If anyone has managed to get this working any info would be appreciated.

Best regards,
Phil.


Replies (16)

RE: Biss at 27.5W - Added by Adam W over 6 years ago

Hi Philip,

I know this is a good few months later but:

To get BISS channels working in general I've never had any luck with linking to OSCam, but I've had them working in TVHeadend on its own.

Basically, in the newer (3.9+) versions you have to do the following things:

For each BISS service, you need to go into Configuration > DVB Inputs > Services, find the channel, click on it and then on edit, and then under "Force CA ID" enter 0x2600. Then save. You have to do this for each of the channels.

Then in the CAs menu, add a new client, select DES Constant Codeword Client, give it a name (you have to do a client for each channel), enter the provider ID (the transponder network ID (NID)), the transponder ID (the TID - you can find both of these listed for the 27.5°W 11495V transponder on KingOfSat), and then the service ID. If you enter these in decimal they automatically get converted to hex anyway.

Then finally you have to enter the key into the even and odd fields in the format shown (with colons in between each byte).

This works for other BISS channels I've tried it on, and I'd be interested to hear if it works on 27.5°W!

RE: Biss at 27.5W - Added by LubosD - over 4 years ago

The problem with 27.5W is that the PMT itself is encrypted/missing/broken. It seems to me that Tvheadend fully relies on a correct PMT and sadly I found no way of manually setting VPID/APID :-(

RE: Biss at 27.5W - Added by Adam W over 4 years ago

It does definitely work! It requires some editing of files but I have it working right now.

It's easiest with TVHeadend 4.0 (4.2+ versions compress the channel data by default which makes it hard to edit the services, but once they're edited you can update).

I'm running TVH 4.0.9. The steps to get it to work are as follows -

1. In TVH 4.0, add a new network for Intelsat 27.5W, and add a single mux to it and scan it -

Delivery System: DVB-S2 Freq: 11495000 Symbol Rate: 44100000 Polarisation: V Modulation: QPSK FEC: 9/10

Note: If you scan this mux and get no signal, it could be because your satellite tuner doesn't support the high Symbol Rate (some only support up to around 30000000). I'm using a Wetek Play box with the supplied DVB-S2 tuner and this works fine. Check you have the service names under 'services' before you continue.

2. In the file system, go to the HTS TVHeadend directory (In LibreELEC this is /storage/.kodi/userdata/addon_data/service.multimedia.tvheadend), and then go into the input > dvb > networks folder. If you have installed fresh and only have one network in your TVHeadend for 27.5W, there will just be one folder in this directory with a long random name. There will be a folder for each network you have tuned in in TVH - you need to find the 27.5W one (if you enter the directory and look in the 'config' file inside it it will tell you the details).

3. Once you've found the directory containing your 27.5W network, go into the 'muxes' folder inside it, and then there should only be one folder inside this (if you have only added the one 11495V mux). Enter this folder and then the 'services' folder inside it.

4. The files inside the 'services' folder each correspond to one of the channels on the mux (e.g. BBC One HD, ITV1 HD, BBC NEWS, etc.) You need to manually edit these files in a text editor to add the missing PID data. The PID data can be found here - http://en.kingofsat.net/tp.php?tp=1524

For example, for the file containing BBC Two HD -

{
"sid": 17472,
"lcn": 0,
"lcn_minor": 0,
"lcn2": 0,
"svcname": "BBC Two HD",
"provider": "BBC",
"dvb_servicetype": 25,
"dvb_ignore_eit": false,
"prefcapid": 0,
"prefcapid_lock": 0,
"force_caid": 0,
"created": 1445781916,
"last_seen": 1445781916,
"enabled": true,
"auto": 0,
"priority": 0,
"pcr": 0,
"pmt": 6100,
"stream": []
}

You need to add the VPID (H264), APID (AAC), and Subtitles PID in between the square brackets next to "stream": like this (for BBC Two HD) -

"stream": [ {
"pid": 6101,
"type": "H264",
"position": 0
}, {
"pid": 6102,
"type": "AAC",
"position": 0,
"language": "eng",
"audio_type": 0
}, {
"pid": 6106,
"type": "AAC",
"position": 0,
"language": "eng",
"audio_type": 3
}, {
"pid": 6105,
"type": "DVBSUB",
"position": 0,
"language": "eng",
"compositionid": 1,
"ancillartyid": 1
}]

For SD channels (BBC One, BBC One Wales, BBC NEWS, etc.), it's similar but video streams are MPEG2VIDEO and audio streams MPEG2AUDIO - e.g. (BBC Parliament):

"stream": [ {
"pid": 601,
"type": "MPEG2VIDEO",
"position": 0,
}, {
"pid": 602,
"type": "MPEG2AUDIO",
"position": 0,
"language": "eng",
"audio_type": 0
}, {
"pid": 605,
"type": "DVBSUB",
"position": 0,
"language": "eng",
"compositionid": 1,
"ancillartyid": 1
}
]

For radio channels, just add the one pid stream for 'MPEG2AUDIO'.

For the other settings in each file, you need to set the following (for all channels) -

"force_caid": 9728
"auto": 1

And then "pcr": 0 needs to be changed to the PCR PID for each service.

5. Once you've edited all the channel files, restart TVHeadend or your machine, and once restarted you should see the PIDs present with each service in the user interface.

6. Now you need to add the keys in the 'CA' section of TVHeadend. Add one for each channel as a DES keys.

CA ID: 0x2600
Provider ID: 0x1
Transponder ID: 0x1000
Service ID: Service ID of each channel - either in hex (prefixed with 0x) or decimal (just the number, e.g. 17472 for BBC Two HD)
Then the key in the even and odd keys fields.

7. Now if you map the channels, you should be able to watch them in Kodi!

RE: Biss at 27.5W - Added by LubosD - over 4 years ago

Wow, that's cool! I had actually already found the mux file, but it was just binary garbage, so I gave up...

RE: Biss at 27.5W - Added by Adam W over 4 years ago

Yes that's what they look like on newer versions of TVHeadend as the mux data is compressed. If you do it in 4.0 you can then update to 4.2 after you've changed the services as described above. :)

RE: Biss at 27.5W - Added by Petar Ivanov over 4 years ago

You can compile TVheadend with disable zlib, where will not compress data.

RE: Biss at 27.5W - Added by LubosD - over 4 years ago

Alright, so I got it working. I made a small change into Tvheadend's source so that it retains the capability to read these horrible binary & compressed configs, but always writes JSON only.

The other thing, in addition to Adam's great comment, is that the playback doesn't seem to work in the "pass" profile. I tried disabling all of the MPEG-TS options, but that didn't fix it. However, using a different profile (matroska) or streaming via HTSP (which is a different profile as well) DOES WORK!

RE: Biss at 27.5W - Added by Adam W over 4 years ago

Great news that you got it working! :)

I analyzed the signal in more detail using TS Analyzer on my computer. The PMT is present in the transport stream, but it is encrypted. It turns out that it is just encrypted with the same key as the Video and Audio Streams.

I made a dump of the Transport stream (11495V_raw.ts) and ran it through a program called TSDecryptor - this just decrypts any encrypted packet in the Transport Stream with a given key. The output file (11495V_decrypted.ts) plays as a normal transport stream with the VPIDs, APIDs, SUBs (and even MHEG-5 PIDs!) mapped correctly.

If there is a way we could get TVHeadend to apply the decryption to the PMT PIDs then we wouldn't need to manually edit the service files.

There must be some kind of bug that is stopping the "pass" profile working though, as rewrite PMT can be enabled which can surely write some correct PMT data to the services?

RE: Biss at 27.5W - Added by Joe User over 4 years ago

LubosD - wrote:

Alright, so I got it working. I made a small change into Tvheadend's source so that it retains the capability to read these horrible binary & compressed configs, but always writes JSON only.

I have been meaning to do this for awhile now, just haven;t found the time. Can you post your changes (maybe in the form of a commit?)

I have also been meaning to write a feature request for compressed config files to be optional.. guess I will do it now.

RE: Biss at 27.5W - Added by LubosD - over 4 years ago

This is really simple:

diff --git a/src/settings.c b/src/settings.c
index 3718c488f..1ae9fc43f 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -158,7 +158,7 @@ hts_settings_save(htsmsg_t *record, const char *pathfmt, ...)
   }

   /* Store data */
-#if ENABLE_ZLIB
+#if 0
   pack = strstr(path, "/muxes/") != NULL && /* ugly, redesign API */
          strstr(path, "/networks/") != NULL &&
          strstr(path, "/input/") != NULL;

I started doing improvements to Tvheadend myself (EPG view where you can nicely see what's on right now + one click TV viewing in browser), but sadly it seems nobody is handling the PRs right now.

RE: Biss at 27.5W - Added by Joe User over 4 years ago

Thanks, you are right - super simple. :)

RE: Biss at 27.5W - Added by Petar Ivanov over 4 years ago

LubosD - thanks for Pulls requests will be considered when developer of TVH back from holidays next one/two weeks and be patient.

I write one time here previous post and will write again, when compile TVH have option --disable-zlib are you try ? why need to change code, when have option ?

Regards

RE: Biss at 27.5W - Added by james ba over 4 years ago

Is the encryption part still a issue?, Trying to use biss key for 100.5E but having trouble getting it to work

RE: Biss at 27.5W - Added by Luca Olivetti almost 3 years ago

With 4.3 is impossible to edit the channels: in the muxes directory there's just one file per mux (just one in case of 27.5). Binwalk tells me that's it's gzipped data starting at 12. OK, after gunzipping it what I see is a mix of text and binary data :(

RE: Biss at 27.5W - Added by Luca Olivetti almost 3 years ago

OK, I found that now it is possible to edit the services using the rest api (there's a python script in lib/api/python/tvh-json.py, though it has to be modified for the export command to work, see https://github.com/tvheadend/tvheadend/pull/1264).
However, even after editing the services (just tried BBC One HD and BBC Two HD) with the (hopefully) correct PIDs and inserting the keys as described by Adam Wisher, I cannot view it.
I don't know if it's because it's the wrong key (the latest one I found is from 2014) or if the constcw CAs aren't used (I checked the source and it does no logging at all, so I cannot see what happens, what I see is that it reports activity on the oscam client CA, but that's because the latter has some logging instructions).
I even tried to configure the keys in oscam with no success.

RE: Biss at 27.5W - Added by Luca Olivetti almost 3 years ago

I finally managed it but not with the CA in tvheadend. I had to use oscam.
The key is definitely the correct one (since it works in oscam).
The available options for a CA in tvheadend now are

  • Code Word Client (newcamd)
  • CCcam
  • CAPMT (Linux Network DVBAPI)
  • CSA CBC Constant Code Word
  • DES NCB Constant Code Word
  • AES ECB Constant Code Word
  • AES128 ECB Constant Code Word

I used the "DES NCB Constand Code Word", maybe I should try another one?
Oh, well, with oscam it works, so problem solved.

    (1-16/16)