Audio stops working after a while

I am running 2x RBP2 at two different locations. They are using OSMC, installed from the installer about 2 weeks ago to play a directory full of movie trailers. They both seem to be randomly losing audio. Sometimes they play for hours without error, sometimes a whole day, sometimes only minutes. I have combed over the logs and it is not always the same file that causes the audio issues. I turned on debug logging and by the time I noticed it had happened again, the log had grown to over 700MB. I can’t even open the log file. I’m turning off verbose components logging and will wait for the issue to occur again so I can upload a (hopefully) manageable log file. In the meanwhile, here are the stats:

Device: Raspberry Pi 2
Installation media: SDCard
Connection: Wired
Power Supply Type: CanaKit 2.5A USB Power Supply with Micro USB Cable specially designed for the Raspberry Pi 2 (UL Listed) (from this kit: http://www.amazon.com/CanaKit-Raspberry-Complete-Original-Preloaded/dp/B008XVAVAW)
Power specs: 2.5A
Peripherals: No peripherals. Wifi module may or may not be plugged in, but is not being utilized.
Storage Device: Approximately 2-3GB worth of movie trailers in 480p, 720p, or 1080p mov and mp4 files are stored on the SD card. They playlist is being created via an autoexec.py script I will post below. I believe the issue is completely unrelated to this script.
OSMC version: 2015.07-1
XBMC version: 15.1-RC1 Git:Unknown compiled Aug 7 2015.
Codecs: none purchased
Audio/Video Output: HDMI for both, passthrough disabled.
Overclocked: Default osmc install settings.
Config.txt Extras:

gpu_mem_1024=256
disable_overscan=1
start_x=1
dtoverlay=lirc-rpi:gpio_out_pin=17,gpio_in_pin=18
disable_splash=1
hdmi_force_hotplug=1
hdmi_drive=2
hdmi_group=1
#hdmi_edid_file=1  (intentionally disabled)

autoexec.py

import os, xbmc

def get_filepaths(global,local):
file_paths = []
for root, directories, files in os.walk(global):
    for filename in files:
        filepath = os.path.join(root, filename)
        file_paths.append(filepath)
for root,directories,files in os.walk(local):
    for filename in files:
        filepath = os.path.join(root, filename)
        file_paths.append(filepath)
return file_paths

pl=xbmc.PlayList(1)
pl.clear()

full_file_paths = get_filepaths("/home/osmc/trailers","/home/osmc/localonly")

for i in range(len(full_file_paths)):
    xbmc.PlayList(1).add(full_file_paths[i])

xbmc.Player().play(pl)
xbmc.executebuiltin('xbmc.PlayerControl(RandomOn)')
xbmc.executebuiltin('xbmc.PlayerControl(RepeatAll)')

This script creates a playlist out of all of the files in /home/osmc/trailers and /home/osmc/localonly. The trailers folder is a btsync shared folder that keeps folders of 3 separate pi’s synced with a central computer. The localonly is a folder to place trailers that only play at that specific location. (i.e. one location is getting a title that another location is not, I only want to play that trailer at the first location.) These are uploaded manually via sftp on a location by location basis.

Apart from the install of btsync and the autoexec.py script, the only thing non-standard on the install is a script that opens up a reverse ssh tunnel and forwards the ports for btsync and ssh to it, so I can access to troubleshoot even though the pi is behind a firewall. The script is very basic bash. If it doesn’t find pidof ssh it creates one. It is executed every 60 seconds by cron.

It should be noted that a third RBP model B is also running the setup without audio issues. Version: 2015.07-1 15.1-RC1 compiled Aug 7 2015

Relevant portion of non-debug log while we wait:

09:17:41 81945.585938 T:1593832480   ERROR: 

CDVDAudio::AddPacketsRenderer - timeout adding data to renderer
09:17:43 81946.796875 T:1593832480   ERROR: Previous line repeats 1 times.
09:17:43 81946.796875 T:1593832480  NOTICE: CDVDPlayerAudio::OutputPacket skipping a packets of duration 21
09:17:44 81948.031250 T:1593832480  NOTICE: Previous line repeats 56 times.
09:17:44 81948.031250 T:1593832480   ERROR: CDVDAudio::AddPacketsRenderer - timeout adding data to renderer
09:17:44 81948.031250 T:1593832480  NOTICE: CDVDPlayerAudio::OutputPacket skipping a packets of duration 21
09:17:45 81949.281250 T:1593832480  NOTICE: Previous line repeats 57 times.
09:17:45 81949.281250 T:1593832480   ERROR: CDVDAudio::AddPacketsRenderer - timeout adding data to renderer
09:17:45 81949.281250 T:1593832480  NOTICE: CDVDPlayerAudio::OutputPacket skipping a packets of duration 21
09:17:45 81949.375000 T:1947202592  NOTICE: Previous line repeats 56 times.
09:17:45 81949.375000 T:1947202592   ERROR: ActiveAE::InitSink - failed to init

I am unable to reproduce the issue until after the log has grown terribly large. When I arrived this morning, the sound was off again. The log file was over 2GB. I reset it about 3 hours ago and the sound hasn’t gone out yet. The log file is already 475MB.

Does enabling omxplayer in video/acceleration settings avoid the issue?

I have changed the setting to allow omxplayer acceleration. I’ll update again if the sound goes out or it’s ran solid for 48 hours without error.

Thanks for the suggestion.

Is it works? I have samé problem

Yes. Enabling omxplayer acceleration fixed the problem!

The updated version of OSMC on my raspberry pi block all possible sounds.

I kept an earlier version : I have sound.

So, is there a fix for this ?

To get a better understanding of the problem you are experiencing we need more information from you. The best way to get this information is for you to upload logs that demonstrate your problem. You can learn more about how to submit a useful support request here.

Thanks for your understanding. We hope that we can help you get up and running again shortly.