Coder Social home page Coder Social logo

tsduck / tsduck Goto Github PK

View Code? Open in Web Editor NEW
794.0 53.0 197.0 1.8 GB

MPEG Transport Stream Toolkit

Home Page: https://tsduck.io

License: BSD 2-Clause "Simplified" License

Makefile 0.49% PowerShell 0.47% QMake 0.15% NSIS 0.12% Shell 0.68% C++ 96.93% Python 0.86% Java 0.31% Dockerfile 0.01%
mpeg dvb mpeg-ts dvb-ip dvb-si dvb-psi teletext dvb-t2-mi dvb-simulcrypt hls

tsduck's Introduction

TSDuck - The MPEG Transport Stream Toolkit

Abstract

TSDuck is an extensible toolkit for MPEG transport streams.

TSDuck is used in digital television systems for test, monitoring, integration, debug, lab or demo.

In practice, TSDuck is used for:

  • Transport stream acquisition or transmodulation, including DVB, ATSC, ISDB, ASI and IP multicast.
  • Analyze transport streams, PSI/SI signalization, bitrates, timestamps.
  • Monitor and report conditions on the stream (video and audio properties, bitrates, crypto-periods, signalization).
  • On-the-fly transformation or injection of content and signalization.
  • Modify, remove, rename, extract services.
  • Work on live transport streams, DVB-S/C/T, ATSC, ISDB-T, ASI, UDP ("IP-TV"), HTTP, HLS, SRT, RIST or offline transport stream files.
  • Use specialized hardware such as cheap DVB, ATSC or ISDB tuners (USB, PCI), professional Dektec devices, cheap HiDes modulators, VATek-based modulators (e.g. Suntechtv U3, USB).
  • Re-route transport streams to other applications.
  • Extract or inject Multi-Protocol Encapsulation (MPE) between TS and UDP/IP.
  • Analyze and inject SCTE 35 splice information.
  • Extract specific encapsulated data (Teletext, T2-MI).
  • Emulate a CAS head-end using DVB SimulCrypt interfaces to and from ECMG or EMMG.
  • And more...

TSDuck is developed in C++ in a modular architecture. It is easy to extend through plugins.

TSDuck is simple; it is a collection of command line tools and plugins. There is no sophisticated GUI. Each utility or plugin performs only one elementary feature but they can be combined in any order.

Through tsp, the Transport Stream Processor, many types of analysis and transformation can be applied on live or recorded transport streams. This utility can be extended through plugins. Existing plugins can be enhanced and new plugins can be developed using a library of C++ classes.

Usage

TSDuck comes with a comprehensive User's Guide.

All utilities and plugins accept the option --help to display their syntax.

For programmers, TSDuck provides a large collection of C++ classes in one single library. These classes manipulate, in a completely portable way, MPEG transport streams, MPEG/DVB/ATSC/ISDB signalization and many other features. See the programming guide and its tutorial.

Python and Java bindings exist to allow running transport stream processing pipelines from Python or Java applications.

Building

TSDuck can be built on Windows, Linux, macOS and BSD systems (FreeBSD, OpenBSD, NetBSD, DragonFlyBSD). See the building guide for details.

Download

Pre-built binary packages are available for Windows and the very latest versions of some Linux distros (Fedora, RedHat, CentOS, AlmaLinux, Ubuntu, Debian, Raspbian).

The latest developments can be tested using nightly builds.

The command tsversion --check can be used to check if a new version of TSDuck is available online. The command tsversion --upgrade downloads the latest binaries for the current operating system and upgrades TSDuck.

Project resources

TSDuck is maintained by one single developer on spare time and on personal expenses. You may consider contributing to the hardware and Web hosting costs using Donate

License

TSDuck is distributed under the terms of the Simplified BSD License. See the file LICENSE.txt for details.

Copyright (c) 2005-2024, Thierry Lelegard
All rights reserved

tsduck's People

Contributors

a83912a avatar alevinsn avatar alfonz42 avatar amoscmc avatar athoik avatar barsnick avatar basicmaster avatar caveman99 avatar elykar avatar enricovittorini avatar gdams avatar lars18th avatar lelegard avatar macczy avatar martinfretigne avatar marware avatar masnagam avatar maxha651 avatar mich181189 avatar nstuardod avatar oviano avatar paulhiggs avatar piotrserafin avatar rubenochiavone avatar spnngl avatar ss-ff avatar svlobanov avatar ubaldus avatar wdelstrother avatar wongfei2009 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tsduck's Issues

Debian: tsfixcc conflicts with opencaster + daylight saving time boundary bug

Hi,
I successfully built tsduck_3.10-674_amd64.deb from source on Debian Stretch 9.4 (current master commit = e58d3c1 Apr 11 23:23:44 2018 +0200).
However, I cannot install the .deb created by make deb as it conflicts with tsfixcc which is also provided by opencaster:

    >sudo dpkg -i installers/tsduck_*.deb
    (Reading database ... 138664 files and directories currently installed.)
    Preparing to unpack .../tsduck_3.10-674_amd64.deb ...
    Unpacking tsduck (3.10-674) ...
    dpkg: error processing archive installers/tsduck_3.10-674_amd64.deb (--install):
     trying to overwrite '/usr/bin/tsfixcc', which is also in package opencaster 3.2.2+dfsg-1.1+b1

A workaround for me is to uninstall opencaster as I am not currently using it but ideally there should be no conflicting names.
Another option would be to document the equivalent of:

./configure --prefix=/usr/local

for whatever build system you are using.
I think as it stands it looks like make install installs to /usr when source installs should install to /usr/local (http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLOCALLOCALHIERARCHY)

Is there any expectation of this package being accepted into Debian in the near future?

Regards,

Bruce.

PS I also note there is a unit test failure - though this may be okay as this is not a release tag:

 make test
source release-x86_64/setenv.sh && release-x86_64/utest


!!!FAILURES!!!
Test Results:
Run:  341   Failures: 1   Errors: 0


1) test: DemuxTest::testTOT (F) line: 375 utestDemux.cpp
assertion failed
- Expression: tot.regions[0].next_change == ts::Time(2008, 3, 30, 1, 0, 0)


Makefile:61: recipe for target 'test' failed
make[1]: *** [test] Error 1
Makefile:55: recipe for target 'test' failed
make: *** [test] Error 2


Tuning Space is Invalid

Hi,

I have TBS 5925 DVB-S2 Tuner Card (external USB). I try to tune, but I fail. Here is the log:

C:\Program Files (x86)\TSDuck\bin>tslsdvb.exe
tslsdvb: fail to set default tuning space GkDVB-C: The handle is invalid.
0: "TBS 5925 DVBS2 Tuner" (DVB-S)

C:\Program Files (x86)\TSDuck\bin>tsp -I dvb --tune "11096:h:0:30000"

  • Error: dvb: fail to set default tuning space GkDVB-C: The handle is invalid.
  • Error: dvb: no input DVB signal after 5000 milliseconds

BTW, both 64-bits and 32-bits version throw the same error.

Probably tuning space is set wrong (GkDVB-C) ?

Support for ISDBT

