Jump to content

SatIp Discovery Bug


Guest Diefenthal

Recommended Posts

pünktchen

i had it investigate and fixed in the master

and lose the interesting to help here out

 

if i get an new question as answer to my question

 

good luck

i am out

 

if you can delete this acount

What the hell is going on with you Kai?

You are the one who has pushed the Sat/Ip implemention and now if don't get an expected answer you quit?

By not taking your code doesn't mean @@Luke doesn't appreciate your help on this.

 

This attitude is probably one of the reasons why your ideas didn't get that much attention from MediaPortal, ArgusTV and NextPVR!

Edited by pünktchen
Link to comment
Share on other sites

pünktchen

Be nice. He has been extremely helpful, and I hope he comes back.

Just wanted to say i'm also not always happy with your answers/no answers (guide loading problem [emoji6] ),

but i'm still here because i love the Emby project as a whole!

Link to comment
Share on other sites

Guest Diefenthal

What the hell is going on with you Kai?

You are the one who has pushed the Sat/Ip implemention and now if don't get an expected answer you quit?

By not taking your code doesn't mean @@Luke doesn't appreciate your help on this.

 

This attitude is probably one of the reasons why your ideas didn't get that much attention from MediaPortal, ArgusTV and NextPVR!

diese aussage zeigt nur das du mich nicht kennst ....

komisch das ich mit Greame (Npvr er nutzt meinen rtsp stack) oder Prog (von ProgDVB ernutzt den ssdp code) oder so manchen unter anderem mit MM1352000( Mediaportal ) Steve (Epgcollector)  einen regen kontakt habe

achja und Nico von Argutv will keinen Netzwerk Tuner Support

hoffe das ich nun keinen vergessen habe .... wenn ja dann sorry for that

und das nur um das Sat>Ip  einwenig zu pushen

es geht nicht darum ob sie meinen code nutzen oder nicht

es geht um eine saubere Implementierung so das jedes gerät dann ohne Probleme dann läuft

nur wenn man den code auseinander nimmt was in dem fall ein paar stunden in zeit nehmen kann (denn ich versuche in der regel den code des Entwicklers lauffähig zubekommen)

und wenn es dann nach stunden in dem fall 8  nicht zum laufen zubewegen ist und es mit meinem läuft bekommt der dev meinen als reference um selber mal zu schauen

habe zwar zugesagt zu helfen aber es sollte nicht mein Lebensinhalt werden somit muss man manchmal eine Reißleine ziehen

um anderen helfen zu können SichboPVR nur mal so als Beispiel

Edited by Diefenthal
Link to comment
Share on other sites

rechner123

i had it investigate  and fixed in the master

and  lose the interesting to help here out

 

if i get an new question as answer to my question

 

good luck

i am out

 

if you can delete this acount

This is too Bad.

Link to comment
Share on other sites

pünktchen

@ Okay dann entschuldige ich mich hiermit offiziell bei dir!!! Von Außen sieht das eben anders für mich aus, da du überall Threads beginnst und dann ist auf einmal Schluß. Kann natürlich nicht wissen was im Hintergrund abläuft...

 

Sorry for german.

Link to comment
Share on other sites

  • 2 weeks later...
Nikolaech

@ Diefenthal ;  Luke did it. Thank you both. :)  ES beta 3.0.5925 the parameters are determined automatically.

 

9299446.png

9285110.png

The channels, however yet do not work. Perhaps due to the syntax rtspchannels.m3u. Need to check.

Link to comment
Share on other sites

Guest Diefenthal

@ Diefenthal ;  Luke did it. Thank you both. :)  ES beta 3.0.5925 the parameters are determined automatically.

 

9299446.png

9285110.png

The channels, however yet do not work. Perhaps due to the syntax rtspchannels.m3u. Need to check.

thank @@Luke for that

i had nothing todo with it

Link to comment
Share on other sites

Thank you both. Glad to hear it. Now for the hard part.

 

Given a detected server (url), we need to figure out how to get a list of available channels.

  • Like 1
Link to comment
Share on other sites

Nikolaech

.Given a detected server (url), we need to figure out how to get a list of available channels.

Channels finds - does not play.

 

9251076.png

 

 

tried

9293063.png

