Skip to content

DaFluffyPotato/dfp-music-overlay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dfp-music-overlay

a local music player for streaming

the title, artist, album, and cover are extracted from the sound file.

might release an executable later...

Features

  • OBS compatible overlay that shows the embeded cover, album, artist, and title of MP3 files
  • lightweight
  • customizable visuals through CSS
  • no windows (only visible in OBS and the recording/stream) and managed by hotkeys
  • supports playing albums and singles randomly

Dependencies

This script uses Python3 and the following dependencies. Install with the following (pip3 may be pip on some installs):

pip3 install Pillow flask pygame stagger pynput

Setup

This script runs off of local music. Create a music folder in the same directory as player.py. Then dump all your music in there. Sub-folders are considered albums and will be played as a group. It's worth noting that the expected file type is .mp3, but .wav and a few other types may work if you switch the music_extension variable in player.py.

An album layout example:

player.py
music/
├─ my_album/
│  ├─ album_song_1.mp3
│  ├─ album_song_2.mp3
├─ my_single_1.mp3
├─ my_single_2.mp3

If you're using OBS, you'll want to add a Browser source.

Right click your new source and go to Properties. I recommend the following configuration (the URL is the most important part):

Hiding the source and reloading it will refresh the webpage the overlay is sourced from if my settings are used. Until you've started the music player for the first time, you probably won't see anything other than some leftover values I had.

Running

If you have Python3 and all of the dependencies installed, you should just have to double click player.py. You'll briefly see a console pop up and disappear. You should start hearing music. If you hear the music, the overlay should be functioning as well (you may need to get OBS to reload the webpage). To stop it, just press shift+esc. If for some reason that isn't working, just kill the python process in task manager. The music is selected randomly with songs in albums grouped.

Customization

Since the overlay is rendered as a webpage, you can easily modify the website by modifying the main.css and the main.html under the static folder. Just make sure that all of the id=s are kept since the JS script expects those.

About

a local music player for streaming

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors