Memory leak in MPC HC codec? (1 Viewer)

damaster

Portal Pro
November 23, 2007
412
35
Home Country
Canada Canada
I am not sure what this has to do with Moving Pictures ?

The fan art system works fine... the leak is when you hack Media Portal to implement it.... Correct me if I am wrong ?

This has NOTHING to do with MovingPictures. I started the thread thinking it might be related to all the backdrops being loaded in memory, but fforde confirmed that MovingPictures is cleaning that up quite well. I then went on to investigate other sources of the leak and that's when I switched decoders and discovered the real source of the problem.

It would probably be a good idea for one of the mods to move this thread to the right sub-forum now that it's an issue with the MpcVideoDec decoder OR with MediaPortal not cleaning up after the decoder (yet to be confirmed).
 

tourettes

Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    I'll move this to some correct place after someone reproduces the issue with MPC codec under my videos, with no Moving Pictures plugin installed. Just to be sure :)
     

    damaster

    Portal Pro
    November 23, 2007
    412
    35
    Home Country
    Canada Canada
    I'll move this to some correct place after someone reproduces the issue with MPC codec under my videos, with no Moving Pictures plugin installed. Just to be sure :)

    Would you be satisfied if I reproduced this as follows?:
    - Remove MovingPictures plugin
    - Use Blue3 skin, not StreamedMP
    - Play videos from My Videos, not MovingPictures

    I'll try to perform the above tonight and let you know how it goes.
     

    edterbak

    Portal Pro
    March 4, 2008
    2,114
    1,176
    Home Country
    Netherlands Netherlands
    I am using Windows XP+SP3 / Mediaportal SVN 21668. SKin StreamedMP and MPC-HC codec as well. I tested it and below is my result.

    I played 6-7 times The Dark Knight 1080P. The page file usage started off at 0.98GB.
    After that I watched about 3 minutes of The Day After Tomorrow 720P. You can see the extended low cpu usage during that period in the graph. End of the page file is 1.16GB, so there is a slight increase.
     

    Attachments

    • MEMORY.png
      MEMORY.png
      47.5 KB

    damaster

    Portal Pro
    November 23, 2007
    412
    35
    Home Country
    Canada Canada
    I am using Windows XP+SP3 / Mediaportal SVN 21668. SKin StreamedMP and MPC-HC codec as well. I tested it and below is my result.

    I played 6-7 times The Dark Knight 1080P. The page file usage started off at 0.98GB.
    After that I watched about 3 minutes of The Day After Tomorrow 720P. You can see the extended low cpu usage during that period in the graph. End of the page file is 1.16GB, so there is a slight increase.

    It's hard to tell from your Task Manager screen capture. Can you try with ProcessExplorer instead and monitor only the CPU and mem usage of the MediaPortal.exe process?

    I played and stopped about 12-14 different 1080p movies until the private bytes usage got up to 1.4 GB and after which I couldn't play video anymore and had to restart MediaPortal. You don't need to play the video for long, just a few seconds and then stop it and move on to the next one. With each start/stop there is memory that never gets freed up until the leak eventually grows quite large.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    I'll move this to some correct place after someone reproduces the issue with MPC codec under my videos, with no Moving Pictures plugin installed. Just to be sure :)

    Would you be satisfied if I reproduced this as follows?:
    - Remove MovingPictures plugin
    - Use Blue3 skin, not StreamedMP
    - Play videos from My Videos, not MovingPictures

    Yes. If possible disable all extra 3rd party plugins.
     

    Pretoriano

    Retired Team Member
  • Premium Supporter
  • October 1, 2007
    526
    133
    Roma, Italia
    Home Country
    Romania Romania
    I've did some test too and i managed to reach 1.4 gb of RAM but i must tell i forced the things a bit and thats because i've tested over 20 mkv files and in 2 different ways.

    1)if i always stop an already playing movie before i start another one i barelly reach 500 mb (tested more than 5 movies)
    2)this time i only played 1 movie but in this mode:start playing in fullscreen ->go back one step by pressing escape ->press play another time (MP it will ask if you want to resume-say yes) and you will see the memory usage growing every time you repeat this steps.

    Even if this is not how normal users use MP i think that MP should clean the RAM,but this is not happend not even after i stop the movie,go to My TV and start watching.
     

    Attachments

    • ProcessXP.jpg
      ProcessXP.jpg
      87.4 KB

    damaster

    Portal Pro
    November 23, 2007
    412
    35
    Home Country
    Canada Canada
    I've did some test too and i managed to reach 1.4 gb of RAM but i must tell i forced the things a bit and thats because i've tested over 20 mkv files and in 2 different ways.

    1)if i always stop an already playing movie before i start another one i barelly reach 500 mb (tested more than 5 movies)
    2)this time i only played 1 movie but in this mode:start playing in fullscreen ->go back one step by pressing escape ->press play another time (MP it will ask if you want to resume-say yes) and you will see the memory usage growing every time you repeat this steps.

    Even if this is not how normal users use MP i think that MP should clean the RAM,but this is not happend not even after i stop the movie,go to My TV and start watching.

    Interesting. I am able to reproduce this problem by playing and then actually stopping the video and then starting another one. I get to 1.4GB after doing that about 12-14 times.

    Can you provide more details regarding your set up?:
    - EVR or VMR?
    - Hardware acceleration? I'm assuming YES.
    - Any plugins installed? MovingPictures, TvSeries?
     

    Pretoriano

    Retired Team Member
  • Premium Supporter
  • October 1, 2007
    526
    133
    Roma, Italia
    Home Country
    Romania Romania
    Code:
    Can you provide more details regarding your set up?

    here you go:
    OS - Vista x64 SP1 with EVR
    Plugins - Moving Pictures,TV-Series,My Trailers,My Sleep Timer,
    Shortcut'er,Shoutcast
    Hardware Acceleration - Yes (MPC video decoder)
    And on the test PC i have cpp2005's subs patch.

    Code:
    Yes. If possible disable all extra 3rd party plugins.

    I agree with tourettes and i will disable all 3rd party plugins when testing this cause for me it's not a real memory leak (i can watch movies for hours without the RAM going so high) and it's more like MP need do to some RAM cleaning in some cases.
     

    damaster

    Portal Pro
    November 23, 2007
    412
    35
    Home Country
    Canada Canada
    I'll move this to some correct place after someone reproduces the issue with MPC codec under my videos, with no Moving Pictures plugin installed. Just to be sure :)

    Ok, so I ran some more tests. When I disable DXVA in MpcVideoDec, then the memory leak does not occur, so it would seem the memory leak is only happening with hardware acceleration (I'm using an ATI Radeon HD 3470 with Catalyst 9.1).

    I also ran my test with MovingPictures and TvSeries plugins disabled and with the Blue3 Wide skin. I used MyVideos to play several videos and here is the proof:
    attachment.php


    and:
    attachment.php


    Can you please move this thread to the appropriate section? Unfortunately, I am unable to test with another DirectShow based media player. For some reason MPC-HC just refuses to play video on my system. Any other media player suggestions that can play MKV files?
     

    Attachments

    • CropperCapture[19] (2).Png
      CropperCapture[19] (2).Png
      876 KB
    • CropperCapture[21].Png
      CropperCapture[21].Png
      39.4 KB

    Users who are viewing this thread

    Top Bottom