In one of the old DtPlay source files, there is a code there that supports ISDBT modulator initialization. This is done by scanning the incoming TS data for NIT information or by directly initializing the IsdbtPars structure (see below) using data from a config file or passed as a plugin parameter - Would it be possible to include such on the next releases of tsduck ? :)

void ts::InitIsdbtPars(DtIsdbtPars& IsdbtPars)
{
DTAPI_RESULT dr;
FILE config_file_fp;
// const int c_PckSize=204;
// const int c_TempBufSize = 1
1024*1024;

// char* pTempBuf = new char [c_TempBufSize];

int pid;
char layer;

IsdbtPars.m_DoMux = true;
IsdbtPars.m_FilledOut = true;
IsdbtPars.m_BType = DTAPI_ISDBT_BTYPE_TV;
IsdbtPars.m_Mode = 3;
IsdbtPars.m_Guard = DTAPI_ISDBT_GUARD_1_16;
IsdbtPars.m_PartialRx = 1;
IsdbtPars.m_Emergency = 0;
IsdbtPars.m_IipPid = 0x1FF0;
IsdbtPars.m_LayerOther = DTAPI_ISDBT_LAYER_B;

IsdbtPars.m_LayerPars[0].m_NumSegments = 1;
IsdbtPars.m_LayerPars[0].m_Modulation = DTAPI_ISDBT_MOD_QAM64;
IsdbtPars.m_LayerPars[0].m_CodeRate = DTAPI_ISDBT_RATE_2_3;
IsdbtPars.m_LayerPars[0].m_TimeInterleave = 3;

IsdbtPars.m_LayerPars[1].m_NumSegments = 12;
IsdbtPars.m_LayerPars[1].m_Modulation = DTAPI_ISDBT_MOD_QAM64;
IsdbtPars.m_LayerPars[1].m_CodeRate = DTAPI_ISDBT_RATE_3_4;
IsdbtPars.m_LayerPars[1].m_TimeInterleave = 2;

IsdbtPars.m_LayerPars[2].m_NumSegments = 0;


/* For TSMuxeR... */
/* PAT */
IsdbtPars.m_Pid2Layer[0x0]=DTAPI_ISDBT_LAYER_B;

/* NIT */
IsdbtPars.m_Pid2Layer[0x1f]=DTAPI_ISDBT_LAYER_B;

/* PMT */
IsdbtPars.m_Pid2Layer[0x100]=DTAPI_ISDBT_LAYER_B;

/* VIDEO */
IsdbtPars.m_Pid2Layer[0x1011]=DTAPI_ISDBT_LAYER_B;

/* AUDIO */
IsdbtPars.m_Pid2Layer[0x1100]=DTAPI_ISDBT_LAYER_B;

/* PCR */
IsdbtPars.m_Pid2Layer[0x1001]=DTAPI_ISDBT_LAYER_B;
int result;
dr = IsdbtPars.CheckValidity(result);
if ( dr != DTAPI_OK ){
    switch(result){
    case DTAPI_ISDBT_E_NSEGM:
    printf("DTAPI_ISDBT_E_NSEGM\n");
    break;

        case DTAPI_ISDBT_E_PARTIAL:
    printf("DTAPI_ISDBT_E_PARTIAL\n");
    break;
    default:
    printf("result = %d, dr = %d\n", result, dr);
    }

    fprintf(stderr,"Failed to initialise ISDB-T parameters\n");
}

}

Call to users: looking for streams with MPE

Dear TSDuck users,

I am looking for real-life captured transport streams with MPE streams. It possible, I would appreciate encapsulated TS inside UDP, being encapsulated inside MPE streams, inside TS.

If you have such streams, please post them (or link to them) here.

Recent commits of TSDuck have added detailed MPE signalisation and a new plugin named mpe which extracts MPE streams (saved on files or forwarded as UDP for the moment). To add more interesting features on this plugin, I need real test streams.

Thank you in advance for your cooperation.

ip input has problem when specifying multicast address

My setup has 5 x UDP MPEGTS streams going out from a single machine, each using a different multicast address:

  • stream1 => 239.255.1.1 port 59000
  • stream2 => 239.255.1.2 port 59000
  • stream3 => 239.255.1.3 port 59000
  • stream4 => 239.255.1.4 port 59000
  • stream5 => 239.255.1.5 port 59000

On another machine, when I try to analyze a single stream I seem to get information from the other streams. Such as...
% tsp -I ip 239.255.1.5:59000 -P analyze -O drop
will return service and table info for stream1, stream2, stream3 etc...

If I try to zap a single service in stream1 (one that gets returned in the above analysis) I will get the following:
% tsp -I ip 239.255.1.5:59000 -P zap 1376 -O drop
* Error: zap: service id 0x0560 not found in PAT

If I stop sending the other streams (2, 3, 4 & 5) both the analyze and the zap plugins work as expected. Analysis contains only stream1 information and zap is able to find the given service inside stream1.

If I move each stream to its own unique port:

  • stream1 => 239.255.1.1 port 59001
  • stream2 => 239.255.1.2 port 59002
  • stream3 => 239.255.1.3 port 59003
  • stream4 => 239.255.1.4 port 59004
  • stream5 => 239.255.1.5 port 59005
    I get expected results from both plugins.
    % tsp -I ip 239.255.1.1:59001 -P analyze -O drop
    will return only stream1 information and
    % tsp -I ip 239.255.1.1:59001 -P zap 1376 -O drop
    is able to find the service 1376.

The ip input is listening to more than 1 multicast destination - more than just the one I explicitly configure.

Looking for testers : DVB tuners on Windows

Hi TSDuck users,

TSDuck version 3.4-20171110 is out.

Among other features and improvements, the support for DVB tuners on Windows has been partly rewritten. The previous version was written 10 years ago on XP or Vista (I cannot even remember). Since then, there have been some significant improvements in DirectShow. With version 3.4, TSDuck uses DirectShow filters which did not exist 10 years ago. This should improve the support for DVB tuners on Windows. As a start, it solved the 32-bit vs. 64-bit issue which was reported with some drivers.

However, messing with DirectShow can be tricky since different tuners come with different BDA drivers and DirectShow filters. The experience had shown (but it was a long time ago) that some proprietary drivers may require very specific forms of DirectShow graphs.

So, I would appreciate if all TSDuck users with DVB tuners on Windows could try this new version and report their feedbacks in this thread. If it works, please indicate the tuner type and characteristics so that I could include this in the documentation. If if does not work, please add the output of tslsdvb --debug.

Thanks in advance for your cooperation.

PS: @rezna11, @ggnull35, your feedback would be greatly appreciated

Problem with interval report in Analyze plugin

When using interval report options in Analyze plugin. It doesn't output at the right interval.
I took a look at plugin code and I think the problem is in this part of code

 else if (_next_report_packet == 0 || (_next_report_packet > 0 && _current_packet >= _next_report_packet)) {
            // Check current time to see if this is time to produce a report
            const Time current_utc(Time::CurrentUTC());
            if (current_utc < _next_report_time) {
                // False alarm, we have to wait some more
                computeNextReportTime(current_utc, _next_report_time - current_utc);
            }
            else {
                // Time to produce a report
                if (!produceReport()) {
                    return TSP_END;
                }
                // Reset analysis context
                _analyzer.reset();
                computeNextReportTime (current_utc, _output_interval);
            }
        }

