Stuttering in some x264 material - not all, and only in MP (1 Viewer)

osen

Portal Member
January 29, 2008
36
1
Home Country
Sweden Sweden
Hello,

I'm at the point of giving in and switching to another frontend, but I've used MP for years and really want to stick with it so I'm posting here as a last resort :(

The problem I'm experiencing is huge amount of stutter in some, not all, x264 encoded material (only 24p so far). With these files I get terrible, unbearable stutter, while the next episode of the TV series can be smooth as silk. The SHIFT+1 graph is smooth when the stuttering occurs (ignore the dropped frames count, it happens when I press SHIFT+1).

MP_stutter.png


I've tried different codecs: LAV, ffdshow DXVA and regular ffdshow. The stuttering is identical. When I play the same file with MPC-HC with the exact same codecs there is no stutter. When I play it using XBMC there is NO stutter. So what the h- is MP doing differently? I can't figure it out. It seems to be a problem with the encoding of some material, but what I don't understand is how MPC-HC with the same codecs plays the file without stutter.

I've tried upgrading to 1.3.0 BETA with the same results. I've tried a clean install of MP. I've updated all drivers, including latest Catalyst for my GFX. I'm out of ideas.
 

Scythe42

Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    51
    Berlin
    Home Country
    Germany Germany
    Please provide a part of the material where it is always reproducible for you, so someone else can first test if it is file specific MP problem or MP doesn't really play nice with something in your configuration. Or let me know the exact release name and at which times-stamp it happens and I download it. Yes, legal over here.

    Also a classic is the power management of a GPU. In most cases it is responsible for micro stuttering.

    A GPU tries to clock down it's clock rate once in a while to a configured minimum. Then it detects that this doesn't work out and goes back to the old clock rate right away (or after a couple of frames). But such stuff usually comes in fixed intervals and not always at the same time in a file.

    Both ATI and Nvidia are too agressive here for some better review results in regards to power consumptions. The faster the card is the more likely you experience such problems as the GPU is more or less idle. Usually this happens every 5-10 minutes.

    Also it plays a vital role if you decode audio in your PC or if you bitstream. Because when audio is decoded inside Windows anyplayer is more sensitive to the reference clocks whereas bitstreaming is just passing through stuff. Applies to HDMI especially!

    You won't see such things in any stat renderer. But having something like GPU-Z running will show you the dropping clock rate. Compare these with playback in other players. Is there a difference? Bingo!

    Fixing such problems is easy: just configure your GPU so that the clock rate doesn't go too low. This has no impact on load or temperature only power consumption. Just increase it for testing. Check any over clocking guide how to adjust stuff for your GPU. You don't have to go higher. Just increase the minimum level.

    And if you don't care for a little power consumption don't let it clock down at all. As said no influence on temperature or load. For any gaming or media box it's essential not to clock down the GPU during playback or gaming.

    In any such installation I set the minimum clock rate to the maximum of the GPUs default configuration (not talking overclocking here). A simpler slider in most tools like Afterburner/RivaTuner or whatever (you can of course use profiles).

    So give this one a try. GPUs are more complex than CPUs these days and manufactures are too agressive with their power management. It's even worth on mobile GPUs than Desktop GPUs because they try to clock them down even more agressive.

    But first check if it happens always on the same file on the same position. If it happens in more or less fixed intervals instead then ny bet is on GPU down clocking. And the GPU is the reference clock for media playback.
     
    Last edited:

    osen

    Portal Member
    January 29, 2008
    36
    1
    Home Country
    Sweden Sweden
    Hey, thanks a lot for the input!

    One of the releases I'm having problem with is " Last.Resort.S01E09.720p.HDTV.x264-IMMERSE ". The stuttering is noticeable throughout, but one clear example is at ~14:08 to ~14:15. IMMERSE releases seems to be the worst ones.

    I was also suspicious about power management so I forced 3D frequencies but there was no change in the stuttering. The card (HD7950) stays at the same frequencies throughout playback and it's also the same frequencies as is applied when running MPC-HC and XBMC. The stuttering is also always at the same time stamp.

    Regarding audio I use bitstream over SPDIF, but there is no noticeable difference in the stuttering when using sound over HDMI or downmixing to stereo. I'm a bit lost here though, not much knowledge. Is that what you mean?
     
    Last edited:

    Vasilich

    Portal Pro
    August 30, 2009
    3,394
    1,170
    Germany, Mayence
    Home Country
    Russian Federation Russian Federation
    have you ever tried other codecs? THis is where the one of differences between MP and MPC-HC(has own codecs) and XBMC(doesn't rely on DShow codecs at all - VLC approach) is.
    For most people LAV Filter works at best. For your hardware you can use CUDA or DXVA in LAV Video - Hardware Decoder settings
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    51
    Berlin
    Home Country
    Germany Germany
    IMMERSE usually gets a proper more than anyone else. Will download and check how it runs here. PreDB shows no issues...

    Same time stamp means a problem with the file itself (at least in connection with MP). Will download and check on the weekend if the same happens here. Didn't follow that show after the pilot.

    What are you codec and splitter settings? Just to make sure I run it the same way on my development box (Crossfire HD7950 - with a GPU clock set to 910 instead of 300 for "2D" playback, meaning when stuff gets decoded on the CPU or else I have audio dropouts over HDMI when audio is not bitstreamed. HD stuff usually is bitstreamable as audio is never MP3 or FLAC in a proper release or own remux.)

    Edit: LAV never worked for me reliable (tried three days ago with no success). Still huge HD stuttering, bitstreaming only outputs front speakers.

    I'm using FFDShow for all Audio (bitstreaming), Haali Splitter (also for AVIs), MPC-HC codec for X264/VC1, old xvids over ffdshow, MPEG2 is Microsoft.

    Using Shark007 Win7 Codec Pack (too lazy to install codecs manually). Configured everything there and let the DirectShow Merits do their thing. So MP setup is not involved for Video playback. This combination is the most reliable for me since years. It plays back everything. If it doesn't play properly this way it also shows issues in most other players. VLC became the worst over the recent year. MPC-HC still best standalone player. But I use 100% MP anyway.
     
    Last edited:

    osen

    Portal Member
    January 29, 2008
    36
    1
    Home Country
    Sweden Sweden
    have you ever tried other codecs? THis is where the one of differences between MP and MPC-HC(has own codecs) and XBMC(doesn't rely on DShow codecs at all - VLC approach) is.
    For most people LAV Filter works at best. For your hardware you can use CUDA or DXVA in LAV Video - Hardware Decoder settings

    Yes, I have tried LAV DXVA and ffdshow with and without DXVA, no difference at all. I've disabled the internal codecs in MPC-HC so it's using ffdshow DXVA.

    IMMERSE usually gets a proper more than anyone else. Will download and check how it runs here. PreDB shows no issues...

    Same time stamp means a problem with the file itself (at least in connection with MP). Will download and check on the weekend if the same happens here. Didn't follow that show after the pilot.

    What are you codec and splitter settings? Just to make sure I run it the same way on my development box (Crossfire HD7950 - with a GPU clock set to 910 instead of 300 for "2D" playback, meaning when stuff gets decoded on the CPU or else I have audio dropouts over HDMI when audio is not bitstreamed. HD stuff usually is bitstreamable as audio is never MP3 or FLAC in a proper release or own remux.)

    Edit: LAV never worked for me reliable (tried three days ago with no success). Still huge HD stuttering, bitstreaming only outputs front speakers.

    I'm using FFDShow for all Audio (bitstreaming), Haali Splitter (also for AVIs), MPC-HC codec for X264/VC1, old xvids over ffdshow, MPEG2 is Microsoft.

    Using Shark007 Win7 Codec Pack (too lazy to install codecs manually). Configured everything there and let the DirectShow Merits do their thing. So MP setup is not involved for Video playback. This combination is the most reliable for me since years. It plays back everything. If it doesn't play properly this way it also shows issues in most other players. VLC became the worst over the recent year. MPC-HC still best standalone player. But I use 100% MP anyway.

    Yes, I know IMMERSE releases has a lot of problems. But the problem is noticeable in some other releases as well, but not as frequent. Atleast I think so, right now I can't reproduce the problem in other than IMMERSE releases (TV Shows).

    Right now I'm using SAF v6.1.9 so everything is LAV (video codecs, audio and splitter) except for H.264 which is set to ffdshow DXVA, but I have tried LAV as well. I hate fiddling with codecs ;), but I will test Shark007 and see if it makes any difference, thanks.
     

    Scythe42

    Retired Team Member
  • Premium Supporter
  • June 20, 2009
    2,065
    2,703
    51
    Berlin
    Home Country
    Germany Germany
    That's my setup (don't use the latest version. Haven't updated for a long time as there was no need. Just download the latest Shark007 Win7 Codecs).

    Click on the "Audio" first.
    • Click on "disable LAV audio" to reactivate ffdshow
    • Speaker configuration matches input.
    • My receiver can do HD audio codes, so I selecte it for bitstreaming. If your cannot just select AC3/DTS instead.
    audio.png


    We continue with the "AVI" tab.
    • Set Splitter to Haali, to have support for AVIs with multiple audio tracks
    avi.png


    "H264" tab next:
    • Configure as shown to use MPC-HC codec. Didn't configure anything for it.
    h264.png


    Next is "MKV"
    • Configure as show to use Haali
    mkv.png


    I don't care for MOV/OGG and MPG/MP4, therefore no changes - defaults are fine for me

    Next one is the "SWAP" tab
    • Configure as show to use ffdshow for old XVID stuff and AAC audio
    swap.png


    And now we go to the "Config" Tab
    • Set "Subtitle Control" to "No Subtitles". MP still handle them
    • Afterwards check that all settings are still ok. Some reset others when you change codes. So verify again.
    config.png


    Here you can start the various codec config tools as usual for other settings you want.

    I made just the following additional adjustments
    • FFDShow Audio -> Mixer -> Enabled "Expand Stereo to Center".
    • Haali Splitter -> Options -> Input -> Input Buffer Size -> 65535
    And in MediaPortal I enabled under "Codecs and Renderer" -> "Video Codecs" -> "Automatic Decoder Settings", so that the configuration of the just configured DirectShow Merits is used for playback of Video Files.

    These codec configurations are Windows based. So If I want to check if MP is the problem. I can simply playback a file with Windows Media Player or any other player using DirectShow. Always good for a check if its a problem with a file in general or an MP issue. And with Icaros Thumbnailing I have nice previews of all video files as well.

    For Blu-Ray, TV (don't use the TV part), DVD in MP I configured MPEG2 to use Microsoft, H264/VC1 MPC-HC, Audio all set to FFDShow (when available). And Video Renderer is EVR of course. But that's not your problem area, so no need to discuss it at the moment. Just configure to your liking or keep your current configuration.

    And I use this setup on all machines of all of my friends regardless of CPU or GPU. Audio/Video Output is always a HDMI connection to the receiver and from there to TV/Display and/or projector as usual.

    In addition my HD7950 doesn't clocks in various playback modes down. Keyword here is to set "Want_0" to the same value as "Want_1" (both 91000 in my case)" under "CoreClockTarget_0". See various guides like this one how to do it without any additional tools.

    And for a proper picture make sure you use 16-235 for the video color range in CCC if you have washed out colors or crushed blacks. If you are not sure try it. You will immediately see what's right for your connected display.

    And in Windows's sound configuration I selected the connected receiver (over HDMI) as the Default Audio Device of course. But that one was clear I guess.

    Oh yes, of course I use the refresh rate changer to match the refresh rates. But I guess, you do the same.

    I can play back anything without issues unless the file is screwed up and shows issues on all players. Never encountered something that only has MP problems. GPU is mostly idle, never goes over 20% load and CPU (i7 2600K only slightly overclocked) similar.

    We talking about roughly 1800 HD Movies and 15000 TV Show Episodes in various formats from my own remuxed DVD/BluRay collection to very bad MPG TV caps from the late 80s and what SickBeard/CouchPotato brings daily home :)

    Edit: Forgot in addition I registered the madFlac codec on my system for FLAC audio palyback. I think flach support didn't came with the Shark007 pack.
     
    Last edited:

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Video refresh rate is not 1:1 match to the source material, so there will be some periodic stuttering because of that. But since the stuttering you are seeing is more related to the specific files and specific positions in the file it is not the main source for the stuttering.

    In any case do you happen to have AERO disabled or use multi monitor setup?
     

    Users who are viewing this thread

    Top Bottom