Git Product home page Git Product logo

elibroftw / music-caster Goto Github PK

View Code? Open in Web Editor NEW
141.0 4.0 16.0 158.36 MB

Music Caster is a modern music player with the ability to cast audio files, system audio, and URLs to Google Chromecasts, Google Home/Nest Minis, etc.

Home Page: https://elijahlopez.ca/music-caster/

License: Other

Inno Setup 0.42% Python 71.74% Batchfile 0.03% CSS 1.41% HTML 3.60% Tcl 19.52% Go 0.59% Shell 0.54% Starlark 1.99% Dockerfile 0.17%
music-files music-player chromecast vlc media-player casting google-home gui web-gui pysimplegui

music-caster's Introduction

GitHub Releases Source Forge

Music Caster is a modern music player with the ability to cast audio files, system audio, and URLs to Google Chromecasts, Google Home/Nest Minis, etc.

Display languages: English, German, Spanish, French, Italian, Dutch, Russian*, and Ukrainian*

Unique users as of April 23rd 2023: 3,800

Screenshots

Donate or Translate

  • monero:84PR6SkYd5zaFLKDjAFrQfbaAg2c7SV3q3XDZ15QCpEZUggrN4YzY7n8m9XC3deXjo41yWHTm1LrsUpPTYGnRQbD9Cwp8En
  • PayPal
  • Translate Music Caster to other languages

Install

  • IMPORTANT INFORMATION: The tray icon will be in the tray, so you will need to move it to your taskbar
  • Command line installation: winget install "Music Caster"
  • VirusTotal scan
    • If Music Caster is auto-removed, open "Virus & threat protection", then "protection history," and restore all files related to Music Caster

Linux

Not maintained, but I did get it to work on Ubuntu once. Music Caster is not straight forward to package, so you can invoke a sudo-free install script.

mkdir -p ~/bin && git clone --depth 1 https://github.com/elibroftw/music-caster.git ~/bin/music-caster
cd ~/bin/music-caster
./linux_install.sh # use sudo for non-interactive install in case a dependency needs to be installed

Demo

Music Caster Video Demo Thumbnail

Limitations

  • Chromecasts only support the AAC version of WMA files
  • Emojis might not work well. There's always settings.json + WEB GUI though
  • Road Map

Power User Features

Here are Music Caster specific keyboard shortcuts aside from the global media hot-keys.

Shortcut Window Behaviour
Ctrl + Shift + Alt + M Global Activate Main Window
Ctrl + (Shift) + } Main Toggle mini-mode
Esc Main Close Window
Ctrl + Shift + Q Main Exit Program
Scroll Main Volume and Progress Bar
⬆ / A Main Decrease Volume by 5%
⬇ / D Main Increase Volume by 5%
# Main Set Volume to # * 10%
K Main Pause / Resume / Start Playing
Shift + N Main Next Track
Shift + P / Shift + B Main Previous Track
J Main Rewind 5 seconds
L Main Fast-forward 5 seconds
Ctrl + R Main Cycle Repeat
Ctrl + M Main Mute
Ctrl + 1 Main Go to Tab 1 (Queue)
Ctrl + 2 Main Go to Tab 2 (URL)
Ctrl + 3 Main Go to Tab 3 (Library)
Ctrl + 4 Main Go to Tab 4 (Playlists)
Ctrl + 5 Main Go to Tab 5 (Timer)
Ctrl + 6 Main Go to Tab 6 (Metadata)
Ctrl + 7 Main Go to Tab 7 (Settings)

Editing settings.json

  • I do not recommend editing unless you know what you are doing
  • Music Caster will detect changes within 10 seconds of editing settings.json
  • Some settings values are hidden from the GUI for good reason

Data Collection / Privacy Policy

Below is the reasonable data that is collected when errors are encountered. I'm sure other programs collect way more than necessary.

# in handle_exception,
payload = {'VERSION': VERSION, 'FATAL': restart_program, 'EXCEPTION TYPE': exc_type.__name__,
           'LINE': exc_tb.tb_lineno, 'TRACEBACK': trace_back_msg, 'LOG': log_lines,
           'MQ[0]': playing_uri, 'PLAYING_STATUS': str(playing_status), 'DEVICE': device,
           'CWD': os.getcwd(), 'PORTABLE': not os.path.exists(UNINSTALLER),
           'MAC': hashlib.md5(get_mac().encode()).hexdigest(), 'OS': platform.platform(), 'TIME': current_time}

In addition, I collect MD5 hashed MAC addresses and IP addresses in a Google Excel Sheet. Only I have access to this data, I will NEVER give it to anyone else. Will stop collecting analytics once I stop caring about the number of users.

  • Hashed MAC so that I know how many users without knowing the actual MAC addresses
  • IP because I can map out the IPs to a visual map to see where my users are located

