RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    1. Home
    2. Tags
    3. mpg123
    Log in to post
    • All categories
    • S

      BGM, vcgencmd force_audio, and mpg123 &

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support audio channel bgm mpg123
      3
      1 Votes
      3 Posts
      517 Views
      S

      Still not sure why the things I was trying from command-line didn't work, but this seems to be getting the job done pretty reliably:

      autostart.sh:

      (vcgencmd force_audio hdmi 1 >/dev/null 2>&1; sleep 8; mpg123 -Z /home/pi/RetroPie/bgm/*.mp3 >/dev/null 2>&1) & #bgm emulationstation #auto

      .bashrc (excerpt):

      [[ $(tty) == "/dev/tty1" ]] && (vcgencmd force_audio hdmi 0 >/dev/null 2>&1; pkill mpg123) #bgm # RETROPIE PROFILE START

      ...this seems to work as intended, even though I couldn't get it to work on command-line for whatever reason. With this setup the audio channel opens in time for the music to begin, and closes again when I quit to console.

      In autostart.sh, I put vcgencmd before the sleep command because when I did the other way, sometimes it would open up in time for the music but other times it wouldn't. This way it opens up and "hums" for a few seconds before the music starts, but it always starts from the first instant, so an acceptable compromise.

      In .bashrc, the original guide said to put the command inside the RETROPIE PROFILE section but that whole section gets rewritten if you update bashwelcometweak; putting it outside the section preserves it even when the welcome tweak is updated.

    • J

      Background playing two songs at once

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support mpg123 bgmplayer
      5
      0 Votes
      5 Posts
      632 Views
      J

      @mitu That's the funny thing. mpg123 IS part of BGM so uninstalling BGM uninstalls both (hence the loss of music completely) but uninstalling mgp123 by itself removed its config I suppose. I manually plugged the info back in and left BGM out this time around and finally got it working. Thank you for your reply.

    • retropieuser555R

      Sound notification play when a retroarchievement is reached

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development retroachievemen mpg123
      4
      1 Votes
      4 Posts
      990 Views
      retropieuser555R

      @meleu That's a great find! Just tested it on retroarch on my Mac and it works nicely, even managed to change the sound file thanks to you!

      I can't remember but I think I might be running retroarch 1.9 on my pi4 anyway as I manually updated a while back. I'll have a check next time I use it, Thanks again!

    • SingingCoyote13S

      How can i add Menu (MP3) Music to my Retropie on Linux Xubuntu 18.04 LTS ? (Solved)

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support menu music mp3 mpg123 mpg123 bgm
      8
      0 Votes
      8 Posts
      1k Views
      SingingCoyote13S

      @hooperre dont know if it works with ports, my retropie version is latest 4.5.1 latest setup-script and runs on linux Xubuntu 18.04LTS.
      btw, this is exact how it worked on my linux pc
      its exact what i did to get music in the menus,
      maybe do not forget to install mpg123 from synaptic package manager

    • cyperghostC

      mpg123 broken under Raspbian STRETCH?

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support mpg123 buster
      4
      0 Votes
      4 Posts
      456 Views
      cyperghostC

      Thanks ... this worked!
      So < /dev/null inits a EOF in file input, never saw this. Is this a common method?
      mpg123 is the clear prefered mp3 player, very small footprint - no stucks in sound during loading. Perfect.

      Edit: Changed title

    • cyperghostC

      [opendev] The Background Music Box

      Watching Ignoring Scheduled Pinned Locked Moved Ideas and Development cyperghost bgm mp3 mpg123
      33
      4 Votes
      33 Posts
      5k Views
      M

      @mitu ok, i think i get it now. im using this as a crash course in writing scripts, so im sorry if i dont understand how this should work. but this is a huge help, thank you.

    • BagoflaxiaB

      mpg123 player works fine for BGM, but kills game audio.

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support retropie 4.4 raspberrypi 3b mpg123 no in game audi
      2
      0 Votes
      2 Posts
      564 Views
      mituM

      @bagoflaxia said in mpg123 player works fine for BGM, but kills game audio.:

      Is there a command I can put in to the mpg123 config to stop this from happening?

      There is a topic on how to set this up in RetroPie - https://retropie.org.uk/forum/topic/9133/quick-and-easy-guide-for-adding-music-to-emulatonstation-on-retropie-noob-friendly.

      Follow the instructions in the topic and add the commands to stop mpg123 when a game starts by editing the runcommand-onstart.sh script, this should stop the music from playing while the game runs.

    • Y

      Menu music for retropie stopped working

      Watching Ignoring Scheduled Pinned Locked Moved Help and Support retropie backg mpg123 pythonscript
      1
      0 Votes
      1 Posts
      672 Views
      No one has replied