Jump to content

SAT>IP


Schimi

Recommended Posts

Guest Diefenthal

emby Need some more devs  for satip implementation

 

this is really much stuff to write  to much for an one man show

Edited by Diefenthal
Link to comment
Share on other sites

I think it will :)

Sure? :)

No I am pretty sure it will.

 

And if it's difficult. We will work on that idea, until it works. :)

Link to comment
Share on other sites

Guest Diefenthal

@@Sven would you help luke there out by implementation for satip Support

 

or are you not an part of Lukes Plan

Edited by Diefenthal
Link to comment
Share on other sites

No comment on that. :)

It's just some R&D. So for now you will need to use everything what you can find.

 

Maybe some other solution in the future. Or not.... So that's the question. :)

Link to comment
Share on other sites

Guest Diefenthal

the question is more would you use my quick an dirty code  or not

if not, are informations to the HW and there Problems welcome or not

 

for me is it no Problem if you || && luke want search and go an own way

Link to comment
Share on other sites

We indeed work from scratch.But information about HW and problems are always welcome.

We just don't want to  give information to the Emby users before we have an acceptable result. If we can get an acceptable result.

Link to comment
Share on other sites

Guest Diefenthal

I do not use emby, so I am not an emby user ;-) and had only registered to help with the implementation for sat> Ip, with the result not enough developers to realize this ( and yes i had you since ask too)

the complete Story can you read on the last 10 thread sites

 

if you Need some info can you ask me over mail

 

Edited by Diefenthal
Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
Guest Diefenthal

think here are many users that could help

but there is no result  for testers  and since April had i nothing heard from sven or luke  over their own implementation

Edited by Diefenthal
Link to comment
Share on other sites

  • 2 weeks later...
Sven

think here are many users that could help

but there is no result  for testers  and since April had i nothing heard from sven or luke  over their own implementation

 

We have some problems. But we try to solve them.... :)

cc: @@Luke

Link to comment
Share on other sites

  • 3 months later...
Guest Diefenthal

i Think no

 

there are some Problems to get enough man power with the knowlege of MPGTS DVB 

 

for usage of Cinegy/TsDecoder is some addidtional work needed Descriptor Table Coding ,ok i try to help there  but my spare time is currently rare

the Problem there is they had no live source for receiving the DVB MPGTS and can only test the code over TS File Dumps

Edited by Diefenthal
Link to comment
Share on other sites

i Think no

 

there are some Problems to get enough man power with the knowlege of MPGTS DVB 

 

for usage of Cinegy/TsDecoder is some addidtional work needed Descriptor Table Coding ,ok i try to help there  but my spare time is currently rare

the Problem there is they had no live source for receiving the DVB MPGTS and can only test the code over TS File Dumps

 

If one of the programmers want to have access to an tvheadend setup with dvb-c for testing , I can make my setup available ?

Link to comment
Share on other sites

Guest Diefenthal

the currently Problem is that there is no one 

 

sure i know how it working ssdp rtsp rtp rtcp (Basis mpeg2ts parsing) but my knowlege is limited too

i try to help here but i studdy my self  in try an error way with many ways how it not will work and this all in my spare time  so is it an really slow Progress

 

what emby Needs is an Team of Devs with Access to dvb and PitBull Character  for parsing, sure remote sessions is an way but it is not the optimal way

 

Sven cant help but with only analog Signal

Luke had offer some time ago to Setting up an digital Signal Source (Satellite?) but i can nothing more say to this

 

from the internal test from me with TsDecoder

 

here my result

 

