Strange video streaming issues

Hi everyone! I’m having some really weird issues with my setup. I have several Raspi2 boards with MPG2 licenses that are set up to play a UDP video stream on boot with autoexec.py. The streams are provided to us by our cable provider and are used on devices all around our building, generally without issue.

Everything seems to be working well when the Pi’s first boot up - the script runs without errors, the stream opens and plays smoothly with perfect audio synchronization and it will stay like this for a seemingly random amount of time. Anywhere from 10 minutes to several hours later, something happens.

CPU usage on one core will shoot up to 100%, up from the 25% max I would see when the stream is playing normally. The stream will start chugging, dropping frames and losing synchronization with the sound. In the codec information pane, I can see that it is skipping frames at a rate of 2 - 4 per second and the error rate is fluctuating anywhere from a 100% to 8000%.

It seems to me like this issue is related to a buffer or other data structure getting filled up and performance suffering as a result. Other devices, like a laptop running VLC don’t encounter this issue - so I have tried using the advancedsettings.xml file to increase the buffer size to 40MB as well as setting it to use the filesystem for buffering. I have also forced buffering for all video and increased the buffer factor to 4.0. None of these settings have helped the issue.

Here is a log file from one of the devices when it started doing this - it’s fairly long though and the issue didn’t start happening until perhaps the last ten minutes of the log file. I’d appreciate any insight as to what could be causing the issue or things I could try to get it fixed. Let me know if I left out any information that might be helpful. Thanks for everything!

Here is a much smaller log file that also shows whats happening. It’s less verbose but captures the issue that was occurring before I shut it off.

http://xbmclogs.com/pg0duk8ft