#EXTINF:-1,Orion Express - Первый Канал
#EXTVLCOPT:program=101
rtsp://localhost:554/?src=1&freq=12640&msys=dvbs&plts=off&fec=56&pol=v&ro=0.35&sr=30000&mtype=qpsk&tnr=1,12640,30000,10600,1,1,0,4,2101,1101,101,101,1,0,25,0,7,1,-1&pids=0,16,17,18,20,101,1101,151,2101
#EXTINF:-1,Orion Express - Первый Канал HD
#EXTVLCOPT:program=92
rtsp://localhost:554/?src=1&freq=11960&msys=dvbs2&plts=off&fec=35&pol=h&ro=0.35&sr=28800&mtype=8psk&tnr=1,11960,28800,10600,1,0,0,7,2902,1902,902,92,6,0,25,0,15,1,-1&pids=0,16,17,18,20,902,1902,33,2902,3902

#EXTINF:-1,Orion Express - Первый Канал
rtsp://localhost:554/?src=1&freq=12640&msys=dvbs&plts=off&fec=56&pol=v&ro=0.35&sr=30000&mtype=qpsk&tnr=1,12640,30000,10600,1,1,0,4,2101,1101,101,101,1,0,25,0,7,1,-1&pids=0,16,17,18,20,101,1101,151,2101


#EXTINF:-1,Orion Express - Первый Канал
src=1&freq=12640&msys=dvbs&plts=off&fec=56&pol=v&ro=0.35&sr=30000&mtype=qpsk&tnr=1,12640,30000,10600,1,1,0,4,2101,1101,101,101,1,0,25,0,7,1,-1&pids=0,16,17,18,20,101,1101,151,2101

does not play.

Link to comment
Share on other sites

Nikolaech

For those who do not know. Recording Service (DVBVierwer) automatically can create upnp and rtsp playlists.
rtsp


9292132.png

 


upnp

 


9285988.png

 

 

 

Showing the way Embu.
rtsp
9255268.png
upnp
9246052.png
file .m3u (upnp)
9265511.png
I tried in different ways. In all cases, the channels are there, but not playing.
Tried to edit and rtsp playlist, leaving only the necessary options.
src=1&freq=11800&msys=dvbs2&fec=23&pol=h&sr=28800&pids=0,16,17,18,20,1408,3408,4408

 

add the tuner M3U (file .m3u (upnp))
9248103.png
play OK (only upnp tuner M3U)

 

That's all what I can to help you.

Edited by Nikolaech
Link to comment
Share on other sites

Guest Diefenthal

Glad to see that this project have resumed,  :)

 Not really

 

sure i had Play on some things but alone is there no way to handle this complex thing (Sparetime Limitation)

 

and i dont mean the solution for emby for that are far far far far away

if anyone help  to write the code for TS Tables and the descriptos  can it be faster 

an entry is there https://github.com/Diefenthal/SatIp

 

the Main Scan Loop

private void worker_DoWork(object sender, DoWorkEventArgs e)
        {
            
            _udpclient = new UdpClient(40000);
            IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, 0);
            while (!worker.CancellationPending)
            {
                string source = "1";
                string tuning;
                IniReader reader = new IniReader(_file);
                var Index = 1;
                var Count = reader.ReadInteger("DVB", "0", 0);
                while (Count > Index)
                {
                    _programMapTables = new Dictionary<int, ProgramMapTable>();
                    var Current = reader.ReadString("DVB", Index.ToString());
                    var strArray = Current.Split(new char[] { ',' });
                    if (strArray[4] == "S2")
                    {
                        tuning = string.Format("src={0}&freq={1}&pol={2}&sr={3}&fec={4}&msys=dvbs2&mtype={5}&plts=on&ro=0.35", source, strArray[0].ToString(), strArray[1].ToLower().ToString(), strArray[2].ToLower().ToString(), strArray[3].ToString(), strArray[5].ToLower().ToString());
                    }
                    else
                    {
                        tuning = string.Format("src={0}&freq={1}&pol={2}&sr={3}&fec={4}&msys=dvbs&mtype={5}", source, strArray[0].ToString(), strArray[1].ToLower().ToString(), strArray[2].ToString(), strArray[3].ToString(), strArray[5].ToLower().ToString());
                    }
                    ScanFrequency(tuning,remoteEndPoint);

                    Index++;
                }
            }
        }

