[confirm] rebuild graph between hd channels (1 Viewer)

glenn 1990

Portal Pro
July 1, 2010
247
36
Home Country
Belgium Belgium
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:
2011-04-19 20:37:21.572000 [Debug][MPMain(1)]: Audio streams avail: 1
2011-04-19 20:37:21.572000 [Info.][MPMain(1)]: Audio stream: switching to preferred AC3/MPEG audio stream 0 (only 1 track avail.)
2011-04-19 20:37:21.743000 [Info.][(15)]: TsReaderPlayer: OnVideoFormatChanged - streamtype=H264 resolution=1280x720 aspect ratio=16:9 bitrate=15000000 isInterlaced=False
2011-04-19 20:37:21.825000 [Info.][MPMain(1)]: Rerendering audio and video pins of tsreader filter.
[COLOR="Lime"]2011-04-19 20:37:21.826000 [Debug][MPMain(1)]: TSReaderPlayer: Remove filter - ffdshow Audio Decoder
2011-04-19 20:37:21.843000 [Info.][MPMain(1)]: Added filter: ffdshow Audio Decoder to graph
2011-04-19 20:37:21.843000 [Debug][MPMain(1)]: TSReaderPlayer: Remove filter - ffdshow Video Decoder
2011-04-19 20:37:21.904000 [Info.][MPMain(1)]: Added filter: ffdshow Video Decoder to graph[/COLOR]
2011-04-19 20:37:21.904000 [Debug][MPMain(1)]: Filter: TsReader - try to connect: Audio
2011-04-19 20:37:21.919000 [Debug][MPMain(1)]: Filter: TsReader - try to connect: Video
2011-04-19 20:37:21.944000 [Debug][MPMain(1)]: PlaneScene: PresentImage() dispose surfaces
2011-04-19 20:37:21.945000 [Debug][MPMain(1)]: Filter: TsReader - try to connect: Subtitle
2011-04-19 20:37:21.949000 [Debug][MPMain(1)]:  - failed
2011-04-19 20:37:21.949000 [Debug][MPMain(1)]: Check graph connections for: Enhanced Video Renderer
2011-04-19 20:37:21.949000 [Debug][MPMain(1)]: Check graph connections for: Default DirectSound Device
2011-04-19 20:37:21.950000 [Debug][MPMain(1)]: Check graph connections for: ffdshow Video Decoder
2011-04-19 20:37:21.950000 [Debug][MPMain(1)]: Check graph connections for: ffdshow Audio Decoder
2011-04-19 20:37:21.950000 [Debug][MPMain(1)]: Check graph connections for: TsReader
2011-04-19 20:37:21.968000 [Info.][MPMain(1)]: Reconfigure graph done
2011-04-19 20:37:23.302000 [Debug][(16)]: PlaneScene: crop T, B  : 0, 0
2011-04-19 20:37:23.302000 [Debug][(16)]: PlaneScene: crop L, R  : 0, 0
2011-04-19 20:37:23.303000 [Info.][(16)]: PlaneScene: video WxH  : 1280x720
2011-04-19 20:37:23.303000 [Debug][(16)]: PlaneScene: video AR   : 16:9
2011-04-19 20:37:23.303000 [Info.][(16)]: PlaneScene: screen WxH : 1440x900
2011-04-19 20:37:23.303000 [Debug][(16)]: PlaneScene: AR type    : Normal
2011-04-19 20:37:23.304000 [Debug][(16)]: PlaneScene: PixelRatio : 1
2011-04-19 20:37:23.304000 [Debug][(16)]: PlaneScene: src        : (0,0)-(1280,720)
2011-04-19 20:37:23.304000 [Debug][(16)]: PlaneScene: dst        : (0,45)-(1440,855)

