Joep Cremers Weblog

A Monster Science Created – But Could Not Destroy!

Joep Cremers Weblog - A Monster Science Created – But Could Not Destroy!

Playstation Media Server 1080p .MKV Stuttering

Problem

PMS is exceeding the available Java heap memory allocated when PMS starts. Newer versions of PMS handle this error by half-ing the transcode buffer (sometimes leading to skips or crashes depending on the renderer) while older versions just let the video crash.
The heap is the sum of the transcode buffer memory plus all of the overhead memory (the actual PMS application, media library, iTunes support, Radio plugin, etc), and the overhead memory can grow quite a bit if the “extra” features (iTunes, Radio plugin, etc) are enabled.

Solution

Install the latest version of Java and PS3 Media Server. Goto General Configuration and Install as a Windows Service.

Edit file C:\Program Files (x86)\PS3 Media Server\win32\service\wrapper.conf , search the file for the Heap Size and change it from 768 to 1536.

# Maximum Java Heap Size (in MB)
 wrapper.java.maxmemory=768  (change this to 1536)
  • 32-bit JVM on a 64-bit machine with 4+ GB of RAM can safely use a heapsize value of 1536
  • 32-bit JVM on a 32-bit machine with 4 GB of RAM should at most use a heapsize value of 1200

Goto Transcoding Settings and change these settings:

  • Transcode Buffer: 600
  • Number of cores: 4
  • Video Quality Settings: Keyint=5:vqscale=2:vqmin=3

 

Restart the PS3 Media Server service. The javaw.exe*32 process will now use more memory and your 1080p video should run smoothly.

Category: Software
Tag: , ,
  • Overjoyed says:

    Thanks a ton! This resolved all my stuttering issues for hi-def mkv stuttering. Everything works like a charm now.

    April 3, 2012 at 01:38
  • Carl says:

    Worked great! Thanks! Get this on their forum..

    July 7, 2012 at 23:59
  • dross says:

    How do you change the heap size??? the instructions don’t work….i’m really confused?

    July 28, 2012 at 22:01
  • laws says:

    i don’t get how i can change the heap size according to the instructions. it doesn’t make sense!!

    July 28, 2012 at 22:02
    • Brainsnack says:

      /facepalm

      Are you serious? At which of these two steps did things get to hard for you to understand?

      1. Go to the directory mentioned
      2. Right click ‘wrapper.con’, choose ‘edit file with..’ and save

      That’s it. Works perfectly.

      September 6, 2012 at 18:49
  • Tim says:

    Brainsnack, you forgot a step:

    3. Once you right click, next choose open with and look for notepad in the list. Once you open it look for the line listed above and then save.

    Your done.

    October 30, 2012 at 17:31
  • ash sibb says:

    Does anyone know how to do this on a Mac

    January 21, 2013 at 15:15
  • matt says:

    I get access denied when editing the conf… :/

    February 15, 2013 at 06:38
    • Amanda says:

      i was getting that error as well, save it to your desktop, then drag and drop back to the folder and select” move and replace” to save over.

      March 7, 2013 at 17:21
  • Solari says:

    In Windows 7/8, to edit the .conf file: Run notepad as administrator, THEN open the .conf file from file->open. You’ll be able to save it because you run notepad as an administrator. (Amanda’s solution works as well, but this is faster imo)

    June 5, 2013 at 23:15
  • Baudolino says:

    I had the same problem, stuttering when stream MKV 1080p HD files to my Play Station 3 through PS3 Media Server. I use MacBookPro, running OSX 10.9 Mavericks)

    After much search and lots of trial and error here is what I think is a working solution for ppl with setup similar to mine.

    First to identify the problem. When trying to stream a heavy 1080p HD file there are likely two bottlenecks in your system:

    1-The first bottleneck is in processing the file for streaming (for this you need to adjust the settings of PS3 Media server and the heap size for Java explained for Mac OSX under Step 1b below).

    2-If you are streaming over wifi within your home and you have an older wifi router, most likely there is another bottleneck as the wifi network will not be able to handle the traffic given the quantity of data that is being transmitted to your Play Station. For that look at step 2 below.

    Step 1 – Adjust the heap size:

    look for this file: /Applications/PS3 Media Server.app/Contents/MacOS/pms.sh (open FINDER, open APPLICATIONS folder, locate the PS3 Media Server app, right click, choose show package contents, open the folder Contents > MacOS and open the file pms.sh to edit.)

    Inside the “pms.sh” file look for the following text: “-Xmx768M”. Increase the number (depending on how much ram your Mac has, but if you have 4GB or more of RAM memory you can safely double the number) to 1536 (this is the amount of memory you are allowing the PS3 Server app to use while buffering and streaming (make sure to keep all the other letters/characters as is), then save and close the file. Quit and re-open PS3 Media Server App.

    Open the PS3 Media server app and adjust the values as is mentioned above in this topic. From the transcoding settings tab in the app, adjust the value to 600 and if you have a quad core MacBook adjust the number of cores accordingly 2 for Intel Core Duo and 4 for quad core. (to find out more, look up your processor info from “about this mac” in the apple menu top left.

    AN IMPORTANT SECOND STEP.. If you have spare cash, buy a new router with dual band streaming capacity capable of HD streaming at high speeds (e.g. RT-N66U Dual-Band Wireless-N900 Router) IF NOT then make sure to make all the connections WIRED not WIRELESS

    Simply connect your computer to your existing router using a LAN cable, also connect your Play Station to the same router using a cable. On the Play Station make sure your Play Station is now using the wired connection, not the wireless connection (in case you did not turn the wireless feature off)

    FINALLY restart the PS3 Media Server on your Mac, make sure it is being picked up by your play station
    ENJOY STUTTER FREE HD STREAMING!

    November 19, 2013 at 14:10

Your email address will not be published. Required fields are marked *

*