holds the Session Open

void _keepalive_Tick(object sender, EventArgs e)
        {
            _rtspDevice.RtspSession.Options();
        }

Scan one Transponder

private void ScanFrequency(string tuning, IPEndPoint remoteEndPoint)
        {
            if (string.IsNullOrEmpty(_rtspDevice.RtspSession.RtspSessionId))
            {
                _rtspDevice.RtspSession.Setup(tuning + "&pids=0", _transmissionMode.ToString().ToLower());
            }
            else
            {
                _rtspDevice.RtspSession.Play(tuning + "&pids=0");
            }
            _keepalive = new Timer();             
            _keepalive.Interval = _rtspDevice.RtspSession.RtspSessionTimeToLive;
            _keepalive.Tick += new EventHandler(_keepalive_Tick);
            _keepalive.Start();
            _rtspDevice.RtspSession.Play("addpids=0");
            
            GetPAT(_udpclient, remoteEndPoint);
            if (_programAssociationTable != null)
            {
                foreach (var program in _programAssociationTable.Programs)
                {
                    //Say the Sat>IP server we want Receives the ProgramMapTable for Pid x                            
                    _rtspDevice.RtspSession.Play(string.Format("addpids={0}", program.Pid));
                    GetPMT(_udpclient, remoteEndPoint, program.Pid);
                }
            }
            //Say the Sat>IP server we want Receives the ServiceDescriptionTable 
            //_rtspDevice.RtspSession.Play("addpids=17");
            //GetSDT(_udpclient, remoteEndPoint);
            _programAssociationTable = null;
            _programMapTables.Clear();
            //_serviceDescriptionTable = null;
        }

Get the ProgramAssociationTable  for Transponder

private void GetPAT(UdpClient client,IPEndPoint endpoint)
        {
            //if (_programAssociationTable == null)
            //    _programAssociationTable = new ProgramAssociationTable();
            bool patfound = false;
            while (!patfound)
            {
                var receivedbytes = client.Receive(ref endpoint);
                //Reads the RTP Header
                //RtpHeader rtpheader = new RtpHeader(receivedbytes);
                //Console.WriteLine(rtpheader.ToString());
                if ((receivedbytes.Length > 12) && ((receivedbytes.Length - 12) % 188) == 0)
                {
                    double num9 = (((double)(receivedbytes.Length - 12)) / 188.0) - 1.0;
                    for (double j = 0.0; j <= num9; j++)
                    {
                        byte[] destinationarray = (byte[])Array.CreateInstance(typeof(byte), 188);
                        Array.Copy(receivedbytes, (int)Math.Round((double)(12.0 + (j * 188))), destinationarray, 0, 188);
                        while (_programAssociationTable == null)
                        {
                            if (destinationarray[0] == 0x47 && destinationarray.Length >= 188 && (destinationarray[1] & 15) == 0 && destinationarray[2] == 0x00 && destinationarray[5] == 0x00)
                            {
                                //Reads the TsHeader
                                var tsheader = new TsHeader(destinationarray);
                                //Decode the Table                        
                                _programAssociationTable = ProgramAssociationTable.Decode(tsheader.PayloadUnitStartIndicator, tsheader.PayLoadStart, destinationarray);

                                Console.Write(_programAssociationTable.ToString());
                                //Say the Sat>IP server we want not more receives the ProgramAssociationTable
                                _rtspDevice.RtspSession.Play("delpids=0");
                                _programMapTables = new Dictionary<int, ProgramMapTable>();
                                patfound = true;
                            }
                        }
                    }
                }
            }
        }

Get the Program MapTables(for Each Service from Program Association Table)  for Transponder

