Change channel really slow

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
jdembski Offline
Fan
Posts: 502
Joined: Feb 2012
Reputation: 12
Post: #16
(2013-03-21 13:13)FernetMenta Wrote:  Can you test this: https://github.com/FernetMenta/xbmc/tree/zappy
The 4 commits on top are relevant.

Will do so tomorrow. I'll report back...

VU+ / Enigma2 PVR Client: Documentation | Development | Discussion
find quote
FernetMenta Offline
Team-XBMC Developer
Posts: 3,064
Joined: Jul 2010
Reputation: 60
Location: Munich
Post: #17
I fixed the compile error.
find quote
tommywm22 Offline
Junior Member
Posts: 15
Joined: Jul 2012
Reputation: 0
Post: #18
(2013-03-21 13:07)jdembski Wrote:  Hmm - I just tried this change.

Good news: Channel switching is really fast now
Bad news: Sometimes there will be no picture, just the audio playing.

Guess I will go and play around a little bit with the max_analyze_duration...

Jdembski, did you also build a special development version of the PVR add-on? if so, where is it in Margo's GIT?

Thank you

Thomas
find quote
tommywm22 Offline
Junior Member
Posts: 15
Joined: Jul 2012
Reputation: 0
Post: #19
(2013-03-21 13:13)FernetMenta Wrote:  Can you test this: https://github.com/FernetMenta/xbmc/tree/zappy
The 4 commits on top are relevant.

(2013-03-21 18:01)FernetMenta Wrote:  I fixed the compile error.

I built this and it works fine. I built Margo's add-on version 1.7.8 from here... https://github.com/margro/xbmc-pvr-addons