2011-04-19 20:37:34.381000 [Debug][MPMain(1)]: ChannelNavigator.ZapToChannel ASTRA HD - zapdelay False
2011-04-19 20:37:35.200000 [Info.][MPMain(1)]: TSReaderPlayer: OnZapping :-1
2011-04-19 20:37:35.200000 [Debug][MPMain(1)]: g_Player.SeekAbsolute() - Preparing to seek to 0:0:23
2011-04-19 20:37:35.201000 [Info.][MPMain(1)]: TsReaderPlayer:seekabs:234180000 start:490000 end:234180000
2011-04-19 20:37:35.246000 [Info.][MPMain(1)]: TsReaderPlayer: pos: 234180000 start:490000 end:234180000
2011-04-19 20:37:35.246000 [Info.][MPMain(1)]: TsReaderPlayer seek done:0
2011-04-19 20:37:35.247000 [Info.][MPMain(1)]: TSReaderPlayer: current pos:23,369 dur:23,369
2011-04-19 20:37:35.247000 [Info.][MPMain(1)]: TSReaderPlayer:Continue graph
2011-04-19 20:37:35.443000 [Info.][MPMain(1)]: Rerendering audio pin of tsreader filter.
2011-04-19 20:37:35.443000 [Debug][MPMain(1)]: TSReaderPlayer: Remove filter - ffdshow Audio Decoder
2011-04-19 20:37:35.459000 [Info.][MPMain(1)]: Added filter: ffdshow Audio Decoder to graph
[COLOR="Red"]2011-04-19 20:37:35.460000 [Debug][MPMain(1)]: Filter: TsReader - try to connect: Audio
2011-04-19 20:37:35.475000 [Debug][MPMain(1)]: Filter: TsReader - try to connect: Subtitle[/COLOR]
2011-04-19 20:37:35.479000 [Debug][MPMain(1)]:  - failed
2011-04-19 20:37:35.480000 [Debug][MPMain(1)]: Check graph connections for: Enhanced Video Renderer
2011-04-19 20:37:35.480000 [Debug][MPMain(1)]: Check graph connections for: Default DirectSound Device
2011-04-19 20:37:35.480000 [Debug][MPMain(1)]: Check graph connections for: ffdshow Audio Decoder
2011-04-19 20:37:35.481000 [Debug][MPMain(1)]: Check graph connections for: ffdshow Video Decoder
2011-04-19 20:37:35.481000 [Debug][MPMain(1)]: Check graph connections for: TsReader
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).
 

glenn 1990

Portal Pro
July 1, 2010
247
36
Home Country
Belgium Belgium
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.
 

glenn 1990

Portal Pro
July 1, 2010
247
36
Home Country
Belgium Belgium
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:
public int OnVideoFormatChanged(int streamType, int width, int height, int aspectRatioX, int aspectRatioY,
                                    int bitrate, int isInterlaced)
    {     
[COLOR="Red"]
      //reconnect filters, not all codecs can handle channel switching between channels with a different video format.
      iChangedMediaTypes = 2;
      _bMediaTypeChanged = true;[/COLOR]

      _isRadio = false;
      _videoFormat.IsValid = true;
      _videoFormat.streamType = (VideoStreamType)streamType;
      _videoFormat.width = width;
      _videoFormat.height = height;
      _videoFormat.arX = aspectRatioX;
      _videoFormat.arY = aspectRatioY;
      _videoFormat.bitrate = bitrate;
      _videoFormat.isInterlaced = (isInterlaced == 1);
      Log.Info("TsReaderPlayer: OnVideoFormatChanged - {0}", _videoFormat.ToString());
      return 0;
    }
 

Spooky

MP Donator
  • Premium Supporter
  • February 14, 2005
    1,187
    47
    void 4tl
    Home Country
    Austria Austria
    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?
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    I think there are no downsides, I'm using a modded core.dll for some time and don't have any problems with it.

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

    glenn 1990

    Portal Pro
    July 1, 2010
    247
    36
    Home Country
    Belgium Belgium
    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.
     

    gibman

    Retired Team Member
  • Premium Supporter
  • October 4, 2006
    2,998
    1,372
    Aarhus
    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
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    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.
     

    Users who are viewing this thread

    Top Bottom