In my case, my stream doesn't have bit-rate information.
In the above code, it's always a wrong report anytime we receive a packet.
So It will run computeNextReportTime(current_utc, _next_report_time - current_utc); every time we receive a packet.
And in case we keep calling function computeNextReportTime, which I think reduce next_report_time a little bit for every call. We end up with wrong next_report time
So I think it should be like this:

if (current_utc < _next_report_time) {
    // False alarm, we have to wait some more
    if (_next_report_packet > 0) { //don't recompute when don't have bitrate information.
        computeNextReportTime(current_utc, _next_report_time - current_utc);
    }
}

Enhancement request for bitrate_monitor

Hi,

Thanks for the fast responses on the other issues I raised today.

A minor enhancement request that would be very handy for spot checking variable bitrate components would be an extra option for the bitrate monitor to display the actual bitrate at the frequency of the time interval, so alarms can be shown for being outside max and min and as a confidence that a variable bitrate component is changing within the max and min the changing bitrates can be seen in the outut.

Regards

Darren

An absence of timestamps in XML log

Hi Thierry,

thanks a lot for the project and for the detailed explanations again and again. I have explored and tested just a small part of TSDuck - so much features it has.

I haven't found information in the guide about the topic. Could you please shed a light on this?

I see that tstables / tables --time-stamp option doesn't create time-stamps in XML logs. Is it determined feature or not? It would be great to see registration time for occurrences of a table / of the first section of a table.

Could you please comment if it's possible to get timestamps in XML log?

Custom EPG table injection

Hi guys.

I am just new into the tsduck and trying to play with it. My current issue is that i am trying to inject custom EPG (EIT) tables into the transport stream, but it is not working for me.

The procedure (based on TSDuck docs):

  1. get example binary file from current live stream or transport stream file (*.ts), everything is okay:
    tsp -I file TS.ts -P tables --binary-output test.bin -O drop
  2. Decompile the binary file to XML, everything is okay, the file looks good:
    tstabcomp -d test.bin -o test.xml
  3. Made some changes and compile the XML file back to the binary, seems to be okay:
    tstabcomp -c test.xml -o test.bin
  4. Now, the main step, trying to inject this EPG tables back to the TS (or live stream):
    TS file:
    tsp -I file TS.ts -P inject test32.bin -O ip 239.0.0.155:1234
    Live streaming:
    tsp -I ip 239.100.0.25:1234 -r -P inject test2.bin --replace --pid 18 -O ip -l 239.0.0.155:1234

The issue is that custom EPG tables are not injected, can you please help me?
Thanks, Martin

TBS DVB tuners not detected

TBS5925, TBS5922 nor DVBSky S960 are detected as input DVB devices. What DVB tuners are supported?

I have other tuners too, should I try those? Is there a list of compatible tuners?


C:\Users\Administrator>tsp -I dvb -d "TBS 5922 USB DVB-S2 Tuner"
* Error: dvb: DVB device "TBS 5922 USB DVB-S2 Tuner" not found

C:\Users\Administrator>tslsdvb -ve
tslsdvb: no DVB device found

=== Device category KSCATEGORY_BDA_NETWORK_PROVIDER

=== Device category KSCATEGORY_BDA_TRANSPORT_INFORMATION

=== Device category KSCATEGORY_CAPTURE

=== Device category KSCATEGORY_TVTUNER

=== Device category KSCATEGORY_BDA_RECEIVER_COMPONENT

device "TBS 5922 USB DVB-S2 Capture"
  Some supported interfaces:
    interface IAMDeviceRemoval
    interface IAMFilterMiscFlags
    interface IAMovieSetup
    interface IBaseFilter
    interface IKsControl
    interface IKsPropertySet
    interface IKsTopologyInfo
    interface IMediaFilter
    interface IMediaSeeking
  IKsPropertySet properties support:
  IKsControl properties support:
  IKsTopologyInfo:
    Categories: KSCATEGORY_BDA_RECEIVER_COMPONENT
    No node found

  - Pin "MPEG2 Transport", direction: input
    Some supported interfaces:
      interface IKsControl
      interface IKsPin
      interface IKsPropertySet
      interface IMemInputPin
      interface IPin
      interface IQualityControl
    IKsPropertySet properties support:
    IKsControl properties support:

  - Pin "MPEG2 Transport", direction: output
    Some supported interfaces:
      interface IAMBufferNegotiation
      interface IAMStreamConfig
      interface IAMStreamControl
      interface IKsControl
      interface IKsPin
      interface IKsPropertySet
      interface IMediaSeeking
      interface IPin
      interface IQualityControl
    IKsPropertySet properties support:
    IKsControl properties support:

device "TBS 5925 DVBS2 Capture"
  Some supported interfaces:
    interface IAMDeviceRemoval
    interface IAMFilterMiscFlags
    interface IAMovieSetup
    interface IBaseFilter
    interface IKsControl
    interface IKsPropertySet
    interface IKsTopologyInfo
    interface IMediaFilter
    interface IMediaSeeking
  IKsPropertySet properties support:
  IKsControl properties support:
  IKsTopologyInfo:
    Categories: KSCATEGORY_BDA_RECEIVER_COMPONENT
    No node found

  - Pin "MPEG2 Transport", direction: input
    Some supported interfaces:
      interface IKsControl
      interface IKsPin
      interface IKsPropertySet
      interface IMemInputPin
      interface IPin
      interface IQualityControl
    IKsPropertySet properties support:
    IKsControl properties support:

  - Pin "MPEG2 Transport", direction: output
    Some supported interfaces:
      interface IAMBufferNegotiation
      interface IAMStreamConfig
      interface IAMStreamControl
      interface IKsControl
      interface IKsPin
      interface IKsPropertySet
      interface IMediaSeeking
      interface IPin
      interface IQualityControl
    IKsPropertySet properties support:
    IKsControl properties support:

=== Device category KSCATEGORY_BDA_NETWORK_TUNER

device "TBS 5922 USB DVB-S2 Tuner"
  Some supported interfaces:
    interface IAMDeviceRemoval
    interface IAMFilterMiscFlags
    interface IAMovieSetup
    interface IBaseFilter
    interface IKsControl
    interface IKsPropertySet
    interface IKsTopologyInfo
    interface IMediaFilter
    interface IMediaSeeking
  IKsPropertySet properties support:
  IKsControl properties support:
  IKsTopologyInfo:
    Categories: KSCATEGORY_BDA_NETWORK_TUNER
    No node found

  - Pin "Input0", direction: input
    Some supported interfaces:
      interface IKsControl
      interface IKsPin
      interface IKsPropertySet
      interface IMemInputPin
      interface IPin
      interface IQualityControl
    IKsPropertySet properties support:
    IKsControl properties support:

  - Pin "MPEG2 Transport", direction: output
    Some supported interfaces:
      interface IAMBufferNegotiation
      interface IAMStreamConfig
      interface IAMStreamControl
      interface IKsControl
      interface IKsPin
      interface IKsPropertySet
      interface IMediaSeeking
      interface IPin
      interface IQualityControl
    IKsPropertySet properties support:
    IKsControl properties support:

