[confirm] - rebuild graph between hd channels

Discussion in 'MediaPortal 1.2.0 ALPHA' started by glenn 1990, April 19, 2011.

  1. glenn 1990

    glenn 1990 Portal Pro

    Joined:
    July 1, 2010
    Messages:
    247
    Likes Received:
    36
    Ratings:
    +36 / 0
    Home Country:
    Belgium Belgium
    Show System Specs
    MediaPortal Version: 1.2 svn
    MediaPortal Skin: maya
    Windows Version: vista 32 bit
    CPU Type: atom 330
    HDD: seagate 1.5 TB
    Memory: 2gb ddr2
    Motherboard: zotac
    Video Card: nvidia ion
    Video Card Driver: 197.45
    Sound Card: realtek
    Sound Card AC3: no AC3
    Sound Card Driver:
    1. TV Card: digitaldevices cine s2
    1. TV Card Type: dvb-s2
    1. TV Card Driver: 1.4.2.34
    2. TV Card:
    2. TV Card Type:
    2. TV Card Driver:
    3. TV Card:
    3. TV Card Type:
    3. TV Card Driver:
    4. TV Card:
    4. TV Card Type:
    4. TV Card Driver:
    MPEG2 Video Codec: mpc
    MPEG2 Audio Codec: mpc
    h.264 Video Codec: mpc
    Satelite/CableTV Provider:
    HTPC Case:
    Cooling:
    Power Supply:
    Remote: hauppauge
    TV:
    TV - HTPC Connection:

    hi,



    Switching between H264 channels with different resolution (1080i and 720p) gives me crashes, green lines, flickering.
    I tried diferent codecs (powerdvd, mpc hc, microsoft,ffdshow dxva), only ffdshow works, but without dxva (impossible on a ion). The only way to swith between these channels is to switch to an sd channel first.

    I think that the problem is that the graph don't get rebuild when switching between different resolutions h264 channels.
    The problem seems similar as this 0002579: Graph rebuilding doesn't work when SD and HD video codec is the same - MediaPortal Bugtracker, only this is between hd and sd channels and not between different hd channels.

    Underneath a part of a logfile when switching from a sd to a 720p and then to a 1080i channel. I marked green when the graph is rebuild (from sd to 720p) and re when the graph isn't rebuild (from 720p to 1080i).
    Code (Text):
    1.  
    2. 2011-04-19 20:37:21.572000 [Debug][MPMain(1)]: Audio streams avail: 1
    3. 2011-04-19 20:37:21.572000 [Info.][MPMain(1)]: Audio stream: switching to preferred AC3/MPEG audio stream 0 (only 1 track avail.)
    4. 2011-04-19 20:37:21.743000 [Info.][(15)]: TsReaderPlayer: OnVideoFormatChanged - streamtype=H264 resolution=1280x720 aspect ratio=16:9 bitrate=15000000 isInterlaced=False
    5. 2011-04-19 20:37:21.825000 [Info.][MPMain(1)]: Rerendering audio and video pins of tsreader filter.
    6. [COLOR="Lime"]2011-04-19 20:37:21.826000 [Debug][MPMain(1)]: TSReaderPlayer: Remove filter - ffdshow Audio Decoder
    7. 2011-04-19 20:37:21.843000 [Info.][MPMain(1)]: Added filter: ffdshow Audio Decoder to graph
    8. 2011-04-19 20:37:21.843000 [Debug][MPMain(1)]: TSReaderPlayer: Remove filter - ffdshow Video Decoder
    9. 2011-04-19 20:37:21.904000 [Info.][MPMain(1)]: Added filter: ffdshow Video Decoder to graph[/COLOR]
    10. 2011-04-19 20:37:21.904000 [Debug][MPMain(1)]: Filter: TsReader - try to connect: Audio
    11. 2011-04-19 20:37:21.919000 [Debug][MPMain(1)]: Filter: TsReader - try to connect: Video
    12. 2011-04-19 20:37:21.944000 [Debug][MPMain(1)]: PlaneScene: PresentImage() dispose surfaces
    13. 2011-04-19 20:37:21.945000 [Debug][MPMain(1)]: Filter: TsReader - try to connect: Subtitle
    14. 2011-04-19 20:37:21.949000 [Debug][MPMain(1)]:  - failed
    15. 2011-04-19 20:37:21.949000 [Debug][MPMain(1)]: Check graph connections for: Enhanced Video Renderer
    16. 2011-04-19 20:37:21.949000 [Debug][MPMain(1)]: Check graph connections for: Default DirectSound Device
    17. 2011-04-19 20:37:21.950000 [Debug][MPMain(1)]: Check graph connections for: ffdshow Video Decoder
    18. 2011-04-19 20:37:21.950000 [Debug][MPMain(1)]: Check graph connections for: ffdshow Audio Decoder
    19. 2011-04-19 20:37:21.950000 [Debug][MPMain(1)]: Check graph connections for: TsReader
    20. 2011-04-19 20:37:21.968000 [Info.][MPMain(1)]: Reconfigure graph done
    21. 2011-04-19 20:37:23.302000 [Debug][(16)]: PlaneScene: crop T, B  : 0, 0
    22. 2011-04-19 20:37:23.302000 [Debug][(16)]: PlaneScene: crop L, R  : 0, 0
    23. 2011-04-19 20:37:23.303000 [Info.][(16)]: PlaneScene: video WxH  : 1280x720
    24. 2011-04-19 20:37:23.303000 [Debug][(16)]: PlaneScene: video AR   : 16:9
    25. 2011-04-19 20:37:23.303000 [Info.][(16)]: PlaneScene: screen WxH : 1440x900
    26. 2011-04-19 20:37:23.303000 [Debug][(16)]: PlaneScene: AR type    : Normal
    27. 2011-04-19 20:37:23.304000 [Debug][(16)]: PlaneScene: PixelRatio : 1
    28. 2011-04-19 20:37:23.304000 [Debug][(16)]: PlaneScene: src        : (0,0)-(1280,720)
    29. 2011-04-19 20:37:23.304000 [Debug][(16)]: PlaneScene: dst        : (0,45)-(1440,855)
    30.  
    31. 2011-04-19 20:37:34.381000 [Debug][MPMain(1)]: ChannelNavigator.ZapToChannel ASTRA HD - zapdelay False
    32. 2011-04-19 20:37:35.200000 [Info.][MPMain(1)]: TSReaderPlayer: OnZapping :-1
    33. 2011-04-19 20:37:35.200000 [Debug][MPMain(1)]: g_Player.SeekAbsolute() - Preparing to seek to 0:0:23
    34. 2011-04-19 20:37:35.201000 [Info.][MPMain(1)]: TsReaderPlayer:seekabs:234180000 start:490000 end:234180000
    35. 2011-04-19 20:37:35.246000 [Info.][MPMain(1)]: TsReaderPlayer: pos: 234180000 start:490000 end:234180000
    36. 2011-04-19 20:37:35.246000 [Info.][MPMain(1)]: TsReaderPlayer seek done:0
    37. 2011-04-19 20:37:35.247000 [Info.][MPMain(1)]: TSReaderPlayer: current pos:23,369 dur:23,369
    38. 2011-04-19 20:37:35.247000 [Info.][MPMain(1)]: TSReaderPlayer:Continue graph
    39. 2011-04-19 20:37:35.443000 [Info.][MPMain(1)]: Rerendering audio pin of tsreader filter.
    40. 2011-04-19 20:37:35.443000 [Debug][MPMain(1)]: TSReaderPlayer: Remove filter - ffdshow Audio Decoder
    41. 2011-04-19 20:37:35.459000 [Info.][MPMain(1)]: Added filter: ffdshow Audio Decoder to graph
    42. [COLOR="Red"]2011-04-19 20:37:35.460000 [Debug][MPMain(1)]: Filter: TsReader - try to connect: Audio
    43. 2011-04-19 20:37:35.475000 [Debug][MPMain(1)]: Filter: TsReader - try to connect: Subtitle[/COLOR]
    44. 2011-04-19 20:37:35.479000 [Debug][MPMain(1)]:  - failed
    45. 2011-04-19 20:37:35.480000 [Debug][MPMain(1)]: Check graph connections for: Enhanced Video Renderer
    46. 2011-04-19 20:37:35.480000 [Debug][MPMain(1)]: Check graph connections for: Default DirectSound Device
    47. 2011-04-19 20:37:35.480000 [Debug][MPMain(1)]: Check graph connections for: ffdshow Audio Decoder
    48. 2011-04-19 20:37:35.481000 [Debug][MPMain(1)]: Check graph connections for: ffdshow Video Decoder
    49. 2011-04-19 20:37:35.481000 [Debug][MPMain(1)]: Check graph connections for: TsReader
    50. 2011-04-19 20:37:35.502000 [Info.][MPMain(1)]: Reconfigure graph done
    I'm using UNC for live tv (4 the record), but I tested with MP and rtsp and I had still the same problem.
    Also this issue isn't mp 1.2 specific, it's been there always (probably).
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. jameson_uk
    • Team MediaPortal

    jameson_uk Retired Team Member

    Joined:
    January 27, 2005
    Messages:
    7,258
    Likes Received:
    2,228
    Gender:
    Male
    Occupation:
    Data Warehousing Consultant
    Location:
    Birmingham
    Ratings:
    +2,403 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
  4. glenn 1990

    glenn 1990 Portal Pro

    Joined:
    July 1, 2010
    Messages:
    247
    Likes Received:
    36
    Ratings:
    +36 / 0
    Home Country:
    Belgium Belgium
    Show System Specs
    I think this has nothing to to with the tv server, I have the same problem with the 4the record tuner (which I'm using at the moment). The problem is that most codecs can't handle the 720p 1080i switching without reconecting it's pins.
     
  5. glenn 1990

    glenn 1990 Portal Pro

    Joined:
    July 1, 2010
    Messages:
    247
    Likes Received:
    36
    Ratings:
    +36 / 0
    Home Country:
    Belgium Belgium
    Show System Specs
    I played a bit with the code today and channels switching between 1080i and 720p channels is working now, with dxva.:)
    I only added 2 lines in "BaseTSReaderPlayer.cs", these are red marked in the example underneath.

    Now the filters gets reconnect when the video format changes. Is there anyone else with the same problem, I can't find similar problems on the forum and I have it on all my systems.


    Code (Text):
    1.    
    2. public int OnVideoFormatChanged(int streamType, int width, int height, int aspectRatioX, int aspectRatioY,
    3.                                     int bitrate, int isInterlaced)
    4.     {    
    5. [COLOR="Red"]
    6.       //reconnect filters, not all codecs can handle channel switching between channels with a different video format.
    7.       iChangedMediaTypes = 2;
    8.       _bMediaTypeChanged = true;[/COLOR]
    9.  
    10.       _isRadio = false;
    11.       _videoFormat.IsValid = true;
    12.       _videoFormat.streamType = (VideoStreamType)streamType;
    13.       _videoFormat.width = width;
    14.       _videoFormat.height = height;
    15.       _videoFormat.arX = aspectRatioX;
    16.       _videoFormat.arY = aspectRatioY;
    17.       _videoFormat.bitrate = bitrate;
    18.       _videoFormat.isInterlaced = (isInterlaced == 1);
    19.       Log.Info("TsReaderPlayer: OnVideoFormatChanged - {0}", _videoFormat.ToString());
    20.       return 0;
    21.     }
     
  6. Spooky
    • Premium Supporter

    Spooky MP Donator

    Joined:
    February 14, 2005
    Messages:
    1,187
    Likes Received:
    45
    Location:
    void 4tl
    Ratings:
    +47 / 0
    Home Country:
    Austria Austria
    Show System Specs
    I do experience this issue sometimes with DXVA enabled HD codecs when switching between 720p and 1080i channels. Or possibly even between SD and HD channels. Although I did not notice such an issue recently anymore with the Microsoft codec under Windows 7 (though maybe it did not use DXVA, will have to check that).

    Does rebuilding the graph on video format change have any downsides?
     
  7. glenn 1990

    glenn 1990 Portal Pro

    Joined:
    July 1, 2010
    Messages:
    247
    Likes Received:
    36
    Ratings:
    +36 / 0
    Home Country:
    Belgium Belgium
    Show System Specs
  8. tourettes
    • Team MediaPortal

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    Only downside I can think of is that the 720i/p to 1080i/p channel switches are taking longer since graph rebuilding is done (I guess some codecs handle that well without the rebuilding).
     
  9. glenn 1990

    glenn 1990 Portal Pro

    Joined:
    July 1, 2010
    Messages:
    247
    Likes Received:
    36
    Ratings:
    +36 / 0
    Home Country:
    Belgium Belgium
    Show System Specs
    hi tourettes

    Yes there are codecs that can handle these resolution changes, but not with dxva enabled
    I tested coreavc, win7 codec, powerdvd, ffdshow dxva, mpc hc.
     
  10. gibman
    • Team MediaPortal

    gibman Retired Team Member

    Joined:
    October 4, 2006
    Messages:
    2,998
    Likes Received:
    1,321
    Occupation:
    Developer
    Location:
    Aarhus
    Ratings:
    +1,372 / 0
    Home Country:
    Denmark Denmark
    I reproduced the problem while testing the new coreAVC codec.

    using cyberlink pdvd10/11 or the builtin win7 codec and I have no issues.

    I seem to recall that dvbviewer has this option available "rebuild graph on format changes" or similar.
    We could have something similar maybe ?

    could u enhance the patch with adding a setting to the configuration application of MP itself (a checkbox)?
    I guess it would belong to the TV codec section.. or am I wrong ?

    /gibman
     
  11. tourettes
    • Team MediaPortal

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    As 1st step TsReader should be modified so that it will stamp the video samples with the correct PMT info. It might cure some of the badly behaving codecs.
     
Loading...

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

  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!