private void GetPMT(UdpClient client,IPEndPoint endpoint, int pid)
        {
            //if (_programMapTables == null)
            //    _programMapTables = new Dictionary<int, ProgramMapTable>();
            var receivedbytes = client.Receive(ref endpoint);
            //Reads the RTP Header
            //RtpHeader rtpheader = new RtpHeader(receivedbytes);
            //Console.WriteLine(rtpheader.ToString());
            if ((receivedbytes.Length > 12) && ((receivedbytes.Length - 12) % 188) == 0)
            {
                double num9 = (((double)(receivedbytes.Length - 12)) / 188.0) - 1.0;
                for (double j = 0.0; j <= num9; j++)
                {
                    byte[] destinationarray = (byte[])Array.CreateInstance(typeof(byte), 188);
                    Array.Copy(receivedbytes, (int)Math.Round((double)(12.0 + (j * 188))), destinationarray, 0, 188);
                    if ((destinationarray[0] == 0x47 && destinationarray.Length >= 188  && destinationarray[5] == 0x02))
                    {
                        //Reads the TsHeader
                        var tstheader = new TsHeader(destinationarray);
                        //Console.Write(tstheader.ToString());
                        //Decode the Table                            
                        var programMapTable = ProgramMapTable.Decode(tstheader.PayloadUnitStartIndicator, tstheader.PayLoadStart, destinationarray);                        
                        if (!_programMapTables.ContainsKey(programMapTable.ProgramNumber))
                        {
                            _programMapTables.Add(programMapTable.ProgramNumber, programMapTable);
                            Console.Write(programMapTable.ToString());
                            //Say the Sat>IP server we want not more Receives the ProgramMapTable for Pid x
                            _rtspDevice.RtspSession.Play(string.Format("delpids={0}", tstheader.Pid));

                        }
                    }

                }
            }
            
        }





 

Get the ServiceDescription Table for Transponder 

private void GetSDT(UdpClient client, IPEndPoint endpoint)
        {
            //if (_serviceDescriptionTable == null)
            //    _serviceDescriptionTable = new ServiceDescriptionTable();
            bool sdtfound = false;
            while (!sdtfound)
            {
                var receivedbytes = client.Receive(ref endpoint);
                //Reads the RTP Header
                //RtpHeader rtpheader = new RtpHeader(receivedbytes);
                //Console.WriteLine(rtpheader.ToString());
                if ((receivedbytes.Length > 12) && ((receivedbytes.Length - 12) % 188) == 0)
                {
                    double num9 = (((double)(receivedbytes.Length - 12)) / 188.0) - 1.0;
                    for (double j = 0.0; j <= num9; j++)
                    {
                        byte[] destinationarray = (byte[])Array.CreateInstance(typeof(byte), 188);
                        Array.Copy(receivedbytes, (int)Math.Round((double)(12.0 + (j * 188))), destinationarray, 0, 188);
                        if (destinationarray[0] == 0x47 && destinationarray.Length >= 188 && (destinationarray[1] & 15) == 0 && destinationarray[2] == 0x11 && destinationarray[5] == 0x42)                                       	//check if it is a SDT (Service Description Table) destinationarray?
                        {
                            //Reads the TsHeader
                            var tsheader = new TsHeader(destinationarray);
                            //Decode the Table                        
                            _serviceDescriptionTable = ServiceDescriptionTable.Decode(tsheader.PayloadUnitStartIndicator, tsheader.PayLoadStart, destinationarray);
                            Console.Write(_serviceDescriptionTable.ToString());
                            //Say the Sat>IP server we want not more Receives the ServiceDescriptionTable
                            _rtspDevice.RtspSession.Play(string.Format("delpids=17"));
                            sdtfound = true;
                        }
                    }
                }
            }
        }

dont c&p this code it is very Buggy at time and my rtsp stack made Problems  at time too

but it Shows you (Luke ) how you get the Rtp/Mpegts parse the Tables to get the Infos for Channel Service Creation

Edited by Diefenthal
  • Like 1
Link to comment
Share on other sites

Guest Diefenthal

hmmm no fork and no help  is answer enough for me

 

for me is the try to help there out  finshed

 

and think if @@Luke read the definitions and specifications can he understand how it works

here in both threads are enough  informations to Support  Sat>Ip

Link to comment
Share on other sites

Nikolaech

Diefenthal Tell us more about Octopus NET S2 Sx Cx Tx. This is a good solution for Emby :) 

circular LNB

Non-standard lo frequency?

plugins?

EPG?

Support third-party sources EPG

CI+

CI which encoding is supported?

home sharing conditional access cards?

or where to read?

 

Thank you. :)

  • Like 1
Link to comment
Share on other sites

hmmm no fork and no help  is answer enough for me

 

for me is the try to help there out  finshed

 

and think if @@Luke read the definitions and specifications can he understand how it works

here in both threads are enough  informations to Support  Sat>Ip

 

Thank you for all of your help. 

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...