device "TBS 5925 DVBS2 Tuner"
  Some supported interfaces:
    interface IAMDeviceRemoval
    interface IAMFilterMiscFlags
    interface IAMovieSetup
    interface IBaseFilter
    interface IKsControl
    interface IKsPropertySet
    interface IKsTopologyInfo
    interface IMediaFilter
    interface IMediaSeeking
  IKsPropertySet properties support:
  IKsControl properties support:
  IKsTopologyInfo:
    Categories: KSCATEGORY_BDA_NETWORK_TUNER
    No node found

  - Pin "Input0", direction: input
    Some supported interfaces:
      interface IKsControl
      interface IKsPin
      interface IKsPropertySet
      interface IMemInputPin
      interface IPin
      interface IQualityControl
    IKsPropertySet properties support:
    IKsControl properties support:

  - Pin "MPEG2 Transport", direction: output
    Some supported interfaces:
      interface IAMBufferNegotiation
      interface IAMStreamConfig
      interface IAMStreamControl
      interface IKsControl
      interface IKsPin
      interface IKsPropertySet
      interface IMediaSeeking
      interface IPin
      interface IQualityControl
    IKsPropertySet properties support:
    IKsControl properties support:

Variable source TS issue with speed/stuttering, can tsp add null packets?

I'm struggling with this and I'm not sure if I can do this at all, so I'd like to ask:

  • I have live IP source with filtered TS (so it's variable bit rate) or I could even take the full transponder
  • I want to output this to Dektec DTA-107, for now without further processing, but I want set different modulation parameters than used on the source (for example to convert DVB-S to DVB-S2)
  • As an parameter for the output, I set symbol rate to 30000000 for example, so it's more than the original stream
  • Then I tune into this mux on my PC with TBS tuner to analyze the TS - and in the TS, I can see tsp adds null packets, so it looks OK
  • BUT when I try to play this on my TV, i can see stuttering and errors

Any idea what's missing?

Cannot build TSDuck Binaries in

Hi,
I try to build TSDuck Binaries from source by following the tutorial

Execute the command make at top level. The TSDuck binaries, executables and shared objects (.so), are built in the src directory tree in subdirectories release-i386 and release-x86_64 for 32-bit and 64-bit platforms respectively.

But it doesn't work

make[1]: *** No rule to make target 'default'. Stop.

I can still build it by going into "src" folder and run make there

Plugin idea: T2-MI extractor

There's a simple command line tool by @newspaperman to extract the TS from a T2-MI data stream. I think this would be also a cool plugin for TSDuck. I'm not sure how to do it myself since the plugins I see and I understand are processing a single packet, but with t2-mi it's necessary to process and output multiple packets at a time, so it's not THAT easy.

I could provide various T2-MI streams to anyone interested.

Looking for frequency

I'm looking for frequency parameter inside a transport stream, but I could not find anything.

Somewhat inconsistent output from tslsdvb and tsdektec -a

There might be a reason for this but...
If I do tslsdvb and I have only one DVB tuner installed, I get

TBS 5925 DVBS2 Tuner (DVB-S)

But if I install 2 tuners, I receive

0: TBS 5922 USB DVB-S2 Tuner (DVB-S)
1: TBS 5925 DVBS2 Tuner (DVB-S)

When doing tsdektec -a with just one adapter installed, I get

0: DTA-107 (DTA-107 QPSK Modulator/Upconverter)

First issue is that I don't understand why the first command doesn't return "0: " in front of the device name. Almost seems like a bug to me. If that's on purpose, then why doesn't tsdektec -a behave the same way, why does it include 0: prefix?

Second issue, but not a bug for sure, is the fact that the output of this command can't be used as --device-name directly because the index prefix and the " (DVB-S)" part must first be stripped, which is not very intuitive.

no input signal

tsp -I dvb --frequency 11,670,000,000 --symbol-rate 29,500,000 --fec-inner 3/4 --polarity vertical --delivery-system DVB-S --modulation QPSK --satellite-number 2

i am using the code fr locking the signal but the error comes constantly

  • Error: dvb: no input DVB signal after 5,000 milliseconds

i am usong TBS 5520se dvb tuner dvb-s

please help

Any plans for a Wiki or forum?

There are so many ways how to use TSDuck, wouldn't it be beneficial to have a Wiki page or similar resource where users could share examples of what they're doing with TSDuck? I don't mean to copy the manual but to share real-life use cases. It could be also used to ask questions because I'm not sure the Issues page here is the right place to just ask about how to achieve something, seems it's more to report bugs, right?

Show dektec modulator tuning parameters?

Is it possible to print the exact tuning parameters of a modulator, most importantly the symbol rate, if it's not entered in the command line? In the example below, the symbol rate gets smartly calculated to 29102, which is great, I didn't have to specify it manually. But then the problem is that only blindscan (or a DVB bandwidth calculator) can actually tell me what's the symbol rate. Is there a way to show the resulting symbol rate (and perhaps other parameters) after running tsp?

This is my command:

tsp -v -I dvb --adapter 2 --delivery-system DVB-S2 --modulation QPSK --lnb 9750,10600,11700 --frequency 11495000000 --polarity vertical --fec-inner 9/10 --symbol-rate 44100000 --pilots on --roll-off auto -O dektec --device 1 --modulation DVB-S2-8PSK --convolutional-rate 8/9 --lnb 5150 --satellite-frequency 4095000000 --level -390 --stuffing

and output I receive

* dvb: using TBS 5922 USB DVB-S2 Tuner (DVB-S)
* dvb: tuned to transponder --frequency 11495000000 --symbol-rate 44100000 --fec-inner 9/10 --spectral-inversion auto --polarity vertical --delivery-system DVB-S2 --modulation QPSK --pilots on --roll-off auto --lnb 9750,10600,11700 --satellite-number 0
* dvb: input bitrate is 77,004,969 b/s
* dektec: using Dektec device 1, output channel 0 (DTA-107 port 1)
* dektec: output fifo size: 8,388,608 bytes, max: 8,388,608 bytes
* dektec: setting output carrier frequency to 1,055,000,000 Hz
* dektec: initial output bitrate: 77,004,969 b/s
* dektec: DTA-107 output FIFO load is 6,710,848 bytes, starting transmission

and the screenshot shows blindscan result - as you can see, the symbol rate of 29102 is nowhere to be seen in the tsp output shown above

dta-symbolrate

Possibilities for adding IP source specific addresses

There are scenarios where I would like to look at transport streams with the same address and port and filter by the source address, the DekTec tools, VLC and others allow this by using the convention [email protected]:5000

Do you think the IP input for tsduck could be extended to support this some time in the future ?

Remote IP source?

So I have a second computer with DVB tuner in another city. Over there I'm running EBSPro which can stream TCP or UDP. How do I use this as IP source for tsp at my home? When I try tsp -I ip REMOTE_PUBLIC_IP:7000, tsp outputs an error complaining that this is not a multicast IP. However, I don't want to use multicast in this case, I just want to connect to remote IP and get the TS via TCP or UDP. I'm running Windows on both ends. Thanks for ideas.

SCTE-35 injection

Hi Thierry,

TSduck is an excellent contribution to the open source community and we are very much eager in exploring the possibilities. Is there any way we can inject SCTE-35 data in to a live mpegts stream?

Also is there are an option to MUX DVB subtitles using TSDuck ?

Regards,

Jackson

tsp read commands from file

Dear Thierry,
first i'd like to ask whats the best way to give you the code of my changed PMT and MUX plugins, i added some features for my project and it would be great to have them merged in case you like them:-) Do you need to give me rights for the branching and pull request?

Second, i do create tsp command line programmatically, it can get very lengthy. More lenghty than a windows shell is able to take. Therefore it would be great if tsp was able to read the commands from file instead of parameters.
My strategy for this would be to check if the first argument is a file and if yes, then modify argc and argv accordingly. But i fear you would not like it that way (it is a bit hacky style too). So could you recommend the way and spot where you would like me to implement this?
Also sure i guess we would need some cross-platform component that is able to parse the parameters from file.

What is the best way to get values of signalLocked, signalQuality and signalStrength of BDA tuners under Windows

Hello,

First off, thank you for your hard work on this. It's useful in so many levels.

I'm developing a different kind of application than a video / audio one. Basically it consists of using an mpeg transport stream as a way of transferring any data. I'll be using tsp with plugins to output data stream from a dvb-s tuner (TBS 5922 and/or Technisat Skystar USB HD, both of which works fine under Windows for my use case). An example command line params I use are -m --debug --buffer-size-mb 1 --bitrate-adjust-interval 1 -I dvb --tune 11111:v:0:22222 -P pcrbitrate -P regulate -P filter --pid 123 -O ip 192.168.1.88:5001

I also need to get values of a unique string associated with the hw. Preferably mac address or a serial of some sort. Along with signal lock, quality and strength values.

What i tried so far is:

  1. Use tsp with params provided above. While it is running, execute tslsdvb -v. It reports signal is not locked and according to the code, when signal quality and strength are below -1, prints nothing. Then prints graph details.

  2. Just to see if it was possible within the tsplugin_dvb, I inserted a line on method size_t ts::DVBInput::receive (TSPacket* buffer, size_t max_packets) right before return.
    Which is tsp->info(u"SignalLocked=%s SignalQuality=%s SignalStrength=%s", { _tuner.signalLocked(*tsp), _tuner.signalQuality(*tsp), _tuner.signalStrength(*tsp) });.
    I did this to see the values while tsp was streaming data over network.
    It always prints * dvb: SignalLocked=0 SignalQuality=-1 SignalStrength=-1

I know that the signal is locked and tsp is working because it is streaming to ip correctly. Also some other application (TSReader Lite, for completeness) can also lock and stream data AND it can show signal stats. So it should be possible with the current BDA drivers.

What am I doing wrong? Could you point me to the right direction please?

TSP DVB Input IP Output Packet Loss

Hi,

When using tsp dvb input and ip output to ip, there is packet loss.
Video can not play well on VLC, even I increase the buffer at VLC side.

Any suggestions ?

C:\TSDuck\bin>tsp -m --debug -I dvb --tune 12336:h:0:5520 -O ip 10.20.2.233:5001
debug level set to 1

  • Debug: debug level set to 1
    trying to load C:\TSDuck\bin\tsplugin_dvb.dll
    symbol tspNewOutput not found in C:\TSDuck\bin\tsplugin_dvb.dll
    symbol tspNewProcessor not found in C:\TSDuck\bin\tsplugin_dvb.dll
    trying to load C:\TSDuck\bin\tsplugin_ip.dll
    symbol tspNewProcessor not found in C:\TSDuck\bin\tsplugin_ip.dll
  • Debug: dvb: debug level set to 1
  • Debug: ip: debug level set to 1
  • Debug: tsp: buffer size: 89,240 TS packets, 16,777,120 bytes
  • Debug: dvb: found tuner filter "TBS 5922 USB DVB-S2 Tuner"
  • Debug: dvb: trying provider filter "Microsoft ATSC Network Provider"
  • Debug: dvb: found tuning space "Local ATSC Digital Antenna" (ATSC)
  • Debug: dvb: found tuning space "Local ATSC Digital Cable" (ATSCCable)
  • Debug: dvb: failed to connect pins, status = 0x80040217, No combination of intermediate filters could be found to make the connection.
  • Debug: dvb: trying provider filter "Microsoft DVBC Network Provider"
  • Debug: dvb: no tuning space found
  • Debug: dvb: failed to connect pins, status = 0x80040217, No combination of intermediate filters could be found to make the connection.
  • Debug: dvb: trying provider filter "Microsoft DVBS Network Provider"
  • Debug: dvb: found tuning space "Default Digital DVB-S Tuning Space" (DVB-S)
  • Debug: dvb: found tuning space "Default Digital ISDB-S Tuning Space" (ISDB-S)
  • Debug: dvb: using provider filter "Microsoft DVBS Network Provider", tuning space "DVB-S" ("Default Digital DVB-S Tuning Space")
  • Debug: dvb: trying direct connection from tuner (no receiver)
  • Debug: dvb: failed to connect pins, status = 0x80040217, No combination of intermediate filters could be found to make the connection.
  • Debug: dvb: trying receiver filter "TBS 5922 USB DVB-S2 Capture"
  • Debug: dvb: trying TIF "BDA MPEG2 Transport Information Filter"
  • Debug: dvb: using TIF "BDA MPEG2 Transport Information Filter"
  • Debug: dvb: using receiver filter "TBS 5922 USB DVB-S2 Capture"
  • Debug: dvb: IBDA_DigitalDemodulator in tuner: 0
  • Debug: dvb: IBDA_DigitalDemodulator2 in tuner: 0
  • Debug: dvb: IBDA_SignalStatistics in tuner: 0
  • Debug: dvb: IKsPropertySet in tuner: 2
  • dvb: using TBS 5922 USB DVB-S2 Tuner (DVB-S)
  • Debug: dvb: tuning to transponder --frequency 12336000000 --symbol-rate 5520000 --fec-inner auto --spectral-inversion auto --polarity horizontal --delivery-system DVB-S --modulation QPSK --pilots off --roll-off 0.35 --lnb 9750,10600,11700 --satellite-number 0
  • Debug: dvb: IDVBSLocator = 2830755149040, IDVBSLocator2 = 2830755149040
  • Debug: dvb: setting IDVBSLocator2.DiseqLNBSource to 1
  • dvb: tuned to transponder --frequency 12336000000 --symbol-rate 5520000 --fec-inner auto --spectral-inversion auto --polarity horizontal --delivery-system DVB-S --modulation QPSK --pilots off --roll-off 0.35 --lnb 9750,10600,11700 --satellite-number 0
  • Debug: dvb: starting tuner reception
  • Debug: dvb: tuner reception started
  • Debug: dvb: initial buffer load: 44,620 packets, 8,388,560 bytes
  • dvb: input bitrate is 7,630,588 b/s
  • Debug: dvb: input thread started
  • Debug: ip: output thread started
  • [MON] 2017/11/01 11:38, resource monitoring started
  • [MON] 2017/11/01 11:39, VM:41 MB (+96 kB), CPU:8.20% (average:8.20%)
  • [MON] 2017/11/01 11:39, VM:41 MB (+132 kB), CPU:4.20% (average:6.23%)
  • [MON] 2017/11/01 11:39, VM:42 MB (+124 kB), CPU:4.99% (average:5.82%)
  • [MON] 2017/11/01 11:39, VM:42 MB (+108 kB), CPU:4.22% (average:5.42%)
  • [MON] 2017/11/01 11:39, VM:42 MB (-4,096 B), CPU:4.04% (average:5.15%)
  • [MON] 2017/11/01 11:39, VM:42 MB (+124 kB), CPU:2.82% (average:4.76%)
  • [MON] 2017/11/01 11:40, VM:42 MB (+120 kB), CPU:3.59% (average:4.59%)
  • [MON] 2017/11/01 11:40, VM:42 MB (+244 kB), CPU:5.47% (average:4.70%)
  • [MON] 2017/11/01 11:40, VM:42 MB (+36 kB), CPU:0.31% (average:4.22%)
  • [MON] 2017/11/01 11:40, VM:42 MB (+36 kB), CPU:2.65% (average:4.06%)
  • [MON] 2017/11/01 11:40, VM:42 MB (+132 kB), CPU:4.72% (average:4.12%)
  • [MON] 2017/11/01 11:40, VM:42 MB (+44 kB), CPU:1.41% (average:3.90%)
  • tsp: user interrupt, terminating...
  • Debug: ip: output thread aborted after 669,300 packets (669,300 output)
  • Debug: dvb: input thread aborted after 713,920 packets
  • [MON] 2017/11/01 11:41, resource monitoring terminated
  • Debug: Report logging thread terminated

image

EIT Schedule table not present

Hi Thierry,

When doing :
tsp -I ip 226.0.0.1:1234 -P tables --pid 18 --binary-output eit.bin -O drop
tstabcomp -d eit.bin -v
cat eit.xml
I only have 0x4E (Present/following) but no 0x50 (Schedule) ?

Thanks
Phil

regulate plugin no output

HI i tried to use tsp but when using regulate plugin , there is no output. Input is from a file and output is VLC via UDP

I am using 12.04 Ubuntu on virtualbox.

how to extract the NIT from ts file in xml format.

below example gives the xml format NIT from stream

from user guide extraction of NIT:
Capture a table from a stream directly in XML format
tsp -I dvb ...
-P tables --pid 16 --tid 0x40 --max 1 --xml nit.xml
-O drop
• Manually edit the XML file with a text editor

but how to extract the same from TS file.

and how to inject the same and generate stream in UDP ip?

T2-MI PLP TSes simultaneous analysis

Is it possible to do one-pass analysis of a multiple PLP T2-MI live stream?
For example I'd like to capture some tables which should have correlation in terms of time from different PLP subTSes simultaneously.

If it is not possible at the moment, what are the chances to implement this using TSDuck architecture?

I suppose the command could be the following:

tsp \
    -I [dvb|dektec|file|ip] \
    -P t2mi \
        --pid 0x1000 \
        --extract \
        --plp all \
    -P tables \
        --no-duplicate \
        --pid 18 \
        --tid 79 \
        --time-stamp \
        --xml-output EIT_other.xml \
        --text-output EIT_other.txt \
    -O drop

-I dvb - for using with DVB-S tuner.

--plp all - the new value of the --plp option I am dreaming of...
Maybe manual PLPs selection is easier to interpret, another variant: --plp 0 --plp 1 --plp 2 or --plp 0 --plp 2 or etc.

EIT_other.xml and EIT_other.txt - base names for EIT_other_plpN.txt and EIT_other_plpN.xml logs.

Looking for feedbacks on tuners - Linux or Windows

Hello TSDuck users,

You may have noticed that the TSDuck user's guide contains a chapter on hardware device support. Specifically, there is a table of "Tested DVB receiver devices".

The number of tuners available on the market is growing every year. It is virtually impossible to test them all. And no one owns them all anyway ! But choosing a tuner is a delicate matter. The level of support depends on the availability of drivers.

  • Most tuners come with a Windows driver. But DirectShow, the framework which manipulates tuners on Windows, is complicated and there is no unique standard way to use a tuner from an application.
  • On Linux, the situation is reversed. LinuxTV, the equivalent framework, is simple and robust with a unique way to handle tuners. But very few tuners come with a Linux driver. The LinuxTV community is doing its best to develop them (usually with no information at all on the hardware!) but, like any voluntary effort, this work is incomplete. Some tuners have no driver or the provided driver does not work very well.

So it seems useful to build a list of tested devices which proved to work correctly with TSDuck. This must be a collaborative effort. This issue will remain open to allow anyone to provide feedback.

Please enter a comment in this thread if you have a tuner which works with TSDuck and which is not listed in the table from the TSDuck user's guide or if your operating system is marked as "not tested" for this device.

Please provide all required information for the table:

  • Brand
  • Model
  • Modulation support (DVB-T, DVB-S, etc.)
  • Bus (USB, PCIe, etc.)
  • Tested systems (Linux, Windows)
  • Output of tslsdvb
  • Any additional remark you may find useful

I will update the TSDuck user's guide at regular intervals with the provided information.

Thank you all in advance for your cooperation.
-Thierry Lelegard, author of TSDuck

PS: I am also interested in any DVB-T tuner which works on MacOS with a fully documented API. I could not find any for now but I do not give up hope :)

