popcornmix / omxplayer

omxplayer
GNU General Public License v2.0
1.01k stars 334 forks source link

Audio cuts out every ~2 min #788

Open bma-diy opened 3 years ago

bma-diy commented 3 years ago

When my Pi has been on for a few hours, audio begins to cut out of video files every 1 minute 56 seconds approximately.

I've had this happen on two different Pi's: Raspberry Pi 3 B and my current Pi: Raspberry pi 3A+. The way I seemed to have fixed it the first time was by reflashing my Raspberry Pi and configuring everything from scratch.

I've done all the basic stuff:

hdmi_force_hotplug=1 hdmi_group=1 hdmi_mode=16 hdmi_force_edid_audio=1 hdmi_drive=2 config_hdmi_boost=7 <- this did not help so I reverted back

The logs from /var/log don't tell me anything, and my python script doesn't throw any errors.

My question is: how can I properly troubleshoot omxplayer audio issues the next time it occurs?

popcornmix commented 3 years ago

omxplayer has been deprecated in favour of vlc. Do you get the same issue with vlc?

bma-diy commented 3 years ago

omxplayer has been deprecated in favour of vlc. Do you get the same issue with vlc?

Although it happens frequently, I don't know how to willingly reproduce it so its hard to say with certainty if problem is ever resolved. I tested out VLC, and it doesnt seem to be as user friendly with Python than omxplayer is. One thing I did as a workaround, I installed pulseaudio to see if that would help out and so far issue hasnt came back

popcornmix commented 3 years ago

Assuming you are using the native outputs of omxplayer (local or hdmi) then audio is output from gpu and linux side drivers (like pulseaudio) are not involved.

bma-diy commented 3 years ago

Yes I am using hdmi as my output. Yeah I was afraid pulse audio wouldn't be relevant. What I did to pulseaudio config was: edit /etc/pulse/default.pa and commented out "load-module module-suspend-on-idle". I will have to do more testing to see if issue is no longer present. Unfortunately I used omxplayer -g and would check /var/log/syslog and I would not see anything obviously jump out to me. It only happened on an insignia Roku TV. I swapped hdmi cable, swapped ports and issue persisted. But on my monitor with speakers attached, issue never came.