Project

General

Profile

"No Descrambler" on channels with no CCI encryption.

Added by John Nevill about 12 years ago

I have an hdhomerun prime with a Comcast m-card and HD subscription. I have compiled tvheadend 3.2 from source on my Ubuntu 12.04 x64 machine and I am using xbmc on the same machine as a front end. I am able to use the hdhomerun_config_gui program to watch any channel that is in my subscription. Furthermore, I am able to watch any channel using the hdhomerun:// protocol.

tvheadend is able to grab the mux for each of Comcast's frequencies and I have added all of my services to the channel line up and mapped them over to a schedulesdirect EPG. After doing all of this I can only watch the tradition over-the-air channels through tvheadend. All other channels give the error "No Descrambler" (using xbmc as a front end).

I have queried the the hdhomerun prime box to see if there was any encryption on these channels, but they appear exactly similar to the local channels. Below is the information for AMC HD.

Tuner 0 Status
Virtual Channel    none
Frequency    559.778 MHz
Program Number    none
Authorization    none
CCI Protection    none
CGMS Protection    none
Modulation Lock    qam256
PCR Lock    locked
Signal Strength    67% (-20.3 dBmV)
Signal Quality    84% (32.8 dB)
Symbol Quality    100%
Streaming Rate    none
Resource Lock    none

Note there is no CCI Protection on this channel, but yet tvheadend thinks it needs to descramble it.

Any pointers here would be greatly appreciated.


Replies (80)

RE: "No Descrambler" on channels with no CCI encryption. - Added by John Nevill about 12 years ago

I tuned through the hdhomerun_config_gui for TLC HD and this was the tuner information from the card:

Tuner 1 Status
Virtual Channel    176 TLC HD
Frequency    715.750 MHz
Program Number    15
Authorization    subscribed
CCI Protection    unrestricted
CGMS Protection    n/a
Modulation Lock    qam256
PCR Lock    locked
Signal Strength    66% (-20.8 dBmV)
Signal Quality    77% (31.9 dB)
Symbol Quality    100%
Streaming Rate    none
Resource Lock    none

This still suggests that there is no CCI Protection for these channels (which I assume is copy-freely). What's interesting is when I attempt to tune these channels through tvheadend, it switches frequency but all of the information shows "none" when viewing the tuner (like above).

RE: "No Descrambler" on channels with no CCI encryption. - Added by Adam Sutton about 12 years ago

I think this has been discussed elsewhere, the problem is the encrypted stream bits are being set (or at least in the other discussion they were) in the DVB MPEGTS stream. So TVH believe them to be encrypted.

There seem to be a lot of problems with HDHR in TVH, mostly down to the DVB API wrappers I think. Hopefully someone with more experience will be able to shed some light.

Adam

RE: "No Descrambler" on channels with no CCI encryption. - Added by John Nevill about 12 years ago

After pulling my hair out for days and ignoring my family while my nose was buried in my laptop, I've started thinking the same thing; namely, that this is a DVB issue, probably somewhere in the dvbhdhomerun jungle. I've only been messing around with this since Wednesday of last week, and I'm finally now getting to the point where I know what I don't know. Unfortunately, dvb falls squarely in that category. Since I don't have a premium package with Comcast, encryption shouldn't really be a concern. Surely there is somewhere in there I can hard code that out.

RE: "No Descrambler" on channels with no CCI encryption. - Added by Villy Thomsen about 12 years ago

Hi John,

I'm the guy behind the dvbhdhomerun jungle (great name btw :-) ). Perhaps we should use this thread to gather the information we have. I see you've found this thread on SiliconDusts forum:

http://www.silicondust.com/forum/viewtopic.php?t=12653

Which I completely had forgotten about - your last post revived it for me. The general problem is as quoted by jasonl from Silicondust:

"The standard digital tuner functionality of tuning by frequency and setting a PID filter doesn't work with a CableCARD tuner because the card needs to be told what channel to decrypt. I have no idea if there's any sort of virtual channel tuning interface in the Linux kernel that could be tied to the vchannel on the HDHomeRun PRIME;"

So, in linux land you get a frequency to tune to a MUX, from say tvheadend - all is good there. But, then you get a PID (Program ID) to select between the various channels on the MUX, which apparently don't work for a CableCard tuner.