How to add HEVC descriptors and processing?

I added to:

.\src\libtsduck\tsduck.dvb.names, [StreamType]:
0x24 = HEVC video

.\src\libtsduck\tsduck.dvb.names, [DescriptorId]:
0x38 = HEVC video

.\src\libtsduck\tsduck.dvb.names, [ComponentType]:
0x0900 = HEVC Main Profile high definition video, 50 Hz
0x0901 = HEVC Main 10 Profile high definition video, 50 Hz
0x0902 = HEVC Main Profile high definition video, 60 Hz
0x0903 = HEVC Main 10 Profile high definition video, 60 Hz
0x0904 = HEVC ultra high definition video

.\src\libtsduck\tsduck.dvb.names, [ServiceType]:
0x1F = HEVC digital television service

I got values from ETSI EN 300 468 1.15.1, 6.2.33 'Service descriptor', 'Table 86: Service descriptor'.

But I feel additions I made above are not enough for proper TS processing. And other modifications should be made, like addition to:

.\src\libtsduck\tsMPEG.h:
ST_HEVC_VIDEO = 0x24, //!< HEVC video

.\src\libtsduck\tsMPEG.cpp:
insertion of ST_HEVC_VIDEO into checks IsPES, IsVideoST

Raspberry Pi compiling issues: please check solutions