Unfortunately for me the channel changes are not much quicker unless you make Margo's modification to DVDDemuxFFmpeg.cpp. My channel changes are now about 2.5 seconds with either 12.0 or FernetMenta's branch (but both having Margo's mod) FernetMenta's might be more reliable... will have to keep testing.

Thank you FernetMenta for giving us something to try!

Thomas
(This post was last modified: 2013-03-22 00:12 by tommywm22.)
find quote
FernetMenta Offline
Team-XBMC Developer
Posts: 3,064
Joined: Jul 2010
Reputation: 60
Location: Munich
Post: #20
In case margro's patch still has any impact, my change are not activated. It should completely skip find_stream_info. I think I have missed the correct section in the code where the demuxer is opened for MP. Will push another patch soon.
find quote
FernetMenta Offline
Team-XBMC Developer
Posts: 3,064
Joined: Jul 2010
Reputation: 60
Location: Munich
Post: #21
This needs to be done in DVDFactoryDemuxer.cpp, pvr section:

Detect the the type of pvr input streams for which find_stream_info should be skipped and call demuxer->Open with second argument false. The demuxer will detect program changes on the fly.

I thought this was the code pass but it seems there are otheres:

Code:
if (pInputStream->IsStreamType(DVDSTREAM_TYPE_PVRMANAGER))
  {
    CDVDInputStreamPVRManager* pInputStreamPVR = (CDVDInputStreamPVRManager*)pInputStream;
    CDVDInputStream* pOtherStream = pInputStreamPVR->GetOtherStream();
    if(pOtherStream)
    {
      /* Used for MediaPortal PVR addon (uses PVR otherstream for playback of rtsp streams) */
      if (pOtherStream->IsStreamType(DVDSTREAM_TYPE_FFMPEG))
      {
        auto_ptr<CDVDDemuxFFmpeg> demuxer(new CDVDDemuxFFmpeg());
        if(demuxer->Open(pOtherStream, false))
          return demuxer.release();
        else
          return NULL;
      }
    }
find quote
jdembski Offline
Fan
Posts: 502
Joined: Feb 2012
Reputation: 12
Post: #22
Hi, I just tried your change, I think something is broken there:

When using your "zappy" branch, most of the times a channel will not open properly and just stall with "buffering". In the log the following message is being repeated thousands of times:

Code:
10:39:48 T:4542169088  NOTICE: Opening teletext stream: 0 source: 256
10:39:48 T:4542169088  NOTICE: Opening video stream: 1 source: 256
10:39:48 T:4542169088  NOTICE: Opening audio stream: 2 source: 256
10:39:48 T:4542169088  NOTICE: Opening teletext stream: 0 source: 256
10:39:48 T:4542169088  NOTICE: Opening video stream: 1 source: 256
10:39:48 T:4542169088  NOTICE: Opening audio stream: 2 source: 256
10:39:48 T:4542169088  NOTICE: Opening teletext stream: 0 source: 256
10:39:48 T:4542169088  NOTICE: Opening video stream: 1 source: 256

Btw: I'm not using the mediaportal addon, but the VU+ addon. When switching back to the xbmc master, then the channel change works every time (although it is slow)

VU+ / Enigma2 PVR Client: Documentation | Development | Discussion
find quote
FernetMenta Offline
Team-XBMC Developer
Posts: 3,064
Joined: Jul 2010
Reputation: 60
Location: Munich
Post: #23
Looks like it detects program changes. Could you add some debug code to this and investigate why it detect those changes?
https://github.com/FernetMenta/xbmc/comm...5ba27e1fd6

Check for IsProgramChange()
find quote
jdembski Offline
Fan
Posts: 502
Joined: Feb 2012
Reputation: 12
Post: #24
I put in some debug output into the IsProgramChange function to output all used variables:

Code:
12:39:02 T:4411887616  NOTICE: Opening video stream: 0 source: 256
12:39:02 T:4411887616  NOTICE: Opening audio stream: 4 source: 256
12:39:02 T:4411887616  NOTICE: Opening Subtitle stream: 6 source: 256
12:39:02 T:4411887616  NOTICE: Opening teletext stream: 5 source: 256
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: noOfStreams '9'
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: stream type: !STREAM_NONE
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: IsActiveStream
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: stream type: !STREAM_NONE
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: IsActiveStream
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: stream type: !STREAM_NONE
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: IsActiveStream
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: stream type: !STREAM_NONE
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: IsActiveStream
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: stream type: !STREAM_NONE
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: IsActiveStream
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: stream type: !STREAM_NONE
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: IsActiveStream
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: stream type: !STREAM_NONE
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: IsActiveStream
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: stream type: STREAM_NONE
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: IsActiveStream
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: stream type: STREAM_NONE
12:39:02 T:4411887616    INFO: IsProgramChange: jdembski: IsActiveStream

As you can see it looks like the stream type is really changing - which is quite odd, isn't it?

I just tested it also by playing back a recording directly from XBMC, and there it has the same problem. If it does help you I could upload a small sample file for you to test.

VU+ / Enigma2 PVR Client: Documentation | Development | Discussion
(This post was last modified: 2013-03-22 13:32 by jdembski.)
find quote
FernetMenta Offline
Team-XBMC Developer
Posts: 3,064
Joined: Jul 2010
Reputation: 60
Location: Munich
Post: #25
Yes, please provide a short sample.
find quote
jdembski Offline
Fan
Posts: 502
Joined: Feb 2012
Reputation: 12
Post: #26
I uploaded a short sample onto this site:

http://www45.zippyshare.com/v/70828303/file.html

Please let me know whether you were able to fetch it - I'm not used to this sharehoster-stuff, so I'm not sure which one is the best and whether this is a legit one... Smile

VU+ / Enigma2 PVR Client: Documentation | Development | Discussion
find quote
FernetMenta Offline
Team-XBMC Developer
Posts: 3,064
Joined: Jul 2010
Reputation: 60
Location: Munich
Post: #27
I pushed a fix for this.
find quote
jdembski Offline
Fan
Posts: 502
Joined: Feb 2012
Reputation: 12
Post: #28
Yes, now playback is fine again.

VU+ / Enigma2 PVR Client: Documentation | Development | Discussion
find quote
krycek Offline
Junior Member
Posts: 32
Joined: Jan 2011
Reputation: 0
Post: #29
Ok, and channel switch also faster?
find quote
margro Offline
Fan
Posts: 652
Joined: Oct 2009
Reputation: 21
Location: The Netherlands
Post: #30
Unfortunately not yet... Just tested FernetMenta's zappy branch together with the MediaPortal pvr addon and switching takes still 7-9 {s} here. Equal to XBMC master without these changes.
(And yes, I've also recompiled the ffmpeg libs.)
I will add some additional debug lines to figure out if it is still the "max_analyse_duration" problem.

Developer of the MediaPortal PVR addon and the Argus-TV PVR-addon. Unofficial XBMC Windows builds with PVR.
http://www.scintilla.utwente.nl/~marcelg/xbmc
(This post was last modified: 2013-03-23 21:15 by margro.)
find quote
Post Reply