Opendigitalradio / etisnoop

etisnoop is a ETI file analyser
GNU General Public License v3.0
9 stars 13 forks source link

Number for N=Subchannel is wrong #29

Closed andimik closed 3 years ago

andimik commented 3 years ago

The option -d N should decode subchannel N.

In fact N seems to be not the real subchannel, but it's numbered in nearly ascending order defined by etisnoop itself.

For example 5C (Bundesmux): see older file from last year (makes no difference) bumux1.zip

$ ni2out --list < bumux1.eti 
DR Deutschland   (0x10bc)
 0 : KLASSIK RADIO    (0xd75b) Pri subch= 6 start=198 CUs= 54 PL=eep-3a bitrate=72 DAB+
 1 : sunshine live    (0x15dc) Pri subch=21 start=336 CUs= 54 PL=eep-3a bitrate=72 DAB+
 2 : Radio Horeb      (0xd01c) Pri subch= 5 start=162 CUs= 36 PL=eep-3a bitrate=48 DAB+
 3 : ERF Plus         (0x1a64) Pri subch= 2 start=  0 CUs= 54 PL=eep-3a bitrate=72 DAB+
 4 : Dlf              (0xd210) Pri subch=10 start=480 CUs=104 PL=eep-2a bitrate=104 DAB+
 5 : Dlf Kultur       (0xd220) Pri subch=11 start=584 CUs=112 PL=eep-2a bitrate=112 DAB+
 6 : Dlf Nova         (0xd230) Pri subch=12 start=696 CUs=104 PL=eep-2a bitrate=104 DAB+
 7 : DRadio DokDeb    (0xd240) Pri subch=13 start=800 CUs= 36 PL=eep-3a bitrate=48 DAB+
 8 : Schwarzwaldradio (0x100d) Pri subch= 7 start=252 CUs= 42 PL=eep-2b bitrate=64 DAB+
 9 : ENERGY           (0x1a45) Pri subch= 4 start=108 CUs= 54 PL=eep-3a bitrate=72 DAB+
10 : SCHLAGERPARADIES (0x10c3) Pri subch=20 start=294 CUs= 42 PL=eep-2b bitrate=64 DAB+
11 : Absolut relax    (0x17fa) Pri subch= 3 start= 54 CUs= 54 PL=eep-3a bitrate=72 DAB+
12 : RADIO BOB!       (0x15dd) Pri subch=22 start=390 CUs= 54 PL=eep-3a bitrate=72 DAB+

etisnoop -i bumux1.eti -d 0 will extract ERF Plus

etisnoop -i bumux1.eti -d 1 will extract Absolut relax, although SCId 1 is not defined

etisnoop -i bumux1.eti -d 2 will extract ENERGY, not ERF Plus

etisnoop -i bumux1.eti -d 3 will extract Radio Horeb, not Absolute relax

and so on (0-8 and 10-15 for audio, 9 is the EPG and 10 and 16 are the TPEG services).

But when I sort all subchannels I wonder why N=9 should be EPG

subchid:02 prot:3A-EEP bitrate: 64 scids:0 scty: 63 (AAC) label:ERF Plus  [PAD]
subchid:03 prot:3A-EEP bitrate: 72 scids:0 scty: 63 (AAC) label:Absolut relax  [PAD]
subchid:04 prot:3A-EEP bitrate: 72 scids:0 scty: 63 (AAC) label:ENERGY  [PAD]
subchid:05 prot:3A-EEP bitrate: 48 scids:0 scty: 63 (AAC) label:radio horeb  [PAD]
subchid:06 prot:3A-EEP bitrate: 72 scids:0 scty: 63 (AAC) label:KLASSIK RADIO  [PAD]
subchid:07 prot:2B-EEP bitrate: 64 scids:0 scty: 63 (AAC) label:Schwarzwaldradio [PAD]
subchid:10 prot:2A-EEP bitrate:104 scids:0 scty: 63 (AAC) label:Dlf  [PAD]
subchid:11 prot:2A-EEP bitrate:112 scids:0 scty: 63 (AAC) label:Dlf Kultur  [PAD]
subchid:12 prot:2A-EEP bitrate:104 scids:0 scty: 63 (AAC) label:Dlf Nova  [PAD]
subchid:13 prot:3A-EEP bitrate: 48 scids:0 scty: 63 (AAC) label:DRadio DokDeb  [PAD]
subchid:14 prot:3A-EEP bitrate: 32 scid: 001 packet data DRadio Daten
subchid:20 prot:2B-EEP bitrate: 64 scids:0 scty: 63 (AAC) label:SCHLAGERPARADIES [PAD]
subchid:21 prot:3A-EEP bitrate: 72 scids:0 scty: 63 (AAC) label:sunshine live  [PAD]
subchid:22 prot:3A-EEP bitrate: 72 scids:0 scty: 63 (AAC) label:RADIO BOB!  [PAD]
subchid:30 prot:3A-EEP bitrate: 16 scid: 024 packet data EPG Deutschland
subchid:31 prot:3A-EEP bitrate: 16 scid: 023 packet data TPEG
subchid:33 prot:3A-EEP bitrate: 16 scid: 021 packet data TPEG_MM
mpbraendli commented 3 years ago

It looks like it takes the ordering of the subchannels in the MSC, look at the start addresses... I did a fix but didn't actually test it. Let me know if it works now.

andimik commented 3 years ago

I had a short look, this seems to work, but the filenames stream-N.wav and stream-N.dab are still using the old N.

