RTP Stream Freezes After a Few Minutes (1 Viewer)

Alex@Avenview

Portal Member
October 19, 2017
13
2
34
Home Country
Canada Canada
I'm trying to use MP as a PVR back-end to enable time-shifting and recording of an IP video stream. The stream is coming from a device local on the network using ts over rtp, formatted in MPEG-TS. (2Mbps) The MP server is locally hosted and I installed with the singleseat configuration. I have the stream set up as an IPTV source using the built-in DVB-IP tuner.

The issue:
I'm able to start watching TV fine as well as fast-forward and re-wind but after a few minutes the stream will freeze and media controls will become unresponsive. I have to exit out of the TV app and reload the stream to get it going again.

I have installed MP on 3 different computers, one with a dedicated GPU, and they all freeze after a few minutes.
The TVService.log is here: [2017-10-19 15:37:44,324] [00000000] [1820] - CTsDuration - ctor [2017-10-19 15 - Pastebin.com
The full log set is here: Wikisend: free file sharing service

From another TVService.log, I see this:
  1. [2017-10-19 14:57:29,576] [Log ] [RTSP Streaming thread] [INFO ] - RTSP: Streamer started
  2. [2017-10-19 14:57:29,576] [Log ] [31 ] [INFO ] - RTSP: add stream stream2.0 file:E:\stuff\live2-0.ts.tsbuffer
  3. [2017-10-19 14:57:29,634] [Log ] [31 ] [INFO ] - Controller: StartTimeShifting started on card:2 to E:\stuff\live2-0.ts.tsbuffer
  4. [2017-10-19 14:57:29,634] [Log ] [31 ] [DEBUG] - CardReservation.RemoveTuneTicket: removed reservation with id=14, tuningdetails=DVBIP:tv: JTESTT Freq:0 ONID:0 TSID:1 SID:1 PMT:0x2B FTA:True LCN:10000 Url:rtsp://172.16.16.121/live.sdp
  5. [2017-10-19 14:57:29,635] [Log ] [31 ] [INFO ] - card: SignalTuneEvent card: 2 / subch: 0
  6. [2017-10-19 14:57:29,635] [Log ] [31 ] [INFO ] - Controller: DESKTOP-DR2HSPE 2 0
  7. [2017-10-19 14:57:29,635] [Log ] [31 ] [INFO ] - control2:DESKTOP-DR2HSPE 2 0
  8. [2017-10-19 14:57:29,638] [Log ] [31 ] [DEBUG] - CiMenuSupported called cardid 2
  9. [2017-10-19 14:57:29,638] [Log ] [31 ] [DEBUG] - CiMenuSupported card MediaPortal IPTV Source Filter supported: False
  10. [2017-10-19 15:03:27,492] [Log ] [28 ] [INFO ] - Controller: StopTimeShifting 2
  11. [2017-10-19 15:03:27,494] [Log ] [28 ] [DEBUG] - CardTuner.RequestCardStopReservation: placed reservation with id=15, user=DESKTOP-DR2HSPE
  12. [2017-10-19 15:03:27,595] [Log ] [28 ] [DEBUG] - CardTuner.Stop: ticket id=15, found=True
  13. [2017-10-19 15:03:27,595] [Log ] [28 ] [INFO ] - Stop cardid=2, ticket=15, tunestate=Idle, stopstate=Stopping
  14. [2017-10-19 15:03:27,595] [Log ] [28 ] [INFO ] - card MediaPortal IPTV Source Filter: StopTimeShifting user:DESKTOP-DR2HSPE sub:0
  15. [2017-10-19 15:03:27,596] [Log ] [28 ] [DEBUG] - card not IDLE - removing user: DESKTOP-DR2HSPE
  16. [2017-10-19 15:03:27,596] [Log ] [28 ] [DEBUG] - usermanagement.RemoveUser: DESKTOP-DR2HSPE, subch: 0 of 1, card: 2
  17. [2017-10-19 15:03:27,596] [Log ] [28 ] [INFO ] - user:DESKTOP-DR2HSPE remove
  18. [2017-10-19 15:03:27,597] [Log ] [28 ] [INFO ] - subch:0-0 tswriter StopTimeshifting...

The .m3u file looks like this:
#EXTM3U
#EXTINF:-1,TEST
rtp://172.16.16.156:3124

Any help would be appreciated. Thanks.
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello and welcome! :)

    So in the MediaPortal log I see you start viewing the channel:
    [2017-10-19 15:37:41,951] [Log ] [MPMain ] [INFO ] - TVHome.ViewChannelAndCheck(): View channel=TEST

    ...and about a minute later it looks like the channel is intentionally stopped:
    [2017-10-19 15:38:55,536] [Log ] [MPMain ] [INFO ] - g_Player.OnStopped()

    I'm somewhat confused because of this part of what you said:
    but after a few minutes the stream will freeze and media controls will become unresponsive. I have to exit out of the TV app and reload the stream to get it going again.

    If the media controls [in MediaPortal] were unresponsive, I would have thought you wouldn't have been able to intentionally stop TV.

    Perhaps it would help if you could enable debug-level logging for MediaPortal:
    1. Open MediaPortal Configuration.
    2. Go to the "general" section.
    3. Set "log verbosity" to debug.
    ...and also for TV Server's IPTV source filter:
    1. Open TV Server Configuration.
    2. Go to the "manual control" section.
    3. Click "stop service".
    4. Click "open log directory" in the top left corner.
    5. Go up one level (to c:\ProgramData\Team MediaPortal\MediaPortal TV Server).
    6. Open MPIPTVSource.ini in any text editor (notepad, wordpad etc.).
    7. Change the line "LogVerbosity = 3" to "LogVerbosity = 4".
    8. Save and close.
    9. In TV Server Configuration click "start service".
    After that you could reproduce the problem again and attach/upload fresh log files. Hopefully the additional detail in the logs will give additional insight into what's going on.

    P.S. After all this is over, don't forget to change the log levels back to what they were previously.
     

    Alex@Avenview

    Portal Member
    October 19, 2017
    13
    2
    34
    Home Country
    Canada Canada
    Hi mm, thanks for the reply.

    I some how messed up my MP installation on my first machine so I used my other computer. I wasn't able to get rtp working for some reason so I switched to rtsp.

    #EXTM3U
    #EXTINF:0,TEST
    rtsp://172.16.16.121/live.sdp

    I changed the log verbosity as you asked: Wikisend: free file sharing service

    Hello and welcome! :)
    If the media controls [in MediaPortal] were unresponsive, I would have thought you wouldn't have been able to intentionally stop TV.

    I did the same thing as last time. I loaded the stream, let it go for a bit, rewinded a bit, fastforwarded a bit, then let it play. Same thing, a few minutes the stream freezes, media controls stop responding and I have to Alt-F4.

    I'm currently trying out NextPVR as a backend but I'm not even able to get the stream to work in that program. Again, any help is appreciated.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    I some how messed up my MP installation on my first machine so I used my other computer. I wasn't able to get rtp working for some reason so I switched to rtsp.
    Fine. RTSP should be just as usable as RTP. (y)

    I changed the log verbosity as you asked
    Mmmm, the IPTV source log level is good [though unfortunately it doesn't give any additional insight], but the MediaPortal log level is the same as before. :confused:

    Sorry to be a pain, but could you please:
    1. Double-check the MediaPortal log level again. Make sure to click OK rather than cancel or X-in-the-top-right-hand-corner when closing MP Configuration so that the setting change is saved.
    2. Change the IPTV source log verbosity to 5.
    3. Grab new logs.
    ...and one other thing:
    1. Open MediaPortal Configuration.
    2. Go to the "codecs and renderer" section.
    3. Go to the TV codecs tab.
    4. Click on the wrench next to any of the settings where "LAV Video Decoder" is selected.
    5. Take a screenshot of the window/dialog that pops up (LAV video settings).
    Again, I apologise for asking you to collect log files again. I'm just not [yet!] seeing any indications that line up with what you're seeing. That may indicate that the problem is outside MediaPortal (eg. codecs, over-zealous security software scanning MP's every move etc.) or something like that...
     

    Alex@Avenview

    Portal Member
    October 19, 2017
    13
    2
    34
    Home Country
    Canada Canada
    Again, I apologise for asking you to collect log files again.
    It's quite alright, thank you so much for sticking with me.

    I have repeated the steps and got two sets of log files. For the first set, I used Alt-F4 to close. For the second, I used task manager and ended the process. The zip also contains screenshots of LAV and the general setting screen. Wikisend: free file sharing service

    That may indicate that the problem is outside MediaPortal (eg. codecs...
    I've only been testing with my streaming appliance. Know of a good rtsp stream that I can test with?


    Edit: I was mistaken, the media controls are responsive. I'm able to rewind and it will play from that point up to where it originally froze. Something interesting I've noticed is that the buffer file (on a separate partition) is always 16MB when it freezes. I've changed the buffer settings, making them as large as possible but nothing changes.

    Edit 2: I watched the file size increase in Windows Explorer. The moment it reaches 16MB is freezes.
     
    Last edited:

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello again

    I have to make this quick...

    It's quite alright, thank you so much for sticking with me.
    You're very welcome. :)

    The zip also contains screenshots of LAV and the general setting screen.
    Three things:
    1. Looks like you missed the request to change the IPTV source log level from 4 to 5.
    2. The screenshot of the log setting shows me you're looking in TV Server Configuration rather than MediaPortal Configuration. So, I think you're looking at the wrong setting.
    3. The screenshot of the LAV settings shows that you're using "DXVA2 (copy-back)" hardware acceleration. That's a little unusual. Do you have a reason for that choice? If not, I'd recommend switching over to "DXVA2 (native)".

    Know of a good rtsp stream that I can test with?
    No, sorry.

    Edit: I was mistaken, the media controls are responsive... 16 MB...
    From my perspective that makes more sense. I'm wondering if your RTSP appliance is expecting some sort of "keep-alive" messaging (to tell it there's still "something" using the stream). TV Server's standard IPTV filter doesn't send keep-alive messages [because they're not standard for RTSP]. I may be able to dig up a version that does.

    What appliance do you have?
     

    Alex@Avenview

    Portal Member
    October 19, 2017
    13
    2
    34
    Home Country
    Canada Canada
    What appliance do you have?

    It's a product that my company is developing.

    I managed to get it working properly on Friday by switching from unicast to multicast streaming, it was streaming continuously. The issue I'm having now is that MP gives me the error "video/audio not found" and my MPIPTVSource.log tells me that its trying to open udp://@0.0.0.0:1234 when the TV server correctly finds the stream at the broadcast address 226.0.0.1.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello again

    It's a product that my company is developing.

    I managed to get it working properly on Friday
    Cool :)

    my MPIPTVSource.log tells me that its trying to open udp://@0.0.0.0:1234
    That's a red herring. You're misinterpreting the log.
    That UDP address is an address used when the IPTV source is idle. Don't worry about it.

    The issue I'm having now is that MP gives me the error "video/audio not found"
    You'll need to provide full log files if you'd like assistance with this. Please use the supplied Watchdog tool option 1 ("report a bug...") to start MP in debug mode; reproduce the problem then close MP; the watchdog will create a zip file containing both MP and TV Server log files. Attach the zip file to your next reply.
     

    Alex@Avenview

    Portal Member
    October 19, 2017
    13
    2
    34
    Home Country
    Canada Canada
    You'll need to provide full log files if you'd like assistance with this. Please use the supplied Watchdog tool option 1 ("report a bug...") to start MP in debug mode; reproduce the problem then close MP; the watchdog will create a zip file containing both MP and TV Server log files. Attach the zip file to your next reply.

    Scratch that, the stream is still freezing. rtp, udp rtsp, I don't know what I did last time but the stream is freezing even quicker now. I found the log verbosity option you mentioned, this should have all the logs: Wikisend: free file sharing service

    Thanks for sticking with me.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    The logs don't appear to show the stream stopping or anything else like that. Since you're multi-casting, can you run VLC on the same stream to confirm that the issue isn't at the appliance end (eg. encoder failing).
     

    Users who are viewing this thread

    Top Bottom