Hello Thierry!

First of all thank you for the project very much. I work in DVB field and I found TSDuck useful alongside professional proprietary software tools. Even more: your toolkit is very flexible.
Also I'd like to add I'm not a software developer, just code a bit for my own tasks, but it is obvious and clear fact: your project is very solid and made extremely professionally. (It's not a gross flattery, but an admiring envy :-). ) The whole project from the architecture point of view to each small comment in documentation is deeply structured, harmonized and readable. Unit tests and final packaging for a distribution are perfect. The job is well done!

I have a few questions after using TSDuck, RTFM (I hope thoroughly) and looking across the code. Please read below (and I'll post a couple of issues/requests later):

I've got (and solved?) Rasberry Pi compilation problems, latest TSDuck release 3.6-439.

Hardware: Rasberry Pi 3 Model B V1.2
System software: Rasbian 8
Input device: USB DVB-T2 tuner PCTV nanoStick T2 (290e)

$ uname -a
Linux dvb-pi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
  1. Compilation error, tsIPAddress.cpp:
[CXX] tsIPAddress.cpp
tsIPAddress.cpp: In constructor 'ts::IPAddress::IPAddress(const sockaddr&)':
tsIPAddress.cpp:56:77: error: cast from 'const sockaddr*' to 'const sockaddr_in*' increases required alignment of target type [-Werror=cast-align]
         const ::sockaddr_in* sp = reinterpret_cast<const ::sockaddr_in*> (&s);
                                                                             ^
tsIPAddress.cpp: In member function 'void ts::IPAddress::copy(sockaddr&, uint16_t) const':
tsIPAddress.cpp:78:62: error: cast from 'sockaddr*' to 'sockaddr_in*' increases required alignment of target type [-Werror=cast-align]
     ::sockaddr_in* sp = reinterpret_cast< ::sockaddr_in*> (&s);
                                                              ^
tsIPAddress.cpp: In member function 'bool ts::IPAddress::resolve(const ts::UString&, ts::Report&)':
tsIPAddress.cpp:146:86: error: cast from 'sockaddr*' to 'const sockaddr_in*' increases required alignment of target type [-Werror=cast-align]
         const ::sockaddr_in* sp = reinterpret_cast<const ::sockaddr_in*> (ai->ai_addr);
                                                                                      ^
cc1plus: all warnings being treated as errors
../../Makefile.common:802: recipe for target 'release-arm/tsIPAddress.o' failed
make[2]: *** [release-arm/tsIPAddress.o] Error 1

SOLUTION: comment/delete -Wcast-align in Makefile.common.

1.1. Is it wrong or critical modification?

  1. Compilation/linking error, tsduck.so:
[CC] release-arm/tsduck.so
/usr/bin/ld: ../../dektec/LinuxSDK/DTAPI/Lib/GCC4.4/DTAPI.o: Relocations in generic ELF (EM: 3)
...
... # (a lot of 'DTAPI.o: Relocations in generic ELF (EM: 3)' messages )
...
/usr/bin/ld: ../../dektec/LinuxSDK/DTAPI/Lib/GCC4.4/DTAPI.o: Relocations in generic ELF (EM: 3)
../../dektec/LinuxSDK/DTAPI/Lib/GCC4.4/DTAPI.o: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Makefile:111: recipe for target 'release-arm/tsduck.so' failed
make[2]: *** [release-arm/tsduck.so] Error 1

SOLUTION: exclude Dektec support.
a) Delete/comment dtapi: section in Makefile.
b) Delete ./dektec folder.

