MERGING MediaPortal Url Source Splitter & IPTV Filter | Page 59

Discussion in 'General Development (no feature request here!)' started by georgius, August 20, 2013.

  1. bounguine

    bounguine Portal Pro

    Joined:
    November 7, 2005
    Messages:
    233
    Likes Received:
    15
    Gender:
    Male
    Occupation:
    executive director + project manager
    Location:
    St.Petersburg
    Ratings:
    +15 / 0
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    Just one thought from sleepy bounguine.
    1. If you insist on pre-scanning.
    When a user has 10-100 channels, it is obviously normal.
    But in case of handreds or thousands of channels (like in my case) at least the time for scanning is the trouble.
    I'm not talking again about bothering the broadcasting server.
    2. If you simply upload the playlist and send request for the params on demand (when watching TV), the problems tend to go away.
    Simply put fake params into db when uploading and correct them when watching.



    As for timeout I can say nothing.
    Probably, it should be more by default.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. georgius
    • Team MediaPortal

    georgius Retired Team Member

    Joined:
    October 31, 2010
    Messages:
    1,376
    Likes Received:
    437
    Gender:
    Male
    Occupation:
    Software Architect
    Location:
    Bratislava
    Ratings:
    +668 / 0
    Home Country:
    Slovakia Slovakia
    Show System Specs
    The logs can be helpful, 100 seconds is more than sufficient value.

    My fault, there is parsing error in TV plugin for client port min and max value. I attached fixed plugin DLL, replace yours DLL in TV service, after that you should be able to see channels from DB or from playlist.

    It is readable by filter and by plugin. You can see, that parameters are separated by '&' and parameter name and value are separated by '='. The parameters' values are encoded to URL (https://msdn.microsoft.com/en-us/library/4fkewx0t(v=vs.110).aspx) and also '+' is replaced by '%20'.

    Logs can be helpful, fixed DLL attached.

    Yes, I'm dreaming about "apt-get update && apt-get upgrade" in Windows too, but this will not happen. OpenConnectionTimeout can be set for all RTSP urls in easier way. Go to plugin, switch to RTSP section, change OpenConnectionTimeout, press Apply settings, go to Database section and press Apply settings. Then all RTSP urls should have set open connection timeout. If you wish to apply open connection timeout by script, you have to construct proper filter URL (the unreadable one).

    This is not possible.

    I'm not 100% sure, but I think that TV server checks stream when opened if it is FTA and does not care about FTA value in DB. And in some cases this checking results in scrambled value, even if channel is not scrambled.

    Filter does not have config or any other form of configuration. Everything is passed in "unreadable" URL. So, you have to construct right URL for each channel.

    If everything works, he/she doesn't have to do anything. If not, he/she asks for help and provides logs. And if it is possible, we helps. The VLC and DVBViewer have probably bigger timeouts, but they are user programs, so user see what is happening. The TV server is service, so client programs (MP or Kodi, maybe others) don't know what is happening, until stream is correctly opened or timeout occurs. Also you can have more than one IPTV card and TV service tries to open channel on all possible cards. With big timeout it will take very long time and user looking on MP screen doesn't know, what is happening. When using IPTV is also assumed that you are directly connected to provider's network, so responses should be very fast. So, I think that timeout is set to reasonable value for such case.

    TV server works in another way. It must know the stream parameters at least to know, if it is on correct channel. You don't want to watch or record another program as you set. VLC doesn't care about that.

    You're right, the simplier for a user, the better. But in many cases it's not possible. Especially in IPTV and network things. And especially RTSP :) Every tested RTSP provider has something specific.
     

    Attached Files:

    • Thank You! Thank You! x 1
  4. georgius
    • Team MediaPortal

    georgius Retired Team Member

    Joined:
    October 31, 2010
    Messages:
    1,376
    Likes Received:
    437
    Gender:
    Male
    Occupation:
    Software Architect
    Location:
    Bratislava
    Ratings:
    +668 / 0
    Home Country:
    Slovakia Slovakia
    Show System Specs
    Maybe you noticed (but hopefully not) that in crash case, is sent small crash dump to https://drdump.com (I attached last crash dump, if you want to check). I was notified that somebody using RTSP has experienced crash, but he/she was using version 2.2.14.5982, which was published here in forum. The crash dump file name have to be
    Code (Text):
    1. C:\ProgramData\Team MediaPortal\MPUrlSourceSplitterCrash\MPUrlSourceSplitter-2016-05-24-00-30-05-330.dmp
    RTSP users, can you check, if you have such file and if yes, can you attach at least logs? I think that crash dump will be bigger file, so until it is necessary, I will not ask for it.
     

    Attached Files:

    • 8936253.zip
      File size:
      222 KB
      Uploaded:
      May 25, 2016
      Views:
      55
  5. mike1
    • Premium Supporter

    mike1 MP Donator

    Joined:
    September 7, 2012
    Messages:
    88
    Likes Received:
    4
    Gender:
    Male
    Ratings:
    +8 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Hi Georgius,
    better time now ;-)?
    If not - may be yout could pint me to the right source - so i could try myself? I only use the iptv for scrambled channels from the Receiver - so i just would add the zap - command before each http post...
     
  6. bounguine

    bounguine Portal Pro

    Joined:
    November 7, 2005
    Messages:
    233
    Likes Received:
    15
    Gender:
    Male
    Occupation:
    executive director + project manager
    Location:
    St.Petersburg
    Ratings:
    +15 / 0
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    Now let’s refresh what we have.

    1. RTSP from DVBViewer
    Scanning – with workaround (delete “16,17,” from the link).
    Watching YV is not yet possible.

    2. Getting channel parameters before putting channels into DB with a script.
    Yet another workaround.
    Download astra.zip from attachment and unzip elsewhere.
    This is a free Windows version (old version #4.4. with limited features – no channel reserving, no full rtsp support, no epg parsing and sending it through a file or http) of professional Linux SW for cable operators.
    Open cdm and copy:
    , where:
    [path_to_executable] – folder with unzipped astra (without [ and ]),
    [http_link] -the link to be analyzed (without [ and ]),
    [path_to_log_file]\[log_file] – path to and the name of the log-file (any, without [ and ])

    Press Enter in cmd or parse line by line the *.m3u for every http-link with a script and put the link inside the command above.
    As log-file is formed once and contains information about all the links analyzed, to make parsing easier delete the log-file each time you send a command to astra.
    The output will contain:

    PmtPid and ServiceId
    TransportId
    So you may use the values, set NetworkId to 1, freeToAir to 1 and put the parameters together with the link into Tuningdetail table.

    3. FTA channels.
    Yes, from time to time MP treats FTA channels as crypted by mistake during scanning and you will not able to watch them until changing freeToAir to 1

    4. Putting channels into DB without analyzing channels when using astra as VOD-server.
    Simply make a config-file with any name (e.g. astra.conf).
    Fill it like this:
    , where:
    [channel_name] – channel name (any, without [ and ]),
    [http-link] – the link to be broadcasted (without [ and ]),
    [ServiceId] – any value from 1 to 65535 (without [ and ]),
    [PmtPid] – any value from 1 to 65535 (without [ and ]),
    [output_link] – http, upd or rtp output link (without [ and ]) and [port] – output port (any free port, use a new port (e.g. port value +1) for every channel, without [ and ]) – example: http://127.0.0.1:1239,
    Repeat the procedure for every channel manually or with a script.

    Open cmd copy the link below and press Enter to start astra.
    You may also do this by script.

    , where:
    [path_to_executable] – folder with unzipped astra (without [ and ]),
    [path_to_config_file]\[config_file] – path to and the name of the config-file (any - e.g. astra.conf) - see above, without [ and ])
    [path_to_log_file]\[log_file] – path to and the name of the log-file (any, without [ and ])

    Now you may use the ServiceId, PmtPid, set TransportId to 1, NetworkId to 1, freeToAir to 1 and put the parameters together with the output_link into Tuningdetail table.
    If you want to use manual scanning of *.m3u formed with links broadcasted by astra you may omit #set_pnr=[ServiceId]&map.pmt=[PmtPid]

    5. Scanning problems
    I set stream analysis timeout to 10000 and all other timeouts to 5000 stored changes to DB.
    But scanning locks not all the channels (working perfectly in VLC).
    1 try – Channel 1 is locked, Channel 2 is not locked.
    2 try – Channel 2 is not locked, Channel 2 is locked.
    At the end of every try MP crashes.
    Logs are attached
     

    Attached Files:

    • astra.zip
      File size:
      562.9 KB
      Uploaded:
      May 28, 2016
      Views:
      78
  7. georgius
    • Team MediaPortal

    georgius Retired Team Member

    Joined:
    October 31, 2010
    Messages:
    1,376
    Likes Received:
    437
    Gender:
    Male
    Occupation:
    Software Architect
    Location:
    Bratislava
    Ratings:
    +668 / 0
    Home Country:
    Slovakia Slovakia
    Show System Specs
    Stream analysis timeout is relevant only if you are testing url in TV service plugin. From logs I see that you were working only with HTTP urls, which have default timeout 5000. How long it takes VLC to open HTTP url (e.g. the first one http://127.0.0.1:1239)?
     
  8. bounguine

    bounguine Portal Pro

    Joined:
    November 7, 2005
    Messages:
    233
    Likes Received:
    15
    Gender:
    Male
    Occupation:
    executive director + project manager
    Location:
    St.Petersburg
    Ratings:
    +15 / 0
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    In VLC it takes not more than 4-5 seconds
     
  9. bounguine

    bounguine Portal Pro

    Joined:
    November 7, 2005
    Messages:
    233
    Likes Received:
    15
    Gender:
    Male
    Occupation:
    executive director + project manager
    Location:
    St.Petersburg
    Ratings:
    +15 / 0
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    With my my script scanning take less.

    Plus 1 second to put the line into DB
     
  10. bounguine

    bounguine Portal Pro

    Joined:
    November 7, 2005
    Messages:
    233
    Likes Received:
    15
    Gender:
    Male
    Occupation:
    executive director + project manager
    Location:
    St.Petersburg
    Ratings:
    +15 / 0
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    Just one thought more.
    You are always talking about scanning and some timeouts.
    As I said, I'll never use MP scanning and using timeouts when putting a link into DB for me is a wrong concept.
    What your SW should do from my point of view:
    - parse *.m3u (static or downloaded from http source automatically once per time X) automatically,
    - substitute in db http-links, pmt pid, etc, if changed, for existing idTuning or add new ones, if a user changed status in intermediate db from e.g. "not insert" to "insert",
    - wait until the process of parsing http-links, pmt pid, etc,from *.m3u is finished (1 second, 1 minute, 1 momth, etc) or loop scanning
     
  11. bounguine

    bounguine Portal Pro

    Joined:
    November 7, 2005
    Messages:
    233
    Likes Received:
    15
    Gender:
    Male
    Occupation:
    executive director + project manager
    Location:
    St.Petersburg
    Ratings:
    +15 / 0
    Home Country:
    Russian Federation Russian Federation
    Show System Specs
    My script is underdone, as I'm busy on my work and using Microsoft after Linux is always is a great joke.
    So I'll at least describe tomorrow or the day after tomorrow how my script works.
    To be short:
    - it scans channels itself from *.m3us without user,
    - it adds new channel and tuningdetail or adds/updates tuningdetail for an existing channel from different sources,
    - deletes tuningdetail if not broadcasted and channels if tuningdetail is exist anymore.

    My concept is like in TVHeadend (Linux) - user must not click "Scan"
     
Loading...

Users Viewing Thread (Users: 0, Guests: 1)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!