The user Phmt (from same thread above) seems to be able to tune to a Program/virtual channel (not a "Program ID") via the hdhomerun_config tool. So I'm thinking is there an obvious link between a "Program/virtual channel" and the PID that we can get from the linux DVB subsystem.

Let's get some data. Try running your:

hdhomerun_config <deviceid> scan 0 scan.txt

Pick a frequency/MUX that has some channels - tune to that frequency via the hdhomerun_config_gui, you need to pick the first tuner to match the below. Dump the output in the thread here.

Now go to your linux box:

sudo apt-get install dvb-apps
sudo dvbtraffic

That prints out the entire list of PID's on that MUX. Dump that output here too, let's see if we can find a correlation.

I'm thinking we just have to "teach" the dvbhdhomerun a connection between those two - and then let it select a (virtual) channel instead of a PID when we are dealing with a HDHomeRun Prime.

RE: "No Descrambler" on channels with no CCI encryption. - Added by Villy Thomsen about 12 years ago

Also, try do a:

sudo apt-get install dvbsnoop
sudo dvbsnoop -n 1 0x00

After dvbtraffic above. That lists all the (virtual) programs on the MUX. Just curios if/how that matches up against the output from the scan from the hdhomerun_config scanning.

RE: "No Descrambler" on channels with no CCI encryption. - Added by John Nevill about 12 years ago

It's a jungle to me!

I jumped into hdhomerun_config_gui and tuned to comcast channel 171, which is physical channel qam256:319750000, MUXID 39522 (autodiscovered by tvheadend), hdhomerun_config_gui channel us-hrc 40, virtual program 20 (0014 hex). Unfortunately dvbtraffic "could not open dvr device"

From my scan.txt:

[johnryan-desktop2:~]$ cat scan0.txt | grep 319750000 -A 6
SCANNING: 319750000 (us-hrc:40)
LOCK: qam256 (ss=78 snq=100 seq=100)
TSID: 0x82F2
PROGRAM 19: 199 Golf HD (encrypted)
PROGRAM 20: 171 AMC HD (encrypted)
PROGRAM 21: 216 CNN HD (encrypted)
SCANNING: 313750000 (us-hrc:39)

From dvbsnoop:

dvbsnoop V1.4.50 -- http://dvbsnoop.sourceforge.net/

