Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Guide] Use MP3 natively without sox #97

Open
MrBoombastic opened this issue Oct 4, 2022 · 0 comments
Open

[Guide] Use MP3 natively without sox #97

MrBoombastic opened this issue Oct 4, 2022 · 0 comments

Comments

@MrBoombastic
Copy link

Since libsndfile1-dev version 1.1.0 supports MP3 (http://libsndfile.github.io/libsndfile/#history), we can update that library to support MP3 playback via PiFmAdv. However, this version is not supported in current Raspbian (Bullseye). Fortunately, we can use Raspbian Bookworm repo.

  1. Update your RPi (optional, but recommended).
    sudo bash -c 'for i in update {,dist-}upgrade auto{remove,clean}; do apt-get $i -y; done'

  2. Edit /etc/apt/sources.list file using your favourite editor, for example sudo vim /etc/apt/sources.list. In my case, the file looks like this:

deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi

Replace bullseye with bookworm.

deb http://raspbian.raspberrypi.org/raspbian/ bookworm main contrib non-free rpi
  1. Run sudo apt update. It wil say that 69420 packages can be updated - ignore that.
  2. Run sudo apt install libsndfile1-dev. It will update only this package and its dependencies.
  3. Confirm that libsndfile1-dev is now version 1.1.0 or later. Run sudo apt-cache policy libsndfile1-dev. My output:
libsndfile1-dev:
  Installed: 1.1.0-2 
(...)
  1. Repeat step 1, but now revert bookworm to bullseye.

Congratulations, now you can use MP3 files with PiFmAdv without using sox! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant