Closed malakudi closed 3 years ago
Use -s -c -t -vvv when start Mumudvb
Above attached log was with -vvv. -s shows signal, signal is ok. -t doesn't add anything important to the above log, but ok, here it is with the options asked. I run it for about 30 seconds, then press Ctl-c. debug.log
Signal is ok, this has nothing to do with signal. I also tried from different location where signal is even stronger
dvb-fe-tool -a 5 -m
Lock (0x1f) Signal= -24.00dBm C/N= 39.00dB UCB= 0 postBER= 0
Layer A: C/N= 78.08%
Lock (0x1f) Signal= -24.00dBm C/N= 40.25dB UCB= 0 postBER= 0
Layer A: C/N= 80.58%
Lock (0x1f) Signal= -24.00dBm C/N= 39.75dB UCB= 0 postBER= 0
Layer A: C/N= 79.58%
40db C/N is very strong signal I attach debug log from new location debug.log
I also attach PMTs as decoded by dvblastctl (dvblast works fine in this frequency by only providing sid)
new PMT program=400 version=7 pcrpid=1450
* ES pid=1450 streamtype=0x1b streamtype_txt="H.264/14496-10 video (MPEG-4/AVC)"
- desc 28 avc_video profile_idc=0x4d constraint_set0_flag=0 constraint_set1_flag=1 constraint_set2_flag=0 AVC_compatible_flags=0x00 level_idc=0x1e AVC_still_present=0 AVC_24_hour_picture_flag=0
* ES pid=1451 streamtype=0x03 streamtype_txt="11172-3 audio (MPEG-1)"
- desc 03 audio_stream free_format_tag=0 ID=1 layer=2 ID_txt="MPEG Audio" layer_txt="Layer II" vbr_audio_flag=0
- desc 0a audio_language language=gre audiotype=0 audiotype_txt="undefined"
end PMT
new PMT program=600 version=29 pcrpid=1650
* ES pid=1650 streamtype=0x1b streamtype_txt="H.264/14496-10 video (MPEG-4/AVC)"
- desc 28 avc_video profile_idc=0x4d constraint_set0_flag=0 constraint_set1_flag=1 constraint_set2_flag=0 AVC_compatible_flags=0x00 level_idc=0x1e AVC_still_present=0 AVC_24_hour_picture_flag=0
* ES pid=1651 streamtype=0x03 streamtype_txt="11172-3 audio (MPEG-1)"
- desc 03 audio_stream free_format_tag=0 ID=1 layer=2 ID_txt="MPEG Audio" layer_txt="Layer II" vbr_audio_flag=0
- desc 0a audio_language language=gre audiotype=0 audiotype_txt="undefined"
* ES pid=1653 streamtype=0x06 streamtype_txt="13818-1 PES private data"
- desc 59 subtitling language=gre type=0x10 composition=2 ancillary=1
* ES pid=1655 streamtype=0x05 streamtype_txt="13818-1 private sections"
- desc 6f unknown length=3 value=8010e0
* ES pid=1656 streamtype=0x0b streamtype_txt="13818-6 type B"
- desc 66 data_broadcast broadcast_id=0x0123 selector_byte="0010" selector_byte_txt=".."
- desc 13 unknown length=5 value=0000005300
- desc 52 stream_identifier component_tag=83
end PMT
new PMT program=700 version=13 pcrpid=1750
* ES pid=1750 streamtype=0x1b streamtype_txt="H.264/14496-10 video (MPEG-4/AVC)"
- desc 28 avc_video profile_idc=0x4d constraint_set0_flag=0 constraint_set1_flag=1 constraint_set2_flag=0 AVC_compatible_flags=0x00 level_idc=0x1e AVC_still_present=0 AVC_24_hour_picture_flag=0
* ES pid=1751 streamtype=0x03 streamtype_txt="11172-3 audio (MPEG-1)"
- desc 03 audio_stream free_format_tag=0 ID=1 layer=2 ID_txt="MPEG Audio" layer_txt="Layer II" vbr_audio_flag=0
- desc 0a audio_language language=gre audiotype=0 audiotype_txt="undefined"
* ES pid=1752 streamtype=0x06 streamtype_txt="13818-1 PES private data"
- desc 56 telx language=GRE type=0x1 type_txt="Initial teletext page" mag=1 page=0x0
- desc 45 vbi_data service_id=0x01 length=32 service_txt="EBU teletext"
- vbi_data field_parity=0 line_offset=7
- vbi_data field_parity=0 line_offset=8
- vbi_data field_parity=0 line_offset=9
- vbi_data field_parity=0 line_offset=10
- vbi_data field_parity=0 line_offset=11
- vbi_data field_parity=0 line_offset=12
- vbi_data field_parity=0 line_offset=13
- vbi_data field_parity=0 line_offset=14
- vbi_data field_parity=0 line_offset=15
- vbi_data field_parity=0 line_offset=16
- vbi_data field_parity=0 line_offset=17
- vbi_data field_parity=0 line_offset=18
- vbi_data field_parity=0 line_offset=19
- vbi_data field_parity=0 line_offset=20
- vbi_data field_parity=0 line_offset=21
- vbi_data field_parity=0 line_offset=22
- vbi_data field_parity=1 line_offset=7
- vbi_data field_parity=1 line_offset=8
- vbi_data field_parity=1 line_offset=9
- vbi_data field_parity=1 line_offset=10
- vbi_data field_parity=1 line_offset=11
- vbi_data field_parity=1 line_offset=12
- vbi_data field_parity=1 line_offset=13
- vbi_data field_parity=1 line_offset=14
- vbi_data field_parity=1 line_offset=15
- vbi_data field_parity=1 line_offset=16
- vbi_data field_parity=1 line_offset=17
- vbi_data field_parity=1 line_offset=18
- vbi_data field_parity=1 line_offset=19
- vbi_data field_parity=1 line_offset=20
- vbi_data field_parity=1 line_offset=21
- vbi_data field_parity=1 line_offset=22
* ES pid=1753 streamtype=0x06 streamtype_txt="13818-1 PES private data"
- desc 59 subtitling language=gre type=0x10 composition=2 ancillary=1
end PMT
new PMT program=900 version=12 pcrpid=1950
* ES pid=1950 streamtype=0x1b streamtype_txt="H.264/14496-10 video (MPEG-4/AVC)"
- desc 28 avc_video profile_idc=0x4d constraint_set0_flag=0 constraint_set1_flag=1 constraint_set2_flag=0 AVC_compatible_flags=0x00 level_idc=0x1e AVC_still_present=0 AVC_24_hour_picture_flag=0
* ES pid=1951 streamtype=0x03 streamtype_txt="11172-3 audio (MPEG-1)"
- desc 03 audio_stream free_format_tag=0 ID=1 layer=2 ID_txt="MPEG Audio" layer_txt="Layer II" vbr_audio_flag=0
- desc 0a audio_language language=gre audiotype=0 audiotype_txt="undefined"
end PMT
This is a problem in autoconf
Problem is not in autoconf, it is in PMT pid TS packet parsing. I added some more detail in logging (to show PID) and now repeated log is:
Deb0: Autoconf: Service OK becoming ready. Name "MEGA", id 900 type Television
Info: Autoconf: We update the channel filters
Info: Common chan: Looking through all services to update their filters
Deb0: Common chan: pid 7006 added
Deb0: Common chan: Open the new filters
Deb1: DVB: Setting filter for PID 7006
Info: Autoconf: We update the channel networking
Deb1: Common chan: Computing expressions in string "239.10+5.3.132"
Info: Common chan: We open the channel 3 multicast IPv4 socket address 239.15.3.132:1234
Deb1: TS: Read TS : Adaptation field, len 5
Deb1: TS: PID 7006 adaptation_field_control 3
Deb2: TS: Pointer field 0xff
Deb0: TS: PID 7006 Pointer field too big 0xff, packet dropped
Deb1: TS: Read TS : Adaptation field, len 5
Deb1: TS: PID 7006 adaptation_field_control 3
Deb2: TS: Pointer field 0xff
[continues for ever]
Here is a dvbsnoop dump of pid 7006
dvbsnoop -adapter 5 7006 -n 1
dvbsnoop V1.4.50 -- http://dvbsnoop.sourceforge.net/
------------------------------------------------------------
SECT-Packet: 00000001 PID: 7006 (0x1b5e), Length: 41 (0x0029)
Time received: Thu 2020-11-05 09:11:26.230
------------------------------------------------------------
0000: 02 b0 26 03 84 d9 00 00 e7 9e f0 00 1b e7 9e f0 ..&.............
0010: 06 28 04 4d 40 1e 3f 03 e7 9f f0 09 03 01 67 0a .(.M@.?.......g.
0020: 04 67 72 65 00 f7 6b a8 53 .gre..k.S
PID: 7006 (0x1b5e)
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: 38 (0x0026)
Program_number: 900 (0x0384)
reserved_2: 3 (0x03)
Version_number: 12 (0x0c)
current_next_indicator: 1 (0x01) [= valid now]
Section_number: 0 (0x00)
Last_Section_number: 0 (0x00)
reserved_3: 7 (0x07)
PCR PID: 1950 (0x079e)
reserved_4: 15 (0x0f)
Program_info_length: 0 (0x0000)
Stream_type loop:
Stream_type: 27 (0x1b) [= AVC video stream as defined in ITU-T Rec. H.264 | ISO/IEC 14496-10 Video]
reserved_1: 7 (0x07)
Elementary_PID: 1950 (0x079e)
reserved_2: 15 (0x0f)
ES_info_length: 6 (0x0006)
MPEG-DescriptorTag: 40 (0x28) [= AVC_video_descriptor]
descriptor_length: 4 (0x04)
0000: 4d 40 1e 3f M@.?
Stream_type: 3 (0x03) [= ISO/IEC 11172 Audio]
reserved_1: 7 (0x07)
Elementary_PID: 1951 (0x079f)
reserved_2: 15 (0x0f)
ES_info_length: 9 (0x0009)
MPEG-DescriptorTag: 3 (0x03) [= audio_stream_descriptor]
descriptor_length: 1 (0x01)
free_format_flag: 0 (0x00)
ID: 1 (0x01)
layer: 2 (0x02)
variable_rate_audio_indicator: 0 (0x00)
reserved_1: 7 (0x07)
MPEG-DescriptorTag: 10 (0x0a) [= ISO_639_language_descriptor]
descriptor_length: 4 (0x04)
ISO639_language_code: gre
Audio_type: 0 (0x00) [= undefined]
CRC: 4151027795 (0xf76ba853)
==========================================================
Hope this helps to fix issue
edit: my comment was wrong. The problem is the header of TS packets. I change the code to dump them, here it is:
Deb1: TS: PID 7006: Dump ts first 16 bytes 475B5E380500FFFFFFFF0002B0260384
Deb1: TS: Read TS : Adaptation field, len 5
Deb1: TS: adaptation_field_control 3
Deb2: TS: Pointer field 0xff
Deb0: TS: Pointer field too big 0xff, packet dropped
pmt starts at byte 12 (starting from 1) or buf[11]. Byte 4 (0x38) is the one that wrongly (?) triggers adaptation field. At least other software or STBs don't have issue with that so something is handled wrongly here.
OK, first bug discovered, when adaptation field with payload, one more byte is needed to be skipped - the byte which shows the length of the adaptation field.
--- MuMuDVB/src/ts.c 2020-11-05 13:37:18.545041836 +0200
+++ MuMuDVB/src/ts.c 2020-11-05 13:32:02.563024089 +0200
@@ -125,6 +125,7 @@
{
log_message( log_module, MSG_DEBUG, "Read TS : Adaptation field \n");
offset += buf[offset] ; // add adapt.field.len
+ offset += 1; // plus one for adaptation length byte
//we check if the adapt.field.len is valid
if(offset>=TS_PACKET_SIZE)
{
@@ -511,6 +512,7 @@
return NULL;
}
delta += buf[delta]; // add adapt.field.len
+ delta += 1; // plus one for adaptation length byte
}
if (header->adaptation_field_control & 0x1) //There is a payload
{
But still this transponder fails to run, new debug.log attached debug.log
The problem now is that it never parses PMT correctly.
Final patch that fixes the issue (but I don't know if it breaks something else)
diff -Nur MuMuDVB-orig/src/ts.c MuMuDVB/src/ts.c
--- MuMuDVB-orig/src/ts.c 2020-11-05 13:37:18.545041836 +0200
+++ MuMuDVB/src/ts.c 2020-11-05 14:51:35.723974522 +0200
@@ -125,6 +125,7 @@
{
log_message( log_module, MSG_DEBUG, "Read TS : Adaptation field \n");
offset += buf[offset] ; // add adapt.field.len
+ offset += 1; // plus one for adaptation length byte
//we check if the adapt.field.len is valid
if(offset>=TS_PACKET_SIZE)
{
@@ -144,12 +145,12 @@
return (pkt->full_number > 0);
}
}
- if (header->adaptation_field_control == 3)
- {
- log_message( log_module, MSG_DEBUG, "adaptation_field_control 3\n");
- pthread_mutex_unlock(&pkt->packetmutex);
- return (pkt->full_number > 0);
- }
+ //if (header->adaptation_field_control == 3)
+ //{
+ // log_message( log_module, MSG_DEBUG, "adaptation_field_control 3\n");
+ // pthread_mutex_unlock(&pkt->packetmutex);
+ // return (pkt->full_number > 0);
+ //}
//We are now at the beginning of the Transport stream packet, we check if there is a pointer field
@@ -511,6 +512,7 @@
return NULL;
}
delta += buf[delta]; // add adapt.field.len
+ delta += 1; // plus one for adaptation length byte
}
if (header->adaptation_field_control & 0x1) //There is a payload
{
Special handling of if (header->adaptation_field_control == 3) was commented out inside get_ts_packet
Just for curiosity, is this a mux in the Athens area? I'll see reports from there, where also have problems with some software's.
Yes it is in Athens but as I shown above the issue is in mumudvb adaptation field handling. Patch fixes the issue completely. Maybe in different areas they use different hardware muxer and doesn't have those adaptation fields in PMT
Add pull request.
Hello
Indeed that looks (mostly) right to me. There was the first mistake of not shifting by the adaptation field length byte. The second mistake was the check against the value 3 in if (header->adaptation_field_control == 3) see the page https://en.wikipedia.org/wiki/MPEG_transport_stream#Packet It should check against value 2 (binary 10) and says that there is no payload 10 – adaptation field only, no payload,
With that change, please do a pull request and I will merge it
Thank you for investigating and patching
Brice
On Thu, Nov 5, 2020 at 1:53 PM Panagiotis Malakoudis < notifications@github.com> wrote:
Final patch that fixes the issue (but I don't know if it breaks something else)
diff -Nur MuMuDVB-orig/src/ts.c MuMuDVB/src/ts.c --- MuMuDVB-orig/src/ts.c 2020-11-05 13:37:18.545041836 +0200 +++ MuMuDVB/src/ts.c 2020-11-05 14:51:35.723974522 +0200 @@ -125,6 +125,7 @@ { log_message( log_module, MSG_DEBUG, "Read TS : Adaptation field \n"); offset += buf[offset] ; // add adapt.field.len
- offset += 1; // plus one for adaptation length byte //we check if the adapt.field.len is valid if(offset>=TS_PACKET_SIZE) { @@ -144,12 +145,12 @@ return (pkt->full_number > 0); } }
- if (header->adaptation_field_control == 3)
- {
- log_message( log_module, MSG_DEBUG, "adaptation_field_control 3\n");
- pthread_mutex_unlock(&pkt->packetmutex);
- return (pkt->full_number > 0);
- }
- //if (header->adaptation_field_control == 3)
- //{
- // log_message( log_module, MSG_DEBUG, "adaptation_field_control 3\n");
- // pthread_mutex_unlock(&pkt->packetmutex);
- // return (pkt->full_number > 0);
//}
//We are now at the beginning of the Transport stream packet, we check if there is a pointer field @@ -511,6 +512,7 @@ return NULL; } delta += buf[delta]; // add adapt.field.len
- delta += 1; // plus one for adaptation length byte } if (header->adaptation_field_control & 0x1) //There is a payload {
Special handling of if (header->adaptation_field_control == 3) was commented out inside get_ts_packet
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/braice/MuMuDVB/issues/264#issuecomment-722359208, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACRID3ZF2PZZPKPT5BZEBLSOKN4LANCNFSM4TJWGP6Q .
Sorry for not responding for a month but I got infected by COVID-19 and it hit me hard. I have now alsmost recovered 100%. Will send pull request later. Just a confirmation, second part which I commented out should be:
--- MuMuDVB-orig/src/ts.c 2020-11-05 13:37:18.545041836 +0200
+++ MuMuDVB/src/ts.c 2020-12-13 09:13:30.689189295 +0200
@@ -125,6 +125,7 @@
{
log_message( log_module, MSG_DEBUG, "Read TS : Adaptation field \n");
offset += buf[offset] ; // add adapt.field.len
+ offset += 1; // plus one for adaptation length byte
//we check if the adapt.field.len is valid
if(offset>=TS_PACKET_SIZE)
{
@@ -144,9 +145,9 @@
return (pkt->full_number > 0);
}
}
- if (header->adaptation_field_control == 3)
+ if (header->adaptation_field_control == 2)
{
- log_message( log_module, MSG_DEBUG, "adaptation_field_control 3\n");
+ log_message( log_module, MSG_DEBUG, "adaptation_field_control 2\n");
pthread_mutex_unlock(&pkt->packetmutex);
return (pkt->full_number > 0);
}
@@ -511,6 +512,7 @@
return NULL;
}
delta += buf[delta]; // add adapt.field.len
+ delta += 1; // plus one for adaptation length byte
}
if (header->adaptation_field_control & 0x1) //There is a payload
{
Is it correct?
Just sent the pull request
Hello
I am sorry to hear that, glad that you recovered !
I am merging the patch right now, thank you !
Brice
On Sun, Dec 13, 2020 at 8:15 AM Panagiotis Malakoudis < notifications@github.com> wrote:
Sorry for not responding for a month but I got infected by COVID-19 and it hit me hard. I have now alsmost recovered 100%. Will send pull request later. Just a confirmation, second part which I commented out should be:
+++ MuMuDVB/src/ts.c 2020-12-13 09:13:30.689189295 +0200 @@ -125,6 +125,7 @@ { log_message( log_module, MSG_DEBUG, "Read TS : Adaptation field \n"); offset += buf[offset] ; // add adapt.field.len
- offset += 1; // plus one for adaptation length byte //we check if the adapt.field.len is valid if(offset>=TS_PACKET_SIZE) { @@ -144,9 +145,9 @@ return (pkt->full_number > 0); } }
- if (header->adaptation_field_control == 3)
- if (header->adaptation_field_control == 2) {
- log_message( log_module, MSG_DEBUG, "adaptation_field_control 3\n");
- log_message( log_module, MSG_DEBUG, "adaptation_field_control 2\n"); pthread_mutex_unlock(&pkt->packetmutex); return (pkt->full_number > 0); } @@ -511,6 +512,7 @@ return NULL; } delta += buf[delta]; // add adapt.field.len
- delta += 1; // plus one for adaptation length byte } if (header->adaptation_field_control & 0x1) //There is a payload {```
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/braice/MuMuDVB/issues/264#issuecomment-743965700, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACRID6BS5LWDZSG3KHZZNTSURS23ANCNFSM4TJWGP6Q .
Autoconf fails to work in a DVB-T transponder of greek DIGEA. Normal log shows:
and debug log shows
which is repeated for ever (like gone in infinite loop). I also attach full debug log. debug.log
If I can do anything else to help debug let me know.