------------------------------------------------------------
SECT-Packet: 00000001   PID: 0 (0x0000), Length: 24 (0x0018)
Time received: Tue 2012-10-30  18:39:37.366
------------------------------------------------------------
  0000:  00 b0 15 82 f2 ff 00 00  00 15 e0 30 00 14 e0 31   ...........0...1
  0010:  00 13 e0 32 9c e4 5b 0c                            ...2..[.

PID:  0 (0x0000)  [= assigned for: ISO 13818-1 Program Association Table (PAT)]

Guess table from table id...
PAT-decoding....
Table_ID: 0 (0x00)  [= Program Association Table (PAT)]
section_syntax_indicator: 1 (0x01)
(fixed): 0 (0x00)
reserved_1: 3 (0x03)
Section_length: 21 (0x0015)
Transport_Stream_ID: 33522 (0x82f2)
reserved_2: 3 (0x03)
Version_number: 31 (0x1f)
current_next_indicator: 1 (0x01)  [= valid now]
Section_number: 0 (0x00)
Last_Section_number: 0 (0x00)

    Program_number: 21 (0x0015)
    reserved: 7 (0x07)
    Program_map_PID: 48 (0x0030)

    Program_number: 20 (0x0014)
    reserved: 7 (0x07)
    Program_map_PID: 49 (0x0031)

    Program_number: 19 (0x0013)
    reserved: 7 (0x07)
    Program_map_PID: 50 (0x0032)

CRC: 2632211212 (0x9ce45b0c)
==========================================================

FROM HDHOMERUN PRIME WEBUI:

Tuner 0 Status
Virtual Channel    none
Frequency    319.750 MHz
Program Number    none
Authorization    none
CCI Protection    none
CGMS Protection    none
Modulation Lock    qam256
PCR Lock    locked
Signal Strength    71% (-17.6 dBmV)
Signal Quality    96% (34.5 dB)
Symbol Quality    100%
Streaming Rate    19.782 Mbps
Resource Lock    none

FROM femon -H -a 0 -c 5

FE: HDHomeRun ATSC (ATSC)
status SCVYL | signal  70% | snr   0% | ber 0 | unc 0 | FE_HAS_LOCK
status S     | signal   0% | snr   0% | ber 0 | unc 0 |
status SCVYL | signal  70% | snr   0% | ber 0 | unc 0 | FE_HAS_LOCK
status S     | signal   0% | snr   0% | ber 0 | unc 0 |
status SCVYL | signal  70% | snr   0% | ber 0 | unc 0 | FE_HAS_LOCK

FROM sudo dvbtraffic

 dvbtraffic
dvbtraffic: Could not open dvr device: No such file or directory

Thanks for the interest in this. I had mixed feelings about putting down the money for a hdhomerun prime only to run into some massive limitations, but I've been having so much fun learning about this stuff and getting everything working that it makes up for it!

RE: "No Descrambler" on channels with no CCI encryption. - Added by John Nevill about 12 years ago

Lastly, I had only selected the channel in hdhomerun_config, but didn't "View" it. The webgui shows everything working happily when I view it from the hdhomerun_config_gui. Here are all the stats with AMC (171) playing in VLC.

hdhomerun webgui:

Tuner 0 Status
Virtual Channel    171 AMC HD
Frequency    319.750 MHz
Program Number    20
Authorization    subscribed
CCI Protection    unrestricted
CGMS Protection    n/a
Modulation Lock    qam256
PCR Lock    locked
Signal Strength    71% (-17.9 dBmV)
Signal Quality    95% (34.3 dB)
Symbol Quality    100%
Streaming Rate    14.476 Mbps
Resource Lock    none

[johnryan-desktop2:~]$ femon -H -a 0 -c 5
FE: HDHomeRun ATSC (ATSC)
status SCVYL | signal   0% | snr   0% | ber 0 | unc 0 | FE_HAS_LOCK
status SCVYL | signal  70% | snr   0% | ber 0 | unc 0 | FE_HAS_LOCK
status S     | signal   0% | snr   0% | ber 0 | unc 0 |
status SCVYL | signal  70% | snr   0% | ber 0 | unc 0 | FE_HAS_LOCK
status S     | signal   0% | snr   0% | ber 0 | unc 0 |

dvbsnoop -n 1 0x00 doesn't run and I have to exit out ctrl+c

dvbtraffic returns the same as above

RE: "No Descrambler" on channels with no CCI encryption. - Added by Jeremy Keeney about 12 years ago

If you guys need any data as well, let me know? I am a Prime user as well.

RE: "No Descrambler" on channels with no CCI encryption. - Added by Villy Thomsen about 12 years ago

hi again,

Ok, looking good. I would like to get some output from dvbtraffic, but that error is weird. Did you stop tvheadend before trying? (I probably forgot to mention you should do that) try that again if you didn't stop tvheadend before.

Also try doing a:

sudo dvbsnoop -n 1 0x0031

After doing the first dvbsnoop to 0x00. "0x0031", you can find in the above as the "Program_map_PID" for virtual Program 20. That should show us the mapping from the PID's the linux kernel provides to the program number we need. It should list the Video/Audio/Text streams that is part of that program 20.

So my current thinking is that we need to produce a small mapping file via something like the above (should be easily scriptable) that userhdhomerun can read, so that when the linux channel tells us to switch to PID xxx, we can map it to a Program number instead - and then tune to that. The above data I've requested is just to make sure that it is possible to do that mapping.

Also I need to dig a bit in the linux DVB subsystem code to see if we can get the Program directly - but I doubt that is possible.

RE: "No Descrambler" on channels with no CCI encryption. - Added by John Nevill about 12 years ago

I've dumped the output from dvbtraffic here

For whatever reason dvbsnoop just sits and spins. I'll keep monkeying with it and see if I can get it to produce again.

RE: "No Descrambler" on channels with no CCI encryption. - Added by John Nevill about 12 years ago

I lack patience, I suppose. dvbsnoop -n 1 0x0031 returned the following:


------------------------------------------------------------
SECT-Packet: 00000001   PID: 49 (0x0031), Length: 38 (0x0026)
Time received: Wed 2012-10-31  19:51:47.805
------------------------------------------------------------
  0000:  02 b0 23 00 05 f3 00 00  ef 2f f0 06 09 04 47 49   ..#....../....GI
  0010:  e1 01 80 ef 2f f0 00 81  ef 30 f0 06 0a 04 65 6e   ..../....0....en
  0020:  67 00 1c d5 01 50                                  g....P

PID:  49 (0x0031)

Guess table from table id...
PMT-decoding....
Table_ID: 2 (0x02)  [= Program Map Table (PMT)]
section_syntax_indicator: 1 (0x01)
(fixed '0'): 0 (0x00)
reserved_1: 3 (0x03)
Section_length: 35 (0x0023)
Program_number: 5 (0x0005)
reserved_2: 3 (0x03)
Version_number: 25 (0x19)
current_next_indicator: 1 (0x01)  [= valid now]
Section_number: 0 (0x00)
Last_Section_number: 0 (0x00)
reserved_3: 7 (0x07)
PCR PID: 3887 (0x0f2f)
reserved_4: 15 (0x0f)
Program_info_length: 6 (0x0006)

        MPEG-DescriptorTag: 9 (0x09)  [= CA_descriptor]
        descriptor_length: 4 (0x04)
        CA_system_ID: 18249 (0x4749)  [= General Instrument]
        reserved: 7 (0x07)
        CA_PID: 257 (0x0101)

Stream_type loop:

    Stream_type: 128 (0x80)  [= User private]
    reserved_1: 7 (0x07)
    Elementary_PID: 3887 (0x0f2f)
    reserved_2: 15 (0x0f)
    ES_info_length: 0 (0x0000)

    Stream_type: 129 (0x81)  [= User private]
    reserved_1: 7 (0x07)
    Elementary_PID: 3888 (0x0f30)
    reserved_2: 15 (0x0f)
    ES_info_length: 6 (0x0006)

            MPEG-DescriptorTag: 10 (0x0a)  [= ISO_639_language_descriptor]
            descriptor_length: 4 (0x04)
               ISO639_language_code:  eng
               Audio_type: 0 (0x00)  [= undefined]

CRC: 483721552 (0x1cd50150)
==========================================================

RE: "No Descrambler" on channels with no CCI encryption. - Added by John Nevill about 12 years ago

Something seemed like it was missing from that last dvbsnoop so I ran it again. The output here looks better (I think)

dvbsnoop V1.4.50 -- http://dvbsnoop.sourceforge.net/

------------------------------------------------------------
SECT-Packet: 00000001   PID: 49 (0x0031), Length: 52 (0x0034)
Time received: Wed 2012-10-31  20:01:28.157
------------------------------------------------------------
  0000:  02 b0 31 00 09 ed 00 00  ee ce f0 06 09 04 47 49   ..1...........GI
  0010:  e1 01 80 ee ce f0 03 83  01 00 81 ee cf f0 06 0a   ................
  0020:  04 65 6e 67 00 81 ee d0  f0 06 0a 04 73 70 61 00   .eng........spa.
  0030:  8e e6 56 79                                        ..Vy

PID:  49 (0x0031)

Guess table from table id...
PMT-decoding....
Table_ID: 2 (0x02)  [= Program Map Table (PMT)]
section_syntax_indicator: 1 (0x01)
(fixed '0'): 0 (0x00)
reserved_1: 3 (0x03)
Section_length: 49 (0x0031)
Program_number: 9 (0x0009)
reserved_2: 3 (0x03)
Version_number: 22 (0x16)
current_next_indicator: 1 (0x01)  [= valid now]
Section_number: 0 (0x00)
Last_Section_number: 0 (0x00)
reserved_3: 7 (0x07)
PCR PID: 3790 (0x0ece)
reserved_4: 15 (0x0f)
Program_info_length: 6 (0x0006)

        MPEG-DescriptorTag: 9 (0x09)  [= CA_descriptor]
        descriptor_length: 4 (0x04)
        CA_system_ID: 18249 (0x4749)  [= General Instrument]
        reserved: 7 (0x07)
        CA_PID: 257 (0x0101)

Stream_type loop:

    Stream_type: 128 (0x80)  [= User private]
    reserved_1: 7 (0x07)
    Elementary_PID: 3790 (0x0ece)
    reserved_2: 15 (0x0f)
    ES_info_length: 3 (0x0003)

            DVB-DescriptorTag: 131 (0x83)  [= User defined/ATSC reserved]
            descriptor_length: 1 (0x01)
            Descriptor-data:
                 0000:  00                                                 .

    Stream_type: 129 (0x81)  [= User private]
    reserved_1: 7 (0x07)
    Elementary_PID: 3791 (0x0ecf)
    reserved_2: 15 (0x0f)
    ES_info_length: 6 (0x0006)

            MPEG-DescriptorTag: 10 (0x0a)  [= ISO_639_language_descriptor]
            descriptor_length: 4 (0x04)
               ISO639_language_code:  eng
               Audio_type: 0 (0x00)  [= undefined]

    Stream_type: 129 (0x81)  [= User private]
    reserved_1: 7 (0x07)
    Elementary_PID: 3792 (0x0ed0)
    reserved_2: 15 (0x0f)
    ES_info_length: 6 (0x0006)

            MPEG-DescriptorTag: 10 (0x0a)  [= ISO_639_language_descriptor]
            descriptor_length: 4 (0x04)
               ISO639_language_code:  spa
               Audio_type: 0 (0x00)  [= undefined]

CRC: 2397460089 (0x8ee65679)
==========================================================

Then again, perhaps not. That last bit may just be for the second audio programming that was sent with whatever show is on AMC right now. My wife accidently turned on SAP the other day and couldn't figure out why all the shows were coming through in spanish. Now it's tricking me too.

RE: "No Descrambler" on channels with no CCI encryption. - Added by Villy Thomsen about 12 years ago

Hi John,

I think you did the last dvbsnoop was on another frequency than what we started out with (and hence the 0x0031 didn't fit). If you look at the output from dvbtraffic you posted, you'll see 0x031 is not there (but 0x038 + 39 etc is). That number (probably) changes for each mux, try again:

sudo dvbsnoop -n 1 0x00

Gives you something like:

Program_number: 20 (0x0014)
reserved: 7 (0x07)
Program_map_PID: 49 (0x0031)

Pick one of those Program_map_PID, here 0x0031 and do a dvbsnoop on that:

sudo dvbsnoop -n 1 0x0031

Let's see the output of that. And if you can do a dvbtraffic too that would be perfect. You don't need to let dvbtraffic run, just pick one of the sections and post it (20-30 lines or so, ending with PID 0x1fff ish).

RE: "No Descrambler" on channels with no CCI encryption. - Added by Villy Thomsen about 12 years ago

Oh, and remember to stop tvheadend before doing any of the above - tvheadend continously tunes to different frequencies, so that will screw up the above test.

RE: "No Descrambler" on channels with no CCI encryption. - Added by John Nevill about 12 years ago

Got it.

Tuned to AMC:

dvbsnoop V1.4.50 -- http://dvbsnoop.sourceforge.net/

------------------------------------------------------------
SECT-Packet: 00000001   PID: 0 (0x0000), Length: 24 (0x0018)
Time received: Thu 2012-11-01  13:31:25.961
------------------------------------------------------------
  0000:  00 b0 15 00 00 ff 00 00  00 14 e0 36 00 13 e0 37   ...........6...7
  0010:  00 15 e0 38 df e7 40 1b                            ...8..@.

PID:  0 (0x0000)  [= assigned for: ISO 13818-1 Program Association Table (PAT)]

Guess table from table id...
PAT-decoding....
Table_ID: 0 (0x00)  [= Program Association Table (PAT)]
section_syntax_indicator: 1 (0x01)
(fixed): 0 (0x00)
reserved_1: 3 (0x03)
Section_length: 21 (0x0015)
Transport_Stream_ID: 0 (0x0000)
reserved_2: 3 (0x03)
Version_number: 31 (0x1f)
current_next_indicator: 1 (0x01)  [= valid now]
Section_number: 0 (0x00)
Last_Section_number: 0 (0x00)

    Program_number: 20 (0x0014)
    reserved: 7 (0x07)
    Program_map_PID: 54 (0x0036)

    Program_number: 19 (0x0013)
    reserved: 7 (0x07)
    Program_map_PID: 55 (0x0037)

    Program_number: 21 (0x0015)
    reserved: 7 (0x07)
    Program_map_PID: 56 (0x0038)

CRC: 3756474395 (0xdfe7401b)
==========================================================

[johnryan-desktop2:~]$ dvbsnoop -n 1 0x0036
dvbsnoop V1.4.50 -- http://dvbsnoop.sourceforge.net/

------------------------------------------------------------
SECT-Packet: 00000001   PID: 54 (0x0036), Length: 87 (0x0057)
Time received: Thu 2012-11-01  13:31:36.970
------------------------------------------------------------
  0000:  02 b0 54 00 14 c5 00 00  ee a2 f0 0c 09 04 47 49   ..T...........GI
  0010:  e1 06 05 04 43 55 45 49  02 ee a2 f0 00 81 ee a3   ....CUEI........
  0020:  f0 06 0a 04 65 6e 67 00  81 ee a4 f0 06 0a 04 73   ....eng........s
  0030:  70 61 00 86 ee a5 f0 00  c0 ee a6 f0 09 a2 01 00   pa..............
  0040:  05 04 45 54 56 31 c0 ee  a7 f0 08 a1 00 05 04 45   ..ETV1.........E
  0050:  54 56 31 34 34 d1 bc                               TV144..

PID:  54 (0x0036)

Guess table from table id...
PMT-decoding....
Table_ID: 2 (0x02)  [= Program Map Table (PMT)]
section_syntax_indicator: 1 (0x01)
(fixed '0'): 0 (0x00)
reserved_1: 3 (0x03)
Section_length: 84 (0x0054)
Program_number: 20 (0x0014)
reserved_2: 3 (0x03)
Version_number: 2 (0x02)
current_next_indicator: 1 (0x01)  [= valid now]
Section_number: 0 (0x00)
Last_Section_number: 0 (0x00)
reserved_3: 7 (0x07)
PCR PID: 3746 (0x0ea2)
reserved_4: 15 (0x0f)
Program_info_length: 12 (0x000c)

        MPEG-DescriptorTag: 9 (0x09)  [= CA_descriptor]
        descriptor_length: 4 (0x04)
        CA_system_ID: 18249 (0x4749)  [= General Instrument]
        reserved: 7 (0x07)
        CA_PID: 262 (0x0106)

        MPEG-DescriptorTag: 5 (0x05)  [= registration_descriptor]
        descriptor_length: 4 (0x04)
        format_identifier: 1129661769 (0x43554549)  [= see: SC29]
            CUEI

Stream_type loop:

    Stream_type: 2 (0x02)  [= ITU-T Rec. H.262 | ISO/IEC 13818-2 Video | ISO/IEC 11172-2 constr. parameter video stream]
    reserved_1: 7 (0x07)
    Elementary_PID: 3746 (0x0ea2)
    reserved_2: 15 (0x0f)
    ES_info_length: 0 (0x0000)

    Stream_type: 129 (0x81)  [= User private]
    reserved_1: 7 (0x07)
    Elementary_PID: 3747 (0x0ea3)
    reserved_2: 15 (0x0f)
    ES_info_length: 6 (0x0006)

            MPEG-DescriptorTag: 10 (0x0a)  [= ISO_639_language_descriptor]
            descriptor_length: 4 (0x04)
               ISO639_language_code:  eng
               Audio_type: 0 (0x00)  [= undefined]

    Stream_type: 129 (0x81)  [= User private]
    reserved_1: 7 (0x07)
    Elementary_PID: 3748 (0x0ea4)
    reserved_2: 15 (0x0f)
    ES_info_length: 6 (0x0006)

            MPEG-DescriptorTag: 10 (0x0a)  [= ISO_639_language_descriptor]
            descriptor_length: 4 (0x04)
               ISO639_language_code:  spa
               Audio_type: 0 (0x00)  [= undefined]

    Stream_type: 134 (0x86)  [= User private]
    reserved_1: 7 (0x07)
    Elementary_PID: 3749 (0x0ea5)
    reserved_2: 15 (0x0f)
    ES_info_length: 0 (0x0000)

    Stream_type: 192 (0xc0)  [= User private]
    reserved_1: 7 (0x07)
    Elementary_PID: 3750 (0x0ea6)
    reserved_2: 15 (0x0f)
    ES_info_length: 9 (0x0009)

            DVB-DescriptorTag: 162 (0xa2)  [= User defined/ATSC reserved]
            descriptor_length: 1 (0x01)
            Descriptor-data:
                 0000:  00                                                 .

            MPEG-DescriptorTag: 5 (0x05)  [= registration_descriptor]
            descriptor_length: 4 (0x04)
            format_identifier: 1163154993 (0x45545631)  [= see: SC29]
               ETV1

    Stream_type: 192 (0xc0)  [= User private]
    reserved_1: 7 (0x07)
    Elementary_PID: 3751 (0x0ea7)
    reserved_2: 15 (0x0f)
    ES_info_length: 8 (0x0008)

            DVB-DescriptorTag: 161 (0xa1)  [= User defined/ATSC reserved]
            descriptor_length: 0 (0x00)

            MPEG-DescriptorTag: 5 (0x05)  [= registration_descriptor]
            descriptor_length: 4 (0x04)
            format_identifier: 1163154993 (0x45545631)  [= see: SC29]
               ETV1

CRC: 875876796 (0x3434d1bc)
==========================================================

and dvbtraffic:

-PID--FREQ-----BANDWIDTH-BANDWIDTH-
0000     8 p/s     1 kb/s    12 kbit
0001     0 p/s     0 kb/s     1 kbit
0036     8 p/s     1 kb/s    12 kbit
0037    15 p/s     2 kb/s    23 kbit
0038     7 p/s     1 kb/s    11 kbit
0106     8 p/s     1 kb/s    12 kbit
0107     8 p/s     1 kb/s    12 kbit
0108     7 p/s     1 kb/s    11 kbit
0ea2  7060 p/s  1296 kb/s 10618 kbit
0ea3   271 p/s    49 kb/s   408 kbit
0ea4    79 p/s    14 kb/s   119 kbit
0ea8 10021 p/s  1839 kb/s 15071 kbit
0ea9   312 p/s    57 kb/s   470 kbit
0ead  7683 p/s  1410 kb/s 11555 kbit
0eae   271 p/s    49 kb/s   408 kbit
1ff0    17 p/s     3 kb/s    26 kbit
1ffc    10 p/s     1 kb/s    15 kbit
1fff    52 p/s     9 kb/s    78 kbit
2000 25848 p/s  4745 kb/s 38876 kbit

RE: "No Descrambler" on channels with no CCI encryption. - Added by Villy Thomsen about 12 years ago

Alrighty. It does look like we have all the infomation in there to do a mapping from PID<->Program. I'll need to ponder a little over the weekend on how to do it best/smartest.

But, for starters I think I'll see if I can make a little hack for you to try out in userhdhomerun, so It'll tune to the above channel the same way the hdhomerun_config tool does and see if you can record that with tvheadend and play it back afterwards.

RE: "No Descrambler" on channels with no CCI encryption. - Added by Jim Ancona about 12 years ago

If you post a patch here, I'll be happy to build it and test it too.

RE: "No Descrambler" on channels with no CCI encryption. - Added by John Nevill about 12 years ago

That's awesome news. I really appreciate you looking into this. It will make for some happy comcast customers in the future.

I'm trying to read up on DVB and ATSC, it's interesting stuff. Any idea what all the bandwidth is at 0x0ea8 and 0x0ead. If I'm understanding this correctly the video is sent on 0x0ea2 and english audio on 0x0ea3, but I don't see 0ea8 and 0ead listed in the dvbsnoop for this tuning and yet dvbtraffic shows quite a bit of movement there.

RE: "No Descrambler" on channels with no CCI encryption. - Added by Villy Thomsen about 12 years ago

0x0ea8 and 0x0ead is likely the video from two different programs. If you return to the output from dvbsnoop of 0x00 you see:

Program_number: 20 (0x0014)
reserved: 7 (0x07)
Program_map_PID: 54 (0x0036)
Program_number: 19 (0x0013)
reserved: 7 (0x07)
Program_map_PID: 55 (0x0037)
Program_number: 21 (0x0015)
reserved: 7 (0x07)
Program_map_PID: 56 (0x0038)

Try doing a dvbsnoop on 0x0037 and 0x0038 and see what you find... ;-)

Generally looking at the output from dvbtraffic you'll have those big ones that are video, and below them audio+teletext for the same video.

RE: "No Descrambler" on channels with no CCI encryption. - Added by John Nevill about 12 years ago

OK. So just to clarify, I ran dvbsnoop for 0x0036, which was sharing a frequency with two other channels. When I ran dvbtraffic it showed the bump at 0x0ea2 (video) and 0ea3, 0ea4 (audio for two languages). The other two bumps were video for the other channels sharing the frequency and also two minor bumps for audio for those two channels.

Can I assume then that the reason there are only, at most, like... 5 or 6 channels on a single frequency is because there are only so many PIDs? Also, if I'm understanding ATSC correctly, there is already a PID tied up the Program Map Table.

RE: "No Descrambler" on channels with no CCI encryption. - Added by Villy Thomsen about 12 years ago

Hi John,

Well, the rigth way to think about it to forget everything you know about analog TV. :-) Tuning to a frequency and that being = one channel/program, NOT true anymore.