Hint: maybe you could name it then stream-[SId].wav (don't use the label, as this might be tricky with the special characters used in some services over the DAB world like +,&, *, or \ resp. /, for example Joe 60's & 70's in Belgium or GALAXY PA/DEG in Bayern).

Before I can definitely confirm it, let me tomorrow check with NRK, they have an interesting numbering ...

$ ni2out --list < nrk1.eti 
NRK Reg1 OsloVik (0xf701)
 0 : NRK P1           (0xf201) Pri subch=50 start=144 CUs= 60 PL=eep-3a bitrate=80 DAB+
 1 : NRK P1+          (0xf209) Pri subch=41 start=324 CUs= 60 PL=eep-3a bitrate=80 DAB+
 2 : NRK P13          (0xf20d) Pri subch=13 start=684 CUs= 60 PL=eep-3a bitrate=80 DAB+
 3 : NRK JAZZ         (0xf20b) Pri subch=17 start=804 CUs= 60 PL=eep-3a bitrate=80 DAB+
 4 : NRK SUPER JUL    (0xf20a) Pri subch=16 start=744 CUs= 60 PL=eep-3a bitrate=80 DAB+
 5 : NRK mP3          (0xf208) Pri subch= 4 start=504 CUs= 60 PL=eep-3a bitrate=80 DAB+
 6 : NRK S�PMI        (0xf205) Pri subch= 6 start=624 CUs= 60 PL=eep-3a bitrate=80 DAB+
 7 : NRK KLASSISK     (0xf204) Pri subch= 5 start=564 CUs= 60 PL=eep-3a bitrate=80 DAB+
 8 : NRK P3           (0xf203) Pri subch= 3 start=444 CUs= 60 PL=eep-3a bitrate=80 DAB+
 9 : NRK P2           (0xf202) Pri subch= 2 start=384 CUs= 60 PL=eep-3a bitrate=80 DAB+
10 : NRK P1 �stfold   (0xf401) Pri subch=51 start=204 CUs= 60 PL=eep-3a bitrate=80 DAB+
11 : NRK V�r S�r      (0xf301) Pri subch=45 start= 24 CUs= 18 PL=eep-3a bitrate=24 DAB+
12 : NRK P1+�stlands  (0xf611) Pri subch=41 start=324 CUs= 60 PL=eep-3a bitrate=80 DAB+
13 : NRK P1+�stfold   (0xf411) Pri subch=41 start=324 CUs= 60 PL=eep-3a bitrate=80 DAB+
14 : NRK P1 �stlands  (0xf601) Pri subch=50 start=144 CUs= 60 PL=eep-3a bitrate=80 DAB+
15 : NRK P1+Buskerud  (0xf911) Pri subch=41 start=324 CUs= 60 PL=eep-3a bitrate=80 DAB+
16 : NRK P1 Buskerud  (0xf901) Pri subch=52 start=264 CUs= 60 PL=eep-3a bitrate=80 DAB+
17 : NRK NYHETER      (0xf206) Pri subch=42 start= 60 CUs= 36 PL=eep-3a bitrate=48 DAB+
18 : NRK SPORT        (0xf207) Pri subch=43 start= 96 CUs= 48 PL=eep-3a bitrate=64 DAB+
19 : NRK TRAFIKK 1    (0xf311) Pri subch=46 start= 42 CUs= 18 PL=eep-3a bitrate=24 DAB+
mpbraendli commented 3 years ago

Ah yes, the filenames used the old index still. I've pushed another change. Let me know!

andimik commented 3 years ago

No, there is a bug in https://github.com/Opendigitalradio/etisnoop/commit/1a10e4cf82ff9082a

After some moments I get

terminate called after throwing an instance of 'std::logic_error'
  what():  StreamSnoop not properly initialised
Abgebrochen (Speicherabzug geschrieben)

It stops at https://github.com/Opendigitalradio/etisnoop/blob/1a10e4cf82ff9082a84f81f3feadfceb528e08eb/src/dabplussnoop.cpp#L334

This only appears if N is existing in that mux. For any other (like N=99) the error does not appear.

andimik commented 3 years ago

If you need it:

(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff7a19859 in __GI_abort () at abort.c:79
#2  0x00007ffff7e11951 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff7e1d47c in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff7e1d4e7 in std::terminate() ()
   from /lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff7e1d799 in __cxa_throw ()
   from /lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x000055555555e074 in StreamSnoop::push (this=<optimized out>, 
    streamdata=streamdata@entry=0x7ffffffface0 "\016\246p\023\202\214!\033\024\201\n\245h\241\260@$q#\256\351M\342\264\304\313\t\255\361\342\345T\342\354\202P\"<T\210I\321og\372GZ\232\365\203\275\233\303i\314l~PҙF\375Y\343yU\273I\350~w\211\362y\246\360HvM0\236\207C\212B\225\375W\253\257\227\211\226\253\337\371\032\344|\323<{\237\272FF\225\203\372n=\254\a\034Ta\353<[\254\371\063K^x\247\027k.-\332W\r?\001S\367\375?\250\261\306h\225\001\347\357\354W\214 \334\325\375ݹZ\206\364\236\262\365l\032~\221\214\240\367\006@\\Z\221\024\331k\225\003\"e\263=\267\320\365\233\246\312\071R\271\234Qr\034x\243uU"..., streamsize=streamsize@entry=216)
    at src/dabplussnoop.cpp:334
#7  0x000055555556aac4 in ETI_Analyser::eti_analyse (this=<optimized out>)
    at /usr/include/c++/9/bits/stl_tree.h:1014
#8  0x0000555555563736 in main (argc=<optimized out>, argv=<optimized out>)
    at src/etisnoop.cpp:239
mpbraendli commented 3 years ago

Should be fixed in 44b5012