with the first tune creates a rtsp session with Setup ( with that become we an sessionid and the ports for receiving of meta (rtcp) and mediadata( rtp )

is a rtsp session created Need you only Play for changes of Tuning informations or pids

 

this that what this code make

RtspStatusCode statuscode;
                    if (string.IsNullOrEmpty(_device.RtspSession.RtspSessionId))
                    {
                        statuscode = _device.RtspSession.Setup(tuning, TransmissionMode.Unicast);
                        if (statuscode.Equals(RtspStatusCode.Ok))
                        {
                            _udpclient = new UdpClient(_device.RtspSession.RtpPort);
                            _remoteEndPoint = new IPEndPoint(IPAddress.Any, 0);
                            _device.RtspSession.SignalInfo += new RtspSession.SignalInfoHandler(RtspSession_SignalInfo);

                        }
                        else
                        {
                            var message = GetMessageFromStatuscode(statuscode);
                            MessageBox.Show(String.Format("Setup retuns {0}", message), statuscode.ToString(), MessageBoxButtons.OK);
                        }
                        _device.RtspSession.Play(tuning);
                    }
                    else
                    {
                        _device.RtspSession.Play(tuning);
                    }
after the rtsp Play sends the Server rtp rtcp packets to specified ports but the rtp packetes can only contain the Rtp Header 12 Bytes with out payload

after this step ask we for an Signal lock

statuscode = _device.RtspSession.Describe();

                    if (_locked)
{
}
nextstep is

 

to receiving the data and push the payload into the Decoder

while ((!patfound) || (!pmtsfound) || (!sdtfound))
                        {
                            var receivedbytes = _udpclient.Receive(ref _remoteEndPoint);
                            if ((receivedbytes.Length > 12) && ((receivedbytes.Length - 12) % 188) == 0)
                            {
                                _decoder.AddData(receivedbytes);
                            }
                        }         
you see there had i used flags for PAT (pid=0) PMTS(pids from Pat) SDT(pid 17)

solong one of they are false feed we the Decoder

here see you now the Event from Decoder that inform us what is received

i had it used to set the flags to true and Change the pids for the next tabels

 

in the initial tune is pid =0 used seeing on top where Setup an Play is used

if we had the pat send i here Play (delpids=0) tell the Server we had an pat recieved and want now the PMTS see foreach

you see there too Play(addpids=17) that informs the server that we want the SDT too

private void _decoder_TableChangeDetected(object sender, TableChangedEventArgs args)
        {
            //Called for Pat and Nit 
            if (args.TableType == TableType.Pat)
            {
                patfound = true;
                SetControlPropertyThreadSafe(lblPat, "BackColor", Color.Green);
                _device.RtspSession.Play("&delpids=0");
                foreach (short pid in _decoder.ProgramAssociationTable.Pids)
                { _device.RtspSession.Play(string.Format("&addpids={0}", pid)); }
                _device.RtspSession.Play("&addpids=17");
            }
            else if (args.TableType == TableType.Pmt)
            {                 
                _device.RtspSession.Play(string.Format("&delpids={0}", args.TablePid));
                
            }
            else if (args.TableType == TableType.Sdt)
            {
                pmtsfound = true;
                SetControlPropertyThreadSafe(lblPmt, "BackColor", Color.Green);
                sdtfound = true;
                SetControlPropertyThreadSafe(lblSdt, "BackColor", Color.Green);
                _device.RtspSession.Play(string.Format("&delpids={0}", args.TablePid));
                
            }
            else if (args.TableType == TableType.Nit)
            {
                nitfound = true;
                SetControlPropertyThreadSafe(lblNit, "BackColor", Color.Green);
                _device.RtspSession.Play(string.Format("&delpids={0}", args.TablePid));
                
            }
        }
that was the Controlling part

 

the other is now the reading and usage of the table data

lock(_decoder)
                        {
                            programMapTables = _decoder?.ProgramMapTables.OrderBy(p => p.ProgramNumber).ToList();
                            foreach (var programMapTable in programMapTables)
                            {
                                short videoPid =0;
                                short audioPid = 0;
                                var desc = _decoder.GetServiceDescriptorForProgramNumber(programMapTable?.ProgramNumber);
                                if (desc != null)
                                {
                                    if (programMapTable?.EsStreams != null)
                                    {
                                        foreach (var stream in programMapTable.EsStreams)
                                        {
                                            if (stream != null)
                                            {
                                                switch (stream.StreamType)
                                                {
                                                    case 0x01: // ISO/IEC 11172-2 (MPEG-1 video) in a packetized stream
                                                    case 0x02: // ITU-T Rec. H.262 and ISO/IEC 13818-2 (MPEG-2 higher rate interlaced video) in a packetized stream
                                                    case 0x1B: // ITU-T Rec. H.264 and ISO/IEC 14496-10 (lower bit-rate video) in a packetized stream                                                        
                                                    case 0x24: // ITU - T Rec.H.265 and ISO/ IEC 23008 - 2(Ultra HD video) in a packetized stream
                                                        {
                                                            videoPid = stream.ElementaryPid;
                                                            break;
                                                        }
                                                    case 0x03: // ISO/IEC 11172-3 (MPEG-1 audio) in a packetized stream
                                                    case 0x04: // ISO/IEC 13818-3 (MPEG-2 halved sample rate audio) in a packetized stream
                                                    case 0xC1: // Dolby Digital up to six channel audio with AES-128-CBC data encryption in a packetized stream
                                                        {
                                                            audioPid = stream.ElementaryPid;
                                                            break;
                                                        }
                                                    default:
                                                        { Console.Write(stream.StreamType.ToString()); break; }
                                                        
                                                }
                                            }
                                        }
                                    }
                                    Channel chan = new Channel
                                    {
                                        ServiceType = desc.ServiceType,
                                        ServiceName = desc.ServiceName.Value,
                                        ServiceProvider = desc.ServiceProviderName.Value,
                                        ServiceId = programMapTable.ProgramNumber,
                                        ProgramClockReferenceId = programMapTable.PcrPid,
                                        AudioPid = audioPid,
                                        VideoPid = videoPid,                                    
                                    };
                                    AddResults(chan);                                    
                                }                                
                            }
in short sure the most data get we but all AC3 EAC3 AAC pids are not mapped to Service and that is the Problem why i try to help the Cinegy devs by descriptor coding is that done look it as possible way for usage and for emby too Edited by Diefenthal
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...