Developer Guide

Linux Build Guide

  • Define correct PY variable (requires rebuilding the image)
  • Obtain the mc-builder Image
    • Option A: docker pull elibroftw/mc-builder
    • Option B: docker build . -t elibroftw/mc-builder
      • Remember to have Docker desktop/daemon running already
  • Build source code using: docker run --rm --volume .:/var/music-caster elibroftw/mc-builder

Virtualenv

python3.12 -m venv .venv
.venv\Scripts\activate     # Windows
source .venv/bin/activate  # Non-Windows

music-caster's People

Contributors

dependabot[bot] avatar elibroftw avatar fz0000 avatar george-lewis avatar imgbotapp avatar kastakhov avatar russellbanks avatar vedantmgoyal9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

music-caster's Issues

high frequency of connections to google dns / 8.8.8.8

Traffic to 8.8.8.8 is constantly generated. Especially when the playing window is open.
Looks like get_track_position() calls internet_available().
This seems unnecessary? As well as the other internet_available calls for stop/pause, etc. Those calls to stop/pause/etc could just be in a try block? Since a temporary glitch in access to 8.8.8.8 should have no bearing on the devices on the subnet?

No devices detected

win10, installed version, 4.90.101
firewall disabled

Music caster is not detecting any devices on the local network?
VLC detects the devices fine in the renderer setting so the devices are definitely discoverable. (so does chrome, etc)

kindly advise how I can help debug this. thank you

Error launching Music Caster

When launching an error shows "To run this application, you must install .NET Core."
Downloaded and installed but still getting error.

Feature Request: Dedicated "Play" Hotkey

I'm having a persistent issue where my playlist will randomly stop playing after around 2-4 hours of consistent playback. I'm not sure what is causing it but I will note that my playlist is around 25 hours long with tracks as long as 2 hours. I'd like to write a sort of "keep alive" script in which my device would occasionally hit a "play" hotkey as a workaround to keep this from happening in the future.

P.S. This build is awesome by the way, keep up the great work!

4.90.106 fails to run "DiscordNotFound"

Win10

4.90.102 install version works fine

4.90.105 Install version works fine.
4.90.105 Portable version required .net core download, but does not show casting devices.

4.90.106 Music Caster keeps attempting to restart itself (3 instances in the task manager after starting). Same in install or portable version. Error in log has something to do with Discord? Is there an option to disable this feature /any connections to discord?

'EXCEPTION TYPE': 'DiscordNotFound',
'FATAL': True,
'LINE': 3087,
'LOG': ['2021-11-14 23:30:02,427 INFO (2963): Function called: auto_update()'],
'TRACEBACK': 'Traceback (most recent call last):\n'
' File "music_caster.py", line 3087, in \n'
' File "pypresence/presence.py", line 13, in init\n'
' File "pypresence/baseclient.py", line 28, in init\n'
'pypresence.exceptions.DiscordNotFound: Could not find Discord '
'installed and running on this machine.\n',
'VERSION': '4.90.106'

Text too long for U.I

Some text are too long and we can't see them fully
Maybe on mouse hover make a markee effect ?

image

[Bug] Multiple Instances if many Runs

Hi Elijah,

Would you consider adding a feature to Music Caster so that it only allows one instance at startup? That is, to prevent multiple copies of the program from running at the same time.

The situation is this: When I tell Google Home to start playing music, there are multiple speakers in my house listening for commands. Sometimes those multiple speakers trigger the command simultaneously to Music Caster at the same time.

When this happens, there are multiple, identical streams being sent to the smart speakers, causing playback to be choppy on some speakers, even causing them to temporarily break connection to wifi.

If Music Caster can avoid starting if it detects itself already running, that would help. The trick is, Google Home fires the commands to start multiple instances of MC in rapid succession, so the first instance may not be fully loaded before the second instance attempts to start. Perhaps add a feature so that MC creates a registry key as the first very thing it does at startup to indicate that it is starting, then other instances can check for they key when they attempt to start.

Thanks so much for your help. Music Caster is truly wonderful; I use it every day for my house music!

Take care,
Tom Hammond

Update v4.71.1 crashes when opening GUI

Since last update v4.71.1 the app crashes when opening the GUI.
I can still use everything from the windows tray icon, but crashes when opening settings, then the app restarts itself.
I'm running win10 home edition

api-ms-win-core-path-l1-1-0.dll missing

Hello,

trying with Portable and Install Version on Windows 7, the app will not start showing an error popup that api-ms-win-core-path-l1-1-0.dll is missing.

Are there any pre-requisits?

Thanks
Kevin

UI: pop-up windows have no text

Hi,
when I have moved cursor to a icon (checked with icons in the queue tab) and pop-up window was being showed I had observed no text in this window.

