Rpi 4 B Audio Stutter

  • Hi, I recently purchased a Raspberry Pi 4 B with 8 GB of RAM. I installed LibreElec 9.2.6 to a SANDISK Extreme Plus 64 GB SD card by itself. No other OS on the card. I am using audio passthrough with all the formats enabled to go to my Onkyo receiver. The files are stored on various Internal SATA drives in an external JBOD hard drive enclosure hooked up to the PI 4 B with USB 3.0 to the USB 3.0 port. A network cable is plugged into the PI and SAMBA and SSH is on. Nothing is on that could access the PI at the time of the stuttering. The PI is cooled with a CANAKIT case and fan and the included heatsinks.


    I am getting audio drop out/stutter every once in awhile in certain MKV files. If I rewind back to that spot, it does not happen again there. This does not happen on every video. The video portion itself seems fine most of the time.


    I need some suggestions to fix this problem.


    I currently am testing the Best Match audio setting to see if that helps. Changed it from optimized.


    Any other fixes that could help with this problem?


    Would it help to change GPU allocation to 512mb? If so, how do I access the raspi-config. Can't seem to get to it through Putty.


    I am aware this has been an issue with other people.


    Thanks for the help!

  • Please disable de-interlacing. You'll find de-interlacing modes when you play video and activate the GUI status bar by clicking "OK" (gear wheel menu, bottom right).

    DNB music-addicted finger drummer.

  • Please disable de-interlacing. You'll find de-interlacing modes when you play video and activate the GUI status bar by clicking "OK" (gear wheel menu, bottom right).

    I went into the video settings inside the movie I am watching and switched the Deinterlace method to off. It was on auto-select. Just for reference the changing from optimized audio to best match did not work. I have also switched adjust display rate in the player>video settings to always. My PI is connected to a 42 inch Panasonic 1080p only plasma screen. Checking now to see if my problem with the audio stutter is fixed.



    Update - It worked fine for 40 mins or so and then the stutter in the audio returned. I wanted to add that the HDMI cable I am using from my PI to my Onkyo receiver is the HDMI to Micro HDMI that comes with the CANAKIT RPI 4 B 8GB

  • If you have another microSD, test the latest LE nightly. I don't suggest to update from stable to nightly at the moment, due to bugs.

    DNB music-addicted finger drummer.

  • I do and I will test that today or tomorrow. I have just turned off subtitles on all media and de-interlace is set to off on all media as well. I am testing with another film. Will report back.


    This problem is not awful, but it is annoying.


    Update - 58 Minutes into "The Usual Suspects" it begins audio stuttering a few times. Not until then. Sometimes the video is fine during the stutter, sometimes there is a quick pause in the video and then it resumes. Still on the current stable build.


    Will test nightly like I said tonight or tomorrow.

  • I would like to add I have the same issue with a Rpi 4 2GB. I'm not using audio passthrough, but HDMI direct into a Samsung UE22H5000.


    This is the CID of the SD card I'm using "035344534233324780b7154b1e014a00". I believe it's a Sandisk 32GB Ultra.


    I see this both on Youtube and on NFSd mkvs. It's completely intermittent, sometimes it will play perfectly, sometimes it will just start stuttering. The same file, the same YouTube video.

  • I would like to add I have the same issue with a Rpi 4 2GB. I'm not using audio passthrough, but HDMI direct into a Samsung UE22H5000.


    This is the CID of the SD card I'm using "035344534233324780b7154b1e014a00". I believe it's a Sandisk 32GB Ultra.


    I see this both on Youtube and on NFSd mkvs. It's completely intermittent, sometimes it will play perfectly, sometimes it will just start stuttering. The same file, the same YouTube video.

    Glad to hear I am not alone at least. I am using audio passthrough and everything with that section in the settings is enabled. Using a Sandisk Extreme Plus SD Card 64GB


    Disabling hardware acceleration did not work for me. Towards the last 5 minutes of the movie it began stuttering again after working fine for a long while after the last stutter period.

  • I decided to try to switch the USB 3.0 port I was using to the other USB 3.0 port. When I did this and powered up the PI and played two different videos, both MKV files, both were extremely slow with audio ahead of the video. When I re-enabled hardware acceleration it was back to normal. Odd.


    I have left it in that port for the moment.

  • I am getting ready to boot up the latest 02/07/21 nightly, is there anything I need to set or should I just go with the default settings?


    Update on the stable build. I have not so far had an audio stutter/drop out since switching to the other USB 3.0 port. I may or may not have had a half a second or less sluggish moment in the video, but it is really hard to tell for sure. Fingers crossed that the audio stutter will not reappear.


    Update 2:- And as soon as I wrote this audio stutter and slight video stutter at the same time reappeared in the next movie I just resumed. Right when I started watching it.


    For reference, I have hardware acceleration on, subtitles off, video interlacing off, adjust display refresh rate set to always, sync playback to display off, audio output configuration optimized. I am also using a bluetooth remote. Though I wouldn't think that would cause an issue.

  • You can use default settings for the nightly.


    Test your JBOD drive with the same USB cable on a desktop PC to rule out speed issues. The JBOD hard drive could be too slow for some A/V codecs (compare data rates of USB 3.0 and A/V codec).

    DNB music-addicted finger drummer.

  • You can use default settings for the nightly.


    Test your JBOD drive with the same USB cable on a desktop PC to rule out speed issues. The JBOD hard drive could be too slow for some A/V codecs (compare data rates of USB 3.0 and A/V codec).

    I've had this JBOD drive enclosure hooked up to a home theater PC for years playing MKVs with no problems. Just hooked it to the PI a few days ago. Therefore, I don't believe it is the drives. The drives are in ExFat format, but like I said I just watched several things last night and today with no stutter. Stutter just started again recently today


    Could it be I have a bad installation on the SD Card?

  • I think your microSD is fine, otherwise you would find errors at kodi.log. You can play with cache settings at advancedsettings.xml. Maybe it's just a buffer overflow, and buffer mode 3 (no buffer) can fix it.

    DNB music-addicted finger drummer.

  • I think your microSD is fine, otherwise you would find errors at kodi.log. You can play with cache settings at advancedsettings.xml. Maybe it's just a buffer overflow, and buffer mode 3 (no buffer) can fix it.

    I would be willing to take a look at modifying cache settings. You'll have to tell me how to get to it. Do I need to SSH AND Terminal to get to it or can I do it in the settings? Or can I connect via Samba and modify the file on Windows? How do I then change the mode?


    Also, I can't seem to get the nightly to load. I downloaded and unzipped with 7 zip the GZ file and used the LIBREELC installer to format and write and it didn't boot the card up. No image except for the lack of signal from the PI. Then I switched cards and tried to format using SDFormatter and then WIN32DISKIMAGER to write the .img file to the card. Same problem.


    Do I need to try another nightly? I used the LibreELEC-H3.arm-9.80-nightly-20210207-91cf0cd-orangepi-plus2e.img nightly.


    Sorry didn't download the right nightly. Didn't pick RPI 4. Got in now.

  • Look on top of my link for details. Login by SSH and create advancedsettings.xml by using the nano editor, which is part of LE.

    DNB music-addicted finger drummer.

  • Look on top of my link for details. Login by SSH and create advancedsettings.xml by using the nano editor, which is part of LE.

    Okay. I got the nightly installed and I am setting it up with my media. I will test it tonight and let you know. So far no problems.


    So I need to create an XML file called advancedsettings.xml then add the lines or just my required buffer line in your link to the file then save...correct? What is the directory the XML file needs to be go into?


    I'll backup my card just in case I screw up.

  • Update- Audio Stuttering/drop out still exists on the nightly on my Raspberry Pi 4B. The settings are default except I enabled audio passthrough with all audio formats in that area to send to my Onkyo receiver.


    Any settings I can try to change on the nightly to see if it fixes it?