In DVB-C/ATSC etc, you tune to a frequency. That frequency contains a MUX/multiplex of a number of programs/channels.

Each program consists of a couple of elementary Program ID's (PID's). As you've seen, one PID could be a video stream another audio stream, teletext, electronic program guide and so forth.

dvbtraffic lists the elementary PID's the MUX contains.
dvbsnoop -n1 0x00 lists the Program Associations Table (PAT), which basically lists all the programs the MUX contains. (and a "program" is just a collection of PID's).

A MUX is limited only by bandwidth. 0x2000 in dvbtraffic output list the combined bandwith of your mux, about 40 Mbit/sec in your case. The amount of PID's is only limited by that. So if you want HD channels on your MUX, and they each take 10 Mbit/sec, well you can only have 4. ;)

I have muxes here in DVB-C land with 12 to 13 channels which is probably around the max I'll guess (none of them being HD channels).

RE: "No Descrambler" on channels with no CCI encryption. - Added by Jim Ancona about 12 years ago

John,
I was reading up on PID's too. In addition to Villy's explanations, I found the Wikipedia article here [[http://en.wikipedia.org/wiki/MPEG_transport_stream#PID]] to be helpful.

RE: "No Descrambler" on channels with no CCI encryption. - Added by John Nevill about 12 years ago

Thanks Villy, that's very helpful! A frequency = mux. A mux has programs, and programs have PID's.

I see in tvheadend-land when I look at programs in each transport I see "streams", and these streams show the PID, Type (MPEG2VIDEO, AC3), position, and for the AC3 type streams, a language. All of which looks like what I saw in the dvbsnoops.

Would it be possible (and maybe this is a question for Adam) to change the PID in these files to the actual PID we've discovered? Or do you think that these virtual program maps may change?

RE: "No Descrambler" on channels with no CCI encryption. - Added by Villy Thomsen about 12 years ago

Anyway, for at little hack to try out if tvheadend can record your channels, try the following:

locate dvbhdhomerun/userhdhomerun/hdhomerun_tuner.cpp

find:

int ret = hdhomerun_device_set_tuner_filter(m_device, StrPidFilter.c_str());

Replace with:

int ret = hdhomerun_device_set_tuner_program(m_device, "1170");

Also find:

is << "auto:" << _freq;

Replace with:

is << "auto:" << 514000000;

Obviously replace the frequency with one of yours combined with a program number being on that frequency. Program number you get from this output, or from dvbsnoop -n1 0x00, or from the hdhomerun_config_gui (program number being the first number on a channel there):

Tuner 1 Status
Virtual Channel 176 TLC HD
Frequency 715.750 MHz
Program Number 15

715.750 MHz => 715750000.

For building:

sudo apt-get install cmake g++ (libraries/tools needed to compile the below)
cd $SRC/userhdhomerun
make

Steps to run:

  1. Stop tvheadend. Check with "ps aux | grep tvh" that it is not running. # Stop dvbhdhomerun. "sudo service dvbhdhomerun-utils stop", "ps aux | grep userh" to check it is stopped. # Run it. "sudo make run" from directory where you build and leave it in prompt. # Start tvheadend again. # Goto "DVR -> Recorder Schedule -> Add entry" and add a recording for your selected channel. Leave it for a couple minutes. Stop the record. # Now, can you play back that recording in say VLC?

The above reproduces what the user phmt did in this link http://www.silicondust.com/forum/viewtopic.php?t=12653 where he was able to stream to a VLC player. The above just uses tvheadend to save the stream to disk instead using the same function calls.

Notice, tvheadend can get a little, eh, upset with the above hack, since every time it tunes to a different frequency it ends up the same place... Also, running hdhomerun_config_gui simultanous seems to crash userhdhomerun from time to time - so don't run that while testing the above.

RE: "No Descrambler" on channels with no CCI encryption. - Added by Villy Thomsen about 12 years ago

Oh, I should probably point out that the above is just a hack that forces one frequency and one program to constantly be set no matter what tvheadend does. So obviously only that channel can be recorded.

The final fix is a more complex thingy, the above is just proof of concept that we can get tvheadend to record a copy-freely channel from a HDHomerun Prime.

(1-25/80)