Version - 5.13.17 (Portable)

image

Feature Request: close tray app on GUI closure

This is a bit of a small feature request.
Is it possible to add in the settings a checkbox so that the tray app completely closes when you close the main interface?
I like to keep as few apps running at any time.
Thanks.

Fatal error detected

Annotation 2020-06-25 204854

Musique Caster v4.49.4 for Windows 10 x64

Music.Caster.x64.Setup.exe

"Fatal error detected.
Failed to execute script music_caster"
always at program start.

-On Windows 10x64 2004.
-Using: .exe and Portable.

May you add a command line option to choose the device to stream to?

Hi Elijah,

I noticed that in the json file, the "previous_device" field contains the address to the current smart device that music will be cast to. This way, the next time one starts Music Caster, it will default to this device.

May you make a command line option to specify a device address at startup? I can learn the various device addresses by activating them via the system icon, then viewing the json file.

As an aside, I am able to start and control Music Caster with my voice via Google Home. I can choose various playlists via voice, too. If you are interested in the idea, I can email the instructions I wrote to do this.

Thanks!
Tom

[Feature] Drag and Drop

Could it be possible to add a feature where you could just drag and drop a file onto the UI which will add it to queue or play it.

Aiff (.aiff) file format support

Any possibility of getting playback support for the .aiff file format in the near future?

Now, I might've missed something but I can't get it to cast .aiff files. It just turns silent whenever I try and cast so I assume that it means no .aiff support at this moment in time. It'd be highly appreciated if support for this file format is added in the future.

Hard coded UI strings on Timer tab

I found that some UI strings are not translated.
e.g.

gui_window['timer_text'].update(f'Timer set for {timer_set_to}')

image

and

gui_window['timer_text'].update('No Timer Set')

gui_window['timer_text'].update('No Timer Set')

image


By the way, it seems that the following string is not in the translation file. But I think it's acceptable:

[Sg.Text(f'Music Caster v{VERSION} by', font=FONT_NORMAL),

image

Translators Needed!

Thanks for this great app.
Could you provide an editable glossary of texts used in the program, in order to translate them to other languages?
I would offer myself as a Spanish translator...

NULL ID3 tag strings info when not defined

Rather than displaying "Unknown Album" (or "Unknown Artist" or "Unknown Title"), sub missing strings for NULL, so that they appear cleaner in the app and on the streaming device. If all three are blank, sub the title for "Music Caster" and leave the others NULL for the stream display so that it looks clean. In that case, you can leave all as "Unknown" in the app, so the user is motivated to use the Metadata editor.

(Also, consider changing the order from Album, Title, Artist to Artist, Title, Album in the app, leaving the streaming display as it is.)

Feature Request: Shuffle in UI same as in Web GUI

The Web GUI has both shuffle mode and repeat icons.
The standard program interface has repeat but no shuffle.

This means if you want play an album/all tracks on shuffle you have to open the web interface,

Thanks :)

Installs but doesn't cast

It installs, sends the track info, but never streams the audio. Noticed this during install. On Xubuntu 20.04.4:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pycaption 2.0.6 requires beautifulsoup4<4.10,>=4.8.1, but you have beautifulsoup4 4.11.1 which is incompatible.
pycaption 2.0.6 requires cssutils<2.4,>=2.0.0, but you have cssutils 2.4.0 which is incompatible.
pycaption 2.0.6 requires lxml<4.7,>=4.6.3, but you have lxml 4.8.0 which is incompatible.
ocrmypdf 13.4.1 requires pdfminer.six!=20200720,<=20211012,>=20191110, but you have pdfminer-six 20220319 which is incompatible.
catt 0.12.7 requires pychromecast==9.2.0, but you have pychromecast 10.3.0 which is incompatible.
catt 0.12.7 requires zeroconf==0.31.0, but you have zeroconf 0.38.6 which is incompatible.

MP3 tag problem

Music Caster has trouble reading MP3 tags from most of my MP3 files. It reads the cover art on all files, but cannot read the album/artist/title on many of them. Please see the attached screenshot. The 03, 10, 16, etc. represent filenames.

All of my MP3s show the tag information properly in other music programs such as Win 11 Media Player, WinAmp, and VLC.

When I open the “bad” and “good” MP3 files in the “MP3tag” program, they all have ID3v2.3 and ID3v1 tags set (both MP3s that show properly in Music Caster and MP3s that do not show properly). So I don’t know why some MP3s are not showing their MP3 tags in Music Caster while other MP3 files show tag information fine.

Attached are examples of a “good” MP3 and a “bad” MP3, as shown in the screenshot. Can you help?

Thanks,
Tom
screenshot
06 (bad).zip
01 (good).zip

Multiple playback devices / Playback syncing of local and remote

