Playback Video - sound stuttering after March 5th Update

@sam_nazarko on my system the videos with either ac3 or aac audio decoders are not working.
Mp3 audio decoders works fine…

Here is a sample file I tried…

I simply save the file to my network share and run it… No sound…
Play it on any other device (phone) and you’ll hear it…

Hope this helps you replicate the sound problem…

I too am struggling with this sound issue and tried Sam’s fix but unfortunately it didn’t help.

It seems every movie/tv show I watch stutters every 20-30 sec.

Hoping there’s a fix coming soon.

Is there another method to downgrade??

Users who claim to still have these problems have yet to provide any diagnostic information that would be required to debug the issue. There is a way to provide a useful request for support. It’s on our wiki.

This is the crux of the problem.

People have downgraded first without providing any detailed logs, so I’ve been unable to determine the cause of the issue and in turn I cannot fix it for the few users that are experiencing an issue.

@sam_nazarko So that sample file plays just fine on your end?
I am still on the problem version.
Please see if this helps you:
https://drive.google.com/file/d/1VMGfM8ICo9uB9OPG44cfzk_xf4g6geuC
Log too big for pastebin…
I restarted OSMC and then played the above mp4… Sound gone. I looped it a few times before grabbing the log…

Here’s my logs:
https://paste.osmc.tv/ipomacadol

I played The.Zen.Diaries.of.Garry.Shandling.2018.Part.2.720p.HDTV.x264-aAF[N1C].mkv and it was doing the audio stuttering, not super bad but it was doing it at least every minute I think.

It’s very strange because i can’t reproduce this stuttering on my Pi2 setup man…

@duppieza how i can download your 9 seconds files and test on my setup ?

If i remember… all test here it’s do by a network shared folder ??

EDIT
I have download this Mp4 from upper here:

General
Complete name               : Playback Video - sound stuttering after March 5th Update - Help and Support _ Raspberry Pi - OSMC Forums.MP4
Format                      : MPEG-4
Format profile              : Base Media
Codec ID                    : isom (isom/iso2/avc1/mp41)
File size                   : 5.85 MiB
Duration                    : 8 s 580 ms
Overall bit rate            : 5 720 kb/s
Writing application         : Lavf55.37.101

Video
ID                          : 1
Format                      : AVC
Format/Info                 : Advanced Video Codec
Format profile              : Baseline@L3.1
Format settings             : 1 Ref Frames
Format settings, CABAC      : No
Format settings, ReFrames   : 1 frame
Codec ID                    : avc1
Codec ID/Info               : Advanced Video Coding
Duration                    : 8 s 334 ms
Bit rate                    : 5 554 kb/s
Nominal bit rate            : 5 200 kb/s
Width                       : 1 280 pixels
Height                      : 720 pixels
Display aspect ratio        : 16:9
Frame rate mode             : Constant
Frame rate                  : 24.000 FPS
Color space                 : YUV
Chroma subsampling          : 4:2:0
Bit depth                   : 8 bits
Scan type                   : Progressive
Bits/(Pixel*Frame)          : 0.251
Stream size                 : 5.52 MiB (94%)
Writing library             : x264 core 119
Encoding settings           : cabac=0 / ref=1 / deblock=1:0:0 / analyse=0x1:0x1 / me=dia / subme=1 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=0 / keyint=250 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc=abr / mbtree=0 / bitrate=5200 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language                    : English

Audio
ID                          : 2
Format                      : AAC
Format/Info                 : Advanced Audio Codec
Format profile              : LC
Codec ID                    : mp4a-40-2
Duration                    : 8 s 580 ms
Duration_LastFrame          : -12 ms
Bit rate mode               : Constant
Bit rate                    : 320 kb/s
Channel(s)                  : 2 channels
Channel(s)_Original         : 6 channels
Channel positions           : Front: L C R, Side: L R, LFE
Sampling rate               : 44.1 kHz
Frame rate                  : 43.066 FPS (1024 SPF)
Compression mode            : Lossy
Stream size                 : 336 KiB (6%)
Language                    : English
Default                     : Yes
Alternate group             : 1

I have copied it on a USB Device attached to my Pi2… apparently all it’s works.
If you want i can test by a network shared… i have a samba shared folder from my pc to my OSMC setup…

I’ll try playing the same video from USB and see if the issue goes away.
But yes, all my media is in shared network folder, connected via wireless (5G).
I’ve also set kodi to cache the entire video to the SDcard as I found this helped avoid any buffering issues, but I had done this last year sometime and it was working fine up until the latest update.
It’s like the video and audio gets out of sync and has to sync up every now and then, causing the stuttering.

