I have an RPi4. I am using RetroPie, which means I am still on Raspbian Buster (Lite). Everything is `update && full-upgrade`d.
https://retropie.org.uk
https://github.com/RetroPie/RetroPie-Setup.git
This ain't really a "RetroPie" problem since it's from my own addition, but I was hoping someone could help me troubleshoot.
I'm using `mpg123` to play MP3 music in the background while browsing EmulationStation. Based on https://retropie.org.uk/forum/topic/913 ... b-friendly
https://github.com/s1eve-mcdichae1/Retr ... /bgm123.sh
After running for several hours or overnight, then upon quit ES I see this error repeated many times in the console:
Note: Illegal Audio-MPEG-Header 0x00000000 at offset 132860.
[src/libmpg123/parse.c:1287] error: not attempting to resync...
Those two lines repeat for at least a full screen of it before the welcome prompt comes up, the "offset" value counting up by fours and always topping out at the same value `offset 132860` every time.
The music is started in `autostart.sh` immediately before EmulationStation with:
(sleep 6; pgrep emulationstatio >/dev/null && bash "/opt/retropie/supplementary/bgm123/bgm_start.sh") & #bgm123
emulationstation #auto
The [start script](https://github.com/s1eve-mcdichae1/Retr ... m_start.sh) then uses this command to play the music:
mpg123 -Z -@- >/dev/null 2>&1 < <(find "$music_dir" -type f -iname "*.mp3")
The error only shows upon exiting from ES. If I run the music start script manually from console, then I don't see the errors at all.
Upon exiting ES, the music is stopped with a `pkill` via `~/.bashrc` (via secondary [stop script](https://github.com/s1eve-mcdichae1/Retr ... gm_stop.sh)). By # commenting out that line in `.bashrc`, I can have it keep playing after quit ES. However, this seems to makes absolutely no difference, in that if I let it ES run for hours and then quit, I still see the errors, but if I quit ES early and let music keep play in the console, they errors are still not shown (just like when I start the music script from console, manually).
---
Is this a problem with my files, or with how I'm playing them? Or with **mpg123** itself, and in that case if I can't fix it, can I at least suppress the error message from showing (it doesn't seem to affect the playback)?
---
Observations:
It happens every time as long as I wait long enough (~5 hours). If I run ES for only a short while (~1.5 hour), then it doesn't happen. I have sometimes observed it with intermediary timeframes (~2.5-3 hour) but this is not consistent.
I modified the script for troubleshooting, to play a single song on repeat, and log to a file like:
mpg123 --test --loop -1 -@- >/home/pi/bgm.log 2>&1 < <(find "$music_dir" -type f -name "a-ha - Take on Me.mp3")
None of it seemed to make any difference, I'm still seeing the error even after these changes.
The error only shows on the console. Switching `>/dev/null` in the script for `>/home/pi/bgm.log`, the error never shows up in the log neither when started manually *or* from autostart behind ES.
Replacing `-Z` (random play) for `--loop -1` (infinite repeat), the error is still present.
Adding `--test` (only decode, no output; each song takes only a few seconds to process), it still shows the errors, still only after long time.
It doesn't appear to be triggered by any particular song/file. I ran through them all, once, in about ten minutes (about 200 songs, with `--test` but without `-Z` or `--loop -1`) and nothing happened, yet when running a single song on repeat (by refining the `find` command), it does error eventually (tested with two different song files).
It doesn't interrupt the music, the song is still playing immediately before I quit ES and see the errors. I didn't listen closely for the whole ~5 hours to make sure there were no blips or glitches, but it sounded fine whenever I did listen, intermittently.
https://retropie.org.uk
https://github.com/RetroPie/RetroPie-Setup.git
This ain't really a "RetroPie" problem since it's from my own addition, but I was hoping someone could help me troubleshoot.
I'm using `mpg123` to play MP3 music in the background while browsing EmulationStation. Based on https://retropie.org.uk/forum/topic/913 ... b-friendly
https://github.com/s1eve-mcdichae1/Retr ... /bgm123.sh
After running for several hours or overnight, then upon quit ES I see this error repeated many times in the console:
Note: Illegal Audio-MPEG-Header 0x00000000 at offset 132860.
[src/libmpg123/parse.c:1287] error: not attempting to resync...
Those two lines repeat for at least a full screen of it before the welcome prompt comes up, the "offset" value counting up by fours and always topping out at the same value `offset 132860` every time.
The music is started in `autostart.sh` immediately before EmulationStation with:
(sleep 6; pgrep emulationstatio >/dev/null && bash "/opt/retropie/supplementary/bgm123/bgm_start.sh") & #bgm123
emulationstation #auto
The [start script](https://github.com/s1eve-mcdichae1/Retr ... m_start.sh) then uses this command to play the music:
mpg123 -Z -@- >/dev/null 2>&1 < <(find "$music_dir" -type f -iname "*.mp3")
The error only shows upon exiting from ES. If I run the music start script manually from console, then I don't see the errors at all.
Upon exiting ES, the music is stopped with a `pkill` via `~/.bashrc` (via secondary [stop script](https://github.com/s1eve-mcdichae1/Retr ... gm_stop.sh)). By # commenting out that line in `.bashrc`, I can have it keep playing after quit ES. However, this seems to makes absolutely no difference, in that if I let it ES run for hours and then quit, I still see the errors, but if I quit ES early and let music keep play in the console, they errors are still not shown (just like when I start the music script from console, manually).
---
Is this a problem with my files, or with how I'm playing them? Or with **mpg123** itself, and in that case if I can't fix it, can I at least suppress the error message from showing (it doesn't seem to affect the playback)?
---
Observations:
It happens every time as long as I wait long enough (~5 hours). If I run ES for only a short while (~1.5 hour), then it doesn't happen. I have sometimes observed it with intermediary timeframes (~2.5-3 hour) but this is not consistent.
I modified the script for troubleshooting, to play a single song on repeat, and log to a file like:
mpg123 --test --loop -1 -@- >/home/pi/bgm.log 2>&1 < <(find "$music_dir" -type f -name "a-ha - Take on Me.mp3")
None of it seemed to make any difference, I'm still seeing the error even after these changes.
The error only shows on the console. Switching `>/dev/null` in the script for `>/home/pi/bgm.log`, the error never shows up in the log neither when started manually *or* from autostart behind ES.
Replacing `-Z` (random play) for `--loop -1` (infinite repeat), the error is still present.
Adding `--test` (only decode, no output; each song takes only a few seconds to process), it still shows the errors, still only after long time.
It doesn't appear to be triggered by any particular song/file. I ran through them all, once, in about ten minutes (about 200 songs, with `--test` but without `-Z` or `--loop -1`) and nothing happened, yet when running a single song on repeat (by refining the `find` command), it does error eventually (tested with two different song files).
It doesn't interrupt the music, the song is still playing immediately before I quit ES and see the errors. I didn't listen closely for the whole ~5 hours to make sure there were no blips or glitches, but it sounded fine whenever I did listen, intermittently.
Statistics: Posted by sleve_mcdichael — Thu Mar 14, 2024 4:23 am — Replies 0 — Views 10