I think you could have music syncing of local speakers and chromecast if you add a delay slider in the UI to delay the computer playback from 0ms to 20000ms (or maybe just a textbox input) then the user can choose how much delay they want to add to local speaker playback

won't cast anymore

For a few weeks now music caster will not cast to my google home. Thought it was just my old computer acting up but I bought a new one and music caster still won't cast anymore.

Always shuffles when adding files or playlists

Hello, great app and thank you so much for making it!
I just installed it today and have been trying it out, but immediately came to a small snag.
Whenever I add files from a folder, or from a playlist to my current queue it will shuffle them.
This is frustrating as I like to listen to audiobooks and entire albums in sequence.

I can of course just reorganize the files in the current queue, but it is unfortunate that I cannot then save them and then recall them in that order.

Thank you very much!

Column Selection (and Sorting)

Awesome player. Love the low latency... great job! Music Caster would be even better with the ability to display columns from the file (e.g. BPM, Track Length, Bitrate, Album, Track Number) and have each be sortable. With this addition, it would allow a person like myself to replace my go to player (Media Monkey, which I have issues using for streaming). I think to simplify, you could read the file's metadata and display the following default columns (Artists, Album, Track Name, Track Number, BPM, Bitrate, Length), and allow all to be turned on/off, sorted, and ordered as the user wants. The player may need a slightly wider footprint to accommodate the new information, but I believe the upgrade would be worth it.

Keyboard shortcut for exiting program?

Thanks for the excellent program, Elijah! I started using Music Caster for the first time last evening.

I like the numerous keyboard shortcuts available in the program. May you add a shortcut for fully closing the program (including the system tray icon)? That way I can create macros that will start Music Caster, play some music, then close it all with keyboard shortcuts.

Thank you!

Tom Hammond
[email protected]

Puts the volume at 100%

Hey,

I like this program very much.
Because it's the only alternative to VLC (which has no delay).

This program however has delay, but the least amount compared to alternatives.
However..

This program puts my soundbars volume at 100%, and no warnings or whatsoever when turning the program on.
So if one has, say a youtube video, or music running.
Chances are you will blow your speakers, so i'm just posting this to make other aware.

Hopefully my new soundbar is not blown out now...

Great program non-theless.
Only thing is, firewall has to be turned off for it to send audio (program is allowed in FW)

Thanks for your hard work!

Music Caster update detected as Trojan

Music Caster auto-updated, and Windows detected it as a Trojan.
I don't know if it's a false positive, or whether you got supply chain attacked, but the README should probably say something about this ...

higher compatibilty

Greetings,
I stumbled upon this app to stream to my Google Nest speakers.
It is working, however I can't stream flac. Is a larger file compatibility planned?

Recent releases seem to have broken almost all functionality on Windows 11

Not sure what changed, but on my windows 11 laptop, that can cast from youtube, and other apps, I'm no longer getting almost anything funcitoning correctly in the app. The local device option doesn't play audio through the sound card and the cast options look the same, but are not sending cast information successfully.

Anyone else experiencing these issues? I'm happy to shoot a more detail setup list to you to try and start a debug session.

Cant get work in Ubuntu, PYTHON_VLC_LIB_PATH problem

Hi,
I am getting error when running
$ python3 $HOME/bin/music-caster/src/music_caster.py --debug
DEBUG: True
Locked music_caster.lock pid = 11110
Cannot load lib specified by PYTHON_VLC_LIB_PATH env. variable

what is the problem?
Thank You very much

Can't access the settings tray

After installing I can't seem to access the settings tray when right clicking the icon on the taskbar. Nothing comes up when right clicking on it. It installed and runs fine, seems odd.
exe and portable version
Running on Windows 10 LTSB 2016 x64 v1607

Music Caster suddenly cannot start anymore

Since maybe 2 hours, I cannot start the Windows app anymore. I receive this error message during startup:

Failed to execute script 'music_caster' due to unhandled exception: 'charmap' codec can't decode byte 0x81 in position 74: character maps to

Traceback (most recent call last):
File "music_caster.py", line 202, in
File "music_caster.py", line 132, in activate_from_lock_file
File "music_caster.py", line 42, in is_already_running
File "music_caster.py", line 33, in get_running_processes
File "encodings\cp1252.py", line 23, in decode
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 74: character maps to

I speculate you deployed a new version via auto update. But I also made some config changes in my audio settings, which could have led to this problem...

Is a screenshot available?

Hi there!

Was wondering if you have a screenshot of this application available that you could put into your Readme, and maybe update the one you posted In May of 2021 in the PySimpleGUI screenshots. It looked great back then and there have been changes that result in matching scrollbars so it has to look even better by now.

You're a prolific coder and am not sure if you post everything you build. I'm interested in seeing what you've made with PySimpleGUI over the years and if you've got other examples.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.