Avalpa Community

The place where we can talk freely about Avalpa product and services
It is currently Wed Sep 23, 2020 4:55 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Sep 26, 2013 12:07 pm 
Offline

Joined: Thu Sep 26, 2013 11:06 am
Posts: 7
Hi, Im triying to send a full list of all frequencies in all streams

First I try to add a new descriptor class with frequencies

Code:
class frequency_descriptor_loop_item(DVBobject):

    def pack(self):
   fmt = "!L"
   return pack(fmt,
       self.center_frequency,
   )

class frequency_list_descriptor(Descriptor):

    descriptor_tag = 0x62

    def bytes(self):
        frequency_list_bytes = string.join(
       map(lambda x: x.pack(),   
                self.frequency_list_descriptor_loop),
            "")                           

        FMT = "!%dsB" % len(frequency_list_bytes)
        return pack(FMT,
                    frequency_list_bytes,
                    self.coding_type
                    )


But this doesn't work

After i try this code, and probably can work with some fix (because when I try to have an automatic o manual search on frequency 306.000 Mhz, find the 5 first programs sended in first port 45500, but after continue the search trying to get the rest of channels wihtout success, and the inverse if i want in 314.000 Mhz, find the next 5 programs but can't get the 5 first)

Code:
#
# Network Information Table
#

nit = network_information_section(
   network_id = 3001,
    network_descriptor_loop = [
       network_descriptor(
          network_name = "MyNet",
       ),
    ],
   transport_stream_loop = [
       transport_stream_loop_item(
         transport_stream_id = 1,
         original_network_id = 3001,
         transport_descriptor_loop = [
            transport_stream_cable_descriptor(
               frequency = 0x03060000,
               FEC_outer = 0x0000,
               modulation = 0x03, # 64 QAM
               symbol_rate = 0x0069000,
               FEC_inner = 0x0000,
            ),
             service_list_descriptor(
               dvb_service_descriptor_loop = [
                  service_descriptor_loop_item(
                     service_ID = 2, # Ids provided by a D5 multiplexor
                     service_type = 1,
                   ),
                   service_descriptor_loop_item(
                     service_ID = 4,
                     service_type = 1,
                   ),
                  ...
               ],
             ),
             logical_channel_descriptor(
               lcn_service_descriptor_loop = [
                  lcn_service_descriptor_loop_item(
                     service_ID = tve_service_id,
                     visible_service_flag = 1, #49153,
                     logical_channel_number = 1, #tve_program_number,
                  ),
                  lcn_service_descriptor_loop_item(
                     service_ID = antena3_service_id,
                     visible_service_flag = 1,#49154,
                     logical_channel_number = 2, #antena3_program_number,
                  ),
                  ...
               ],
            ),
         ],      
      ),
      transport_stream_loop_item(
         transport_stream_id = 2,
         original_network_id = 3001,
         transport_descriptor_loop = [
            transport_stream_cable_descriptor(
               frequency = 0x03140000,
               FEC_outer = 0x0000,
               modulation = 0x03, # 64 QAM
               symbol_rate = 0x0069000,
               FEC_inner = 0x0000,
            ),
             service_list_descriptor(
               dvb_service_descriptor_loop = [
                   lcn_service_descriptor_loop_item(
                     service_ID = 2,
                     visible_service_flag = 1,
                     logical_channel_number = 1,
                  ),
                  lcn_service_descriptor_loop_item(
                     service_ID = 4,
                     visible_service_flag = 1,
                     logical_channel_number = 2,
                  ),
                  ...
               ],
             ),
            logical_channel_descriptor(
               lcn_service_descriptor_loop = [
                  lcn_service_descriptor_loop_item(
                     service_ID = 2,
                     visible_service_flag = 1,
                     logical_channel_number = 6,
                  ),
                  lcn_service_descriptor_loop_item(
                     service_ID = 4,
                     visible_service_flag = 1,
                     logical_channel_number = 7,
                  ),
                  ...
               ],
            ),
         ],      
       ),
   ],
   current_nex_indicator = 1,
    version_number = version,
    section_number = 0,
    last_section_number = 0,
)

#
# Service Description Table (ETSI EN 300 468 5.2.3)
#

sdt = service_description_section(
   transport_stream_id = 1,
   original_network_id = 3001,
        service_loop = [
          service_loop_item(
            service_ID = 2,
            EIT_schedule_flag = 1, # 0 no current even information is broadcasted, 1 broadcasted
            EIT_present_following_flag = 1, # 0 no next event information is broadcasted, 1 is broadcasted
            running_status = 4, # 4 service is running, 1 not running, 2 starts in a few seconds, 3 pausing
            free_CA_mode = 0, # 0 means service is not scrambled, 1 means at least a stream is scrambled
            service_descriptor_loop = [
                service_descriptor(
                  service_type = 1, # digital television service
                  service_provider_name = "MyNet",
                  service_name = "TVE 1",
                ),   
            ],
          ),   
          service_loop_item(
            service_ID = 4,
            EIT_schedule_flag = 1, # 0 no current even information is broadcasted, 1 broadcasted
            EIT_present_following_flag = 1, # 0 no next event information is broadcasted, 1 is broadcasted
            running_status = 4, # 4 service is running, 1 not running, 2 starts in a few seconds, 3 pausing
            free_CA_mode = 0, # 0 means service is not scrambled, 1 means at least a stream is scrambled
            service_descriptor_loop = [
                service_descriptor(
                  service_type = 1, # digital television service
                  service_provider_name = "MyNet",
                  service_name = "Antena 3",
                ),   
            ],
          ),
          ...
        ],
        current_nex_indicator = 1,
        version_number = peluche_version,
        section_number = 0,
       last_section_number = 0,
)

sdt2 = service_description_section(
   transport_stream_id = 2,
   original_network_id = 3001,
        service_loop = [   
          service_loop_item(
            service_ID = 2,
            EIT_schedule_flag = 1, # 0 no current even information is broadcasted, 1 broadcasted
            EIT_present_following_flag = 1, # 0 no next event information is broadcasted, 1 is broadcasted
            running_status = 4, # 4 service is running, 1 not running, 2 starts in a few seconds, 3 pausing
            free_CA_mode = 0, # 0 means service is not scrambled, 1 means at least a stream is scrambled
            service_descriptor_loop = [
                service_descriptor(
                  service_type = 1, # digital television service
                  service_provider_name = "MyNet",
                  service_name = "Hollywood",
                ),   
            ],
          ),   
          service_loop_item(
            service_ID = 4,
            EIT_schedule_flag = 1, # 0 no current even information is broadcasted, 1 broadcasted
            EIT_present_following_flag = 1, # 0 no next event information is broadcasted, 1 is broadcasted
            running_status = 4, # 4 service is running, 1 not running, 2 starts in a few seconds, 3 pausing
            free_CA_mode = 0, # 0 means service is not scrambled, 1 means at least a stream is scrambled
            service_descriptor_loop = [
                service_descriptor(
                  service_type = 1, # digital television service
                  service_provider_name = "MyNet",
                  service_name = "Somos",
                ),   
            ],
          ),
         ...
        ],
        current_nex_indicator = 1,
        version_number = version,
        section_number = 0,
       last_section_number = 0,
)


Where is my fail?


Top
 Profile  
 
PostPosted: Fri Sep 27, 2013 12:32 pm 
Offline

Joined: Fri Sep 27, 2013 12:25 pm
Posts: 1
Are you creating a ts file ? Can you attach it here ? When you analyze it is there the required info inside ?


Top
 Profile  
 
PostPosted: Fri Sep 27, 2013 7:26 pm 
Offline

Joined: Thu Sep 26, 2013 11:06 am
Posts: 7
I was found some news

First error is use, for the two SDT, the same service descriptor, now i use this:
Code:
sdt = service_description_section(
   transport_stream_id = 1,
   original_network_id = 3001,
        service_loop = [
          service_loop_item(
                            ...
          ),   
        ],
        current_next_indicator = 1,
        version_number = version,
        section_number = 0,
       last_section_number = 0,
)

sdt2 = service_description_other_ts_section( #this assign a different table id
   transport_stream_id = 2,
   original_network_id = 3001,
        service_loop = [
          service_loop_item(
                            ...
          ),
        ],
        current_next_indicator = 1,
        version_number = version,
        section_number = 0,
       last_section_number = 0,
)


I attach the ts from the two streams (first by port 45500 and the other by 45502)


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Tue Oct 15, 2013 7:25 pm 
Offline

Joined: Thu Sep 26, 2013 8:56 am
Posts: 2
SDT has other setion. NIT on the other hand, loops over 13 transport streams. What if someone would have 25 or 30 transport streams? Would NIT still work?


Top
 Profile  
 
PostPosted: Thu Oct 17, 2013 1:41 pm 
Offline

Joined: Sun Sep 22, 2013 10:29 am
Posts: 39
John wrote:
SDT has other setion. NIT on the other hand, loops over 13 transport streams. What if someone would have 25 or 30 transport streams? Would NIT still work?


NIT too has definition for "other" transport streams.. 25/30 freqs. in a cable network are feasible, i suppose..


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group