2.1. Is it possible to fix the point 2 properly and to use Dektec USB devices with Raspberry Pi?

How to select PLP while tuning/scanning RF-signal?

I realize that:

  • Windows doesn’t have unified mechanism for the PLP selection, each DVB-tuner driver has its own implementation of such a mechanism.
  • OS X/macOS – doesn’t work with DVB-devices quite at all.
  • Only Linux has TV framework/subsystem.

I use USB DVB-T2 tuner PCTV nanoStick T2 (290e) supported by Linux kernels and it has multiple PLP functionality. For example VLC for Linux is able to select given PLP.

Is it possible to lock frequency and specified PLP by Linux version of TSDuck?

Bitrate monitor fails to display bitrate when exceeding limit

Running the bitrate monitor like:

tsp -I ip -l 192.168.20.2 239.1.1.1:5000 -P bitrate_monitor 221 -t 1 --min 3000000 --max 3000000 -O drop

When the bitrate is lower than the limit the actual bitrate is displayed, but when over the limit the detail is missing, see example output below:

  • Warning: bitrate_monitor: is greater than allowed maximum (3,000,000 bits/s)
  • Warning: bitrate_monitor: pid 221 (0x00DD) - bitrate (2,961,376 bits/s) is lower than allowed minimum (3,000,000 bits/s)

Apart from this minor issue they are great tools and look very useful.

Announce: Transport streams repository

Hi dear TSDuck users,

I have opened a new Web hosting for TSDuck at tsduck.io. Because of the much larger storage space, I have started a repository of some interesting transport stream files. Follow the menus at Download then Streams repository (direct link)

Some of them were captured by me, some others were provided by TSDuck users.

This is just a beta. There is currently no upload facility (quite tricky to arrange this in a secure way). So, please continue to provide files using public file transfer systems when needed and I will manually transfer interesting files in the repository.

Static Build

Hi,

Is it possible to static build tools under Windows ? Such as tsp.

Kind Regards,

Raspberry PI / ARM compiling error

Advise

replace const uint16_t& proxyPort() with uint16_t proxyPort() in line 262 of tsWebRequest.h.

how to solve new error from #17 doesn't work on my system. I've got new error message:

  [CXX] tsGitHubRelease.cpp
In file included from tsGitHubRelease.cpp:48:0:
tsWebRequest.h:262:36: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers]
         const uint16_t proxyPort() const { return _proxyPort == 0 ? _defaultProxyPort : _proxyPort; }
                                    ^
cc1plus: all warnings being treated as errors
../../Makefile.common:806: recipe for target 'release-arm/tsGitHubRelease.o' failed
make[2]: *** [release-arm/tsGitHubRelease.o] Error 1

GCC version:

$ gcc --version
gcc (Raspbian 4.9.2-10) 4.9.2

The distro:

$ cat /etc/debian_version
8.0

$ cat /etc/issue.net
Raspbian GNU/Linux 8

$ cat /etc/rpi-issue
Raspberry Pi reference 2017-07-05

This is an original Rasbian based on Debian 8 (Jessie).

HLS Support

TSDuck is great how hard would it be to support an HLS stream?

tsp: ip(input): Second IP input can't use a multicast group with the same port number

Linux: tsduck-3.9-619.fc27.x86_64

# tsp -m -I ip 224.168.16.211:2000 -P analyze -i3 --normalized -O drop
..... everything ok...

Start a second tsp on the same host

# tsp -m -I ip 224.168.16.222:2000 -P analyze -i3 --normalized -O drop
* Error: ip: error binding socket to local address: Address already in use

On a related note the way the ip input module currently works with multicast on linux results in sending igmp joins on all interfaces, regardless of the routing table, which is not how multicast usually works. eg for comparison see the way multicat or socat work

