Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A simple C tool to convert any MP3 into a seamless 1-hour loop with crossfades. Inspired by YouTube's 1-hour chill playlists. Perfect for relaxing, studying, or looping your favorite song offline.

License

Notifications You must be signed in to change notification settings

Zephurion/mp3-loop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

5 Commits

Repository files navigation

🎡 mp3-loop

mp3-loop is a lightweight C program that converts any MP3 audio file into a seamless 1-hour loop. Inspired by those long, relaxing YouTube playlists that loop your favorite tracks for hours, this tool gives you the power to do the same β€” but offline, and with your own audio files.


✨ Why?

You’ve probably come across those 1-hour versions of songs on YouTube β€” ambient tracks, game soundtracks, lofi beats, or even meme songs. They help people relax, study, focus, or just enjoy a good vibe.

So taste this medicine:

mp3_loop your-audio.mp3

...and enjoy your favorite track on loop, without ads, buffering, or distractions.


πŸ›  Requirements

Make sure you have the following dependencies installed:

  • libmpg123 – MP3 decoding
  • libmp3lame – MP3 encoding
  • libsndfile – (used via pkg-config)
  • CMake (v3.12 or higher)
  • GCC or compatible C compiler

Install on Ubuntu/Debian:

sudo apt update
sudo apt install build-essential cmake libmpg123-dev libmp3lame-dev libsndfile1-dev

🧱 Building the Project

  1. Clone the repository:
git clone https://github.com/zephurion/mp3-loop.git
cd mp3-loop
  1. Configure and build using CMake:
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make

This will produce an executable called mp3_loop inside the build/ folder.


▢️ How to Use

Run the tool from the build directory:

./mp3_loop your-audio.mp3

If everything goes well, you'll get a new file:

1 hour - your-audio.mp3

It’s the same track, seamlessly looped until it hits exactly 1 hour with a subtle crossfade between loops.

Need help?

./mp3_loop help
# or
./mp3_loop -h

πŸ“ Project Structure

mp3-loop/
β”œβ”€β”€ CMakeLists.txt # CMake build file
β”œβ”€β”€ include/
β”‚ └── main.h # Header for function declarations
β”œβ”€β”€ src/
β”‚ └── main.c # Main program logic
β”œβ”€β”€ build/ # Build output (created after compiling)
└── README.md

πŸ’‘ Tip

Want to loop an audio meme or a soundtrack from a game? Just download it as MP3, and let mp3_loop do the rest.


πŸ“ƒ License

MIT License β€” feel free to fork, modify, and share.


Enjoy looping. πŸŒ€

About

A simple C tool to convert any MP3 into a seamless 1-hour loop with crossfades. Inspired by YouTube's 1-hour chill playlists. Perfect for relaxing, studying, or looping your favorite song offline.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /