piratfm / eti-tools

ETI conversion software
Mozilla Public License 2.0
50 stars 18 forks source link

na2ni fails with MuxCo feeds #1

Closed linuxstb closed 9 years ago

linuxstb commented 9 years ago

Hi,

I've succesfully used eti-tools to convert the BBC and D1 DAB feeds to NI streams, but these tools fail with the 3 MuxCo muxes from the same transponder with (in na2ni) "ERROR: Can't find sync".

I can provide some test TS recordings if you need them.

Thanks.

piratfm commented 9 years ago

Hi!

Some streams may be decoded by ts2na without additional arguments, but some - are needed to set specific offset inside ts-packed (-s argiment). Default - is 12 bytes, and negative number (-3) for german streams. To see offset, you need to look inside one of TS packet with specified PID, and watch for dummy (not-used bytes). There might be up to 12 unused one's with 0xFF or 0x00 (and each ts packed have that data constantly):

47 XX XX XX │ FF FF FF FF │ FF FF FF FF │ FF FF FF FF │ [ACTUAL_DATA] 47 XX XX XX │ FF FF FF FF | FF FF FF FF │ FF FF FF FF │ [ACTUAL_DATA] 47 XX XX XX │ FF FF FF FF │ FF FF FF FF │ FF FF FF FF │[ACTUAL_DATA]

Righnow I have no dish to MucCo streams, so yes please, your streams dump (with TS header) will help me to make sure that that tools is still working fine.

linuxstb commented 9 years ago

Ah, I forgot about the -s parameter, as the BBC (and I think D1) streams decoded with the default value.

Adding -s 0 fixes the muxco feeds. So I'll close this issue.

Thanks for the reply and thanks even more for eti-tools.

andimik commented 7 years ago

You mentioned "german streams". As far as I know, these 2 streams are already ETI-NA, but every 188th 0x47 byte has to be removed.

piratfm commented 7 years ago

Hi, german streams using MPEG-TS PID fields as part of NA-data, so negative offset is needed to properly decode that streams. Also in this case "pid" argument will be ignored. For german streams that offset argument must be "-s -3" - which is 3 bytes backward from expected mpeg-ts actual data start position.

andimik commented 7 years ago

ok, did not know that the PID is ignored in this case, because the console output still shows the default PID

$ ts2na -s -3 -i german.ts -o german_na.eti INFO: Using pid: 0x0426 (1062)

But then na2ni does not find a sync:

$ na2ni -i german_na.eti -o german_ni.eti

WARN: Forwarded error correction enabled ERROR: Can't find sync

Also tried with --no-fec, german_ni.eti is always 0 bytes.

Any idea?

See attachment. german.zip

piratfm commented 7 years ago

I see that Your dump file is not aligned, is this capture file Bundesmux or WDR? Each new NA-frame is 4 bytes forwarded from the place where it is expected.

Maybe some packets from transport-stream has been dropped by Your receiver software?

andimik commented 7 years ago

Thank you for the hint, I changed the software (TSReader to EBSpro), indeed. Now I have audio on both German streams and the stream is errorfree :-)

Currently I'm only experimenting with ts files I have to record under Windows. I've recognized that the Linux firmware of my USB DVB-S2 card does dot accept SRs lower than 5000 :-(

[ 9.653788] stb0899_attach: Attaching STB0899 [ 9.653795] stb6100_attach: Attaching STB6100 [ 9.655180] usb 1-1: DVB: registering adapter 0 frontend 0 (STB0899 Multistandard)... [ 9.655411] input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:12.2/usb1/1-1/input/input16 [ 9.655505] dvb-usb: schedule remote query interval to 400 msecs. [ 9.655510] dvb-usb: Technisat SkyStar USB 2 HD CI successfully initialized and connected. [ 9.655571] usbcore: registered new interface driver dvb_usb_az6027

[ 823.591855] usb 1-1: DVB: adapter 0 frontend 0 symbol rate 1340000 out of range (5000000..45000000)

piratfm commented 7 years ago

I think You can patch Your SkyStar2 kernel module to enlarge symbol rate range limits:

https://www.linuxtv.org/pipermail/linux-dvb/2008-November/030212.html