tsanalyze: tsAVCParser.h:111: size_t ts::AVCParser::remainingBits() const: Assertion `_byte <= _end' failed.

Hi,
Attached is a piece of stream that crashes tsanalyze from a locally built tsduck on f27
tsduck-3.10-636.fc27.x86_64 . Gzipped because github

(gdb) bt
#0  0x00007f42cae66660 in raise () from /lib64/libc.so.6
#1  0x00007f42cae67c41 in abort () from /lib64/libc.so.6
#2  0x00007f42cae5ef7a in __assert_fail_base () from /lib64/libc.so.6
#3  0x00007f42cae5eff2 in __assert_fail () from /lib64/libc.so.6
#4  0x00007f42cc811eb5 in bool ts::AVCParser::readBits<unsigned char, (void*)0>(unsigned char&, unsigned long) () from /usr/bin/tsduck.so
#5  0x00007f42cc8126e1 in ts::AVCSequenceParameterSet::parseBody(ts::AVCParser&) () from /usr/bin/tsduck.so
#6  0x00007f42cc81a480 in ts::AbstractAVCAccessUnit::parse(void const*, unsigned long) () from /usr/bin/tsduck.so
#7  0x00007f42cc81514e in ts::AVCSequenceParameterSet::AVCSequenceParameterSet(void const*, unsigned long) () from /usr/bin/tsduck.so
#8  0x00007f42cc8103e0 in ts::AVCAttributes::moreBinaryData(void const*, unsigned long) () from /usr/bin/tsduck.so
#9  0x00007f42cc90506e in ts::PESDemux::processPESPacket(unsigned short, ts::PESDemux::PIDContext&) () from /usr/bin/tsduck.so
#10 0x00007f42cc9053f9 in ts::PESDemux::processPacket(ts::TSPacket const&) () from /usr/bin/tsduck.so
#11 0x00007f42cc9057b4 in ts::PESDemux::feedPacket(ts::TSPacket const&) () from /usr/bin/tsduck.so
#12 0x00007f42cc96b7eb in ts::TSAnalyzer::feedPacket(ts::TSPacket const&) () from /usr/bin/tsduck.so
#13 0x00007f42c6403f46 in ts::AnalyzePlugin::processPacket(ts::TSPacket&, bool&, bool&) () from /usr/bin/tsplugin_analyze.so
#14 0x0000000000406730 in ts::tsp::ProcessorExecutor::main() ()
#15 0x00007f42cc9a86ae in ts::Thread::ThreadProc(void*) () from /usr/bin/tsduck.so
#16 0x00007f42cb95950b in start_thread () from /lib64/libpthread.so.0
#17 0x00007f42caf2716f in clone () from /lib64/libc.so.6

ekcrash.ts.gz

New presentation "introduction to MPEG transport streams"

Dear TSDuck users,

I have added a new presentation in the doc subdirectory named "an introduction to MPEG transport streams - all you should know before using TSDuck" (direct link to PDF, PowerPoint).

Nothing new here, just old stuff. The presentation is just a extract of various presentations I made in the past years. But this may be a useful introduction.

Feel free to post your feedback in this thread.

descrambler - PID selection?

Alright so let's say I have a basic DVB scrambler which scrambles all PIDs, including PMT, Video, Audio. I'm doing the scrambling, so I know the control word - it's constant, not changing. A regular receiver can't decrypt PMTs, so I would like to use TSDuck to decrypt PMT but pass everything else encrypted to the output and let the receiver handle the rest (decryption of all A/V PIDs). This is just an example, I could also want to decrypt other PIDs. But right now I can't see this as possible, unless I'm not getting something.

Dektec DTA-107S2 parameters ignored?

I'm getting very low power (-47dBm) output from DTA-107 modulator. Had the same issue with Dektec's Streamxpress but after installing Dektec SDK, I'm getting full power in Streamxpress but still very weak from TSDuck. Haven't tested another OS, just W2008R2SP1.

Add support for another table ?

Hi,
First, thanks for this amazing software ! I've just downloaded it and couldn't test it yet, but it really looks incredible !
What would be the steps to add interactive applications manipulation to tsduck ? For example, implementing a plugin listing all applications for a given service. From what I could see, it would require to:

  • Implement AIT and its descriptors (defined in ts 102 809)
  • Add a plugin (applist ?) to the list of plugins

Is this the right way to go ? Or I am maybe looking to do something already possible.

IP output via VPN stream errors

I don't think this is TSDuck issue but maybe there's something in TSDuck that could help me overcome a problem I'm having or at least get some ideas from smarter people here.

I have TSDuck running at LOCATION-1 and the output is IP. When I play the UDP stream locally at LOCATION-1 in VLC, it's all smooth and error free. But when I use the destination IP of a computer at LOCATION-2, I get errors in the stream when I play this one from LOCATION-2.

Locations 1 and 2 are connected over SSTP VPN between 2 Mikrotik routers and the bandwidth is good enough (10Mbps+), yet even a 3Mbps video stream fails to play without errors. I did try to change TTL and packets on the output IP stream but that didn't seem to help.

First I'd like to ask for an idea how to analyze the incoming stream, to see what's wrong. Could you please suggest some tools that you'd consider good for such analysis, to find the cause of the errors? To see what I mean, I also attach a file with a sample captured stream.
telecaribe.zip

Then I also think the issue might simply be UDP over VPN not being reliable. But in such case, would there be another way to deliver the output from TSDuck over the internet to another TSDuck client (or directly a player like VLC)?

Thanks!

Sync pts among mpeg files.

Hi Thierry,
I'd like to insert a static ts file into a middle of a bunch of ts stream.
ts stream here is that is segmented from original source file in order to stream with apple HLS format.
The big problem is how to sync pts among them to make the decoder still aware of that still a stream. For example, I have 3 ts files. (file1.ts file2.ts, ad.ts). I want to insert ad ts file between file1.ts and file2.ts. In order to do that, I need to make sure the first pts of ad.ts is the last pts of file1.ts and the last pts of ad.ts is the first ts of file2.ts. Do you think, I can use tsduck to finish this task.
Thanks,
Tam

Detection of SCTE 35 cue messages in TS

Is it possible to add detection of SCTE 35 cue messages (signalling for ad insertion, TS marking and segmentation)?

Is it enough for the detection just to add the following descriptors?

  • .\src\libtsduck\tsduck.dvb.names, [StreamType]:
    0x86 = SCTE 35

SCTE 35, 9.5.1. 'Constraints on splice_info_section()'.

  • .\src\libtsduck\tsduck.dvb.names, [TableId]:
    0xFC = SCTE 35 splice info

SCTE 35, 9.2. 'Splice info section', Table 5.

  • Also I haven't added PMT registration descriptor:

The registration descriptor shall be carried in the program_info loop of the PMT for each program that complies with this standard.

SCTE 35, 8.1. 'Registration descriptor' and Table 1 'registration_descriptor()'.

Should SCTE 35 registration descriptor be added to .\src\libtsduck\tsduck.xml or somewhere else?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.