It’s also possibly a about 9 seconds video it’s not the enought long to see this trouble ?

I have to admit… i never tryed to see a long video like a film in mp4 shared by networks on my osmc setup before that thread. Usually i copy using a FTP client all file to a pendrive connected to my Pi2 and from here i never see problems like out of sync or struttering reproduction.

Meantime later i want try… i have a shared folder from my pc to my Pi2. I copyed the upper file and test and see what’s append.

@FaustoGSR
Thanks for taking the time…
My setup plays all my stuff from a smb shared folder over a 100mbps LAN setup.
Again, if the audio is Mp3 decoded on the mp4 file, all is perfect. My files are normally about a gig big… So this file should work just fine… But it’s not on my side.
And this all started after the last update…

How did you do this?

Setting memorysize=0 on flash based memory is not recommended as it creates excessive wear to the memory card.

I’ve had the same problem with audio stuttering since the update. On both Pi2 and Pi3b+
On video from network, and buffering to sd card.

There was no stuttering when the video was 100% loaded to sd card.
Now I disabled sd card buffering, and is keeping a short buffer on RAM. No stuttering then either.

I tried playing the same video on a USB memory stick and had no audio issues. Seems to be just when it’s streaming over network from NAS/shared folder.
I’ll try a wired connection next, see if that makes any difference.
I understand about the excessive wear on memory card but I’d rather replace my card every year or whatever and never have buffering issues.

I’ll try disabling the buffering too, see if that fixes it. Thanks for the suggestion.

@duppieza ok… right now i have my Pi2 occupied by my father :slight_smile:

As soon i can i test the mp4 over my smb shared folder…

I don’t know if it’s the same the mp4 downloaded… if you want to host a sample i thinks it’s better.

I tried with wired instead of wireless, no difference, still audio issues.

My cache settings were:
advancedsettings>
cache>
memorysize>0
buffermode>157286400
readfactor>4.0
/cache>
/advancedsettings>

I’ve removed the advancedsettings.xml completly, rebooted and no more stuttering, woohoo!

I’m having the same issue on a raspberry pi 2 b+
Only the video stutters, the audios seems to be ok.

The issue started after upgrading to the March update. The issue didn’t happen before

Hey!

I had a somewhat similar audio issue after the march update (Rpi3, no peripherals other than official touchscreen, sound via audio jack):
When trying to listen to music (did NOT test video), the music files would be played WAY slower and very choppy. Almost as if it was intentionally being played at like 25% (plus choppy).
After some testing, i found out that switching the audio output from HDMI + Analogue to only Analogue or ALSA (as i am using the 3.5mm jack) would remove the choppyness, but the music would still only play at around 80% speed.

After installing the 4.14.30-2 development kernel and booting up with ALSA as output selected… The issue disappeared. “Yay!” I thought, and tried switching back to HDMI + Analogue… Issue still there!
Back to ALSA: sound still choppy/slow… In fact, no setting will help get the sound back to normal. Only rebooting will help (since it seems to auto-boot with ALSA as output).
For me personally that fixes my issue, but it might not for everybody.
If i can help with some more information, feel free to ask… i have no idea which information might be pertinent to fixing the issue (i only have screens for /proc/interrupts AFTER march update and with the updated kernel, but could potentially also manually downgrade to the old kernel).

I’m also getting some sound stuttering after the March update in my RPi3
Errors in both pass-trough or processing sound to a 3.1 output (from a ac3 5.1ch source)
Relevant kodi.log ERRORS/NOTICES during playback (got with tail -f):

17:48:57.778 T:1886384896 NOTICE: CAESinkPi:AddPackets Underrun (delay:0.00 frames:1536)
18:08:10.918 T:1886384896 NOTICE: CAESinkPi:AddPackets Underrun (delay:0.00 frames:2400)

No relevant errors or warnings got from journalctl -f (running im a separate terminal window at the time of playing).

This is my advancedsettings.xml:

<advancedsettings>
	<cache>
		<buffermode>1</buffermode>
		<memorysize>123000111</memorysize>
		<readfactor>30</readfactor>
	</cache>
	<videolibrary>
		<cleanonupdate>true</cleanonupdate>
	</videolibrary>
</advancedsettings>

[NOTE] these sound stuttering issues seems to happen when transmission is downloading a file (not 100% sure) - this did not happened before March 2018 update

@gysr, this is not related.
Only audio issue. Video would be something else.
Check advancedsettings file…