{"id":15107520,"url":"https://github.com/sdetoni/chromecast_audio_slinger","last_synced_at":"2026-03-11T09:31:03.175Z","repository":{"id":255160879,"uuid":"848721772","full_name":"sdetoni/chromecast_audio_slinger","owner":"sdetoni","description":"Play audio files from local and remote SMB file shares to a Chrome Cast audio device using a Web based GUI","archived":false,"fork":false,"pushed_at":"2026-02-03T07:09:33.000Z","size":16768,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-03T20:16:10.598Z","etag":null,"topics":["chromecast","chromecast-audio","jquery","jquery-ui","python-3"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sdetoni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-28T09:33:13.000Z","updated_at":"2026-02-03T07:09:37.000Z","dependencies_parsed_at":"2025-08-24T09:05:33.100Z","dependency_job_id":"9ec4a18e-6e4e-4f34-b3a8-663c3c22f273","html_url":"https://github.com/sdetoni/chromecast_audio_slinger","commit_stats":null,"previous_names":["sdetoni/chromecast_audio_slinger"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sdetoni/chromecast_audio_slinger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdetoni%2Fchromecast_audio_slinger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdetoni%2Fchromecast_audio_slinger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdetoni%2Fchromecast_audio_slinger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdetoni%2Fchromecast_audio_slinger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sdetoni","download_url":"https://codeload.github.com/sdetoni/chromecast_audio_slinger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdetoni%2Fchromecast_audio_slinger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30377272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T06:09:32.197Z","status":"ssl_error","status_checked_at":"2026-03-11T06:09:17.086Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chromecast","chromecast-audio","jquery","jquery-ui","python-3"],"created_at":"2024-09-25T21:25:17.494Z","updated_at":"2026-03-11T09:31:03.166Z","avatar_url":"https://github.com/sdetoni.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chrome Cast Audio Slinger : Written by Steven De Toni, 2024\nThe application is suitable for NAS (Network Attached Storage) servers that will allow it to \ncast audio files to Chrome Cast, DLNA, and Web Browser devices independently of your phone, tablet, or P.C.\nI has the ability to cast from remote CIFS/Windows file shares as well as local files.\n\nThis service will run as a Daemon, monitoring Chrome Cast devices, and sling/cast audio, video files \nto devices from its pending queue.\n\n## Version 0.075 Work in progress:\n * Debugged HTTP Range requests further and hopefully fix it finally.\n * Identified my DLNA issue with Metadata and Samsung T.Vs. Basically the dislike the source URL with ?query=1234 type \n   parameters within the URL. So I have implemented a dynamically generated ID HASH that references the required metadata\n   in the Slinger DB and send the correct file to the DLNA device, thus getting around the complex query parameter issue\n   causing confusion.\n\n## Version 0.07 Work in progress:\n * Bug fixes for device scanning and removal of devices once no longer on the network\n * Added initial/preliminary DLNA support, will work with Kodi, but may not work with your T.V due to\n   likely requiring an valid url without parameters (looking at you Samsung). This is still work in progress to get around\n   this limitation.\n * Added limited video support, can play mp4, avi, mkv etc type movies, update your config to add this ability\n * Added SMB metadata retrival limit to prevent large files taking along to cast, especially appropriate for video files\n * New config settings:\n```\n    MATCH_MUSIC_TYPE=mkv::video/mkv\n    MATCH_MUSIC_TYPE=avi::video/avi\n    MATCH_MUSIC_TYPE=mp4::video/mp4\n    \n    # MAX 200 megs to download to extract metadata\n    SMB_MAX_METADATA_SCAN_SIZE=(1024*1024)*200       \n``` \n\n## Version 0.06 Work in progress:\n * Added in browser Config Editor\n * Added graphical UI tweaks to the playlist\n * Added Spotify Playlist loader\n * Added metadata file validation (i.e. if you delete music files then run validation to remove metadata)\n * Moved most of the Ajax calls to use POST to work around encoding GET parameters\n\n## Version 0.05 Work in progress:\n * Added Custom temp directory location for quick RAM disk type transcoding operations.\n \n## Version 0.04 Work in progress:\n * Added .dsf SACD format playback to Chromecast via conversion to FLAC 24 bit 96khz\n * Update supported **Python release** up to **3.13**\n * Fixed graphical issues\n\n## Config Chrome Cast Slinger\n\nYou may need to set the IP address manually depending on how your systems is configured.\nFor Linux, it a safe to set this to 0.0.0.0 to listen on all available network devices.\n\n**vim config/daemon.cfg**\n```\n# ---- Basic webserver config ----\nHTTP_SERVERNAME=0.0.0.0\n...\n```\nupdate to ip address of 0.0.0.0\n\n\n**vim config/slinger.cfg**\n```\n[slinger]\n    # ---- Database Settings ----\n    DB_FILENAME=./config/slinger.db\n    DB_VERSION=1.0\n    # max time in seconds: 10 minutes\n    DB_SQLEXEC_MAXTIME=600\n    # max time in milli-seconds: 30 seconds\n    DB_SQLLOCK_MAXTIME=30000\n\n    # album art folder name\n    ALBUM_ART_FILENAME=folder.jpg\n    ALBUM_ART_FILENAME=folder.png\n    ALBUM_ART_FILENAME=cover.jpg\n    ALBUM_ART_FILENAME=cover.png\n\n    # supported chromecast file type extension :: and mime/content type sent to chromecast device\n    MATCH_MUSIC_TYPE=flac::audio/flac\n    MATCH_MUSIC_TYPE=mp3::audio/mp3\n    MATCH_MUSIC_TYPE=ogg::audio/ogg\n    MATCH_MUSIC_TYPE=wav::audio/wav\n    MATCH_MUSIC_TYPE=webm::audio/opus\n    MATCH_MUSIC_TYPE=opus::audio/opus\n    MATCH_MUSIC_TYPE=oga::audio/opus\n    MATCH_MUSIC_TYPE=aac::audio/aac\n    MATCH_MUSIC_TYPE=aacp::audio/aac\n    MATCH_MUSIC_TYPE=3gpp::audio/aac\n    MATCH_MUSIC_TYPE=3gpp2::audio/aac\n    MATCH_MUSIC_TYPE=m4a::audio/aac\n    \n    MATCH_MUSIC_TYPE=mkv::video/mkv\n    MATCH_MUSIC_TYPE=avi::video/avi\n    MATCH_MUSIC_TYPE=mp4::video/mp4    \n    \n    # dynamic transcoding\n    MATCH_MUSIC_TYPE=dsf::audio/transcode\n    MATCH_MUSIC_TYPE=wv::audio/transcode\n\n    # transcode formats using ffmpeg\n    TC_FFMPEG_AUDIO_FORMAT=s32\n    TC_FFMPEG_AUDIO_FREQ=96000\n    TC_FFMPEG_AUDIO_OUT_FORMAT=flac\n\n    # extra parameter used in audio\n    TC_FFMPEG_OTHER_AUDIO_CFG=-af\n    TC_FFMPEG_OTHER_AUDIO_CFG=\"lowpass=24000, volume=6dB\"\n    TC_FFMPEG_OTHER_AUDIO_CFG=-compression_level\n    TC_FFMPEG_OTHER_AUDIO_CFG=0\n\n    # Override ffmpeg executable location\n    #TC_FFMPEG_EXE_OVERRIDE=\n    #TC_FFMPEG_EXE_OVERRIDE=.\\ffmpeg\\bin\\ffmpeg.exe\n    #TC_FFMPEG_EXE_OVERRIDE=c:\\ffmpeg\\bin\\ffmpeg.exe\n    #TC_FFMPEG_EXE_OVERRIDE=/usr/bin/ffmpeg    \n\t\n    # Transcoding file cache location.\n    # This location will store previous transcoded files up to a specified directory usage,\n    # then if will purge previous cached file based upon least recently used algorithm\n    #TC_CACHE_LOCATION=d:\\ffmpeg_cache\n    TC_CACHE_LOCATION=\n\n    # accepted formats are: nKB, nMB, nGB, nTB\n    # examples : 100GB == 100 Gigabytes to limit size of cache\n    #              2TB ==   2 Terabytes to limit size of cache\n    TC_CACHE_MAX_SIZE=10GB\n    \t\n    # Override temp file creating (i.e them in an RAM drive for fast I/O), by default its your OS Temp location.\n    # example:\n    #     mount -o size=1G -t tmpfs none /mnt/tmpfs\n    # TEMP_FILE_LOCATION=/mnt/tmpfs\n    TEMP_FILE_LOCATION=\t\n\n    # how long to cache chrome cast device info before re-query device info in seconds. Default 10 mins\n    CHROMECAST_CACHE_TIMEOUT=600\n    \n    # if the song seek position fails to work, then you can disable\n    # it with this option.\n    DISABLE_SONG_SEEK=true    \n\n    # Spotify API credentials to allow Slinger to read playlists and\n    # match against your existing files (metadata must be fully loaded)\n    SPOTIFY_CLIENT_ID=5f573c9620494bae87890c0f08a60293\n    SPOTIFT_CLIENT_SECRET=212476d9b0f3472eaa762d90b19b0ba8\n\n    # accepted formats using:\n    #   \u003cusername/password\u003e::UNC Path\n    #   UNC Path \\\\server\\Share\\filename\n    SMB_MUSIC_UNCPATH=::\\\\192.168.20.14\\MediaServer\\Music\n    SMB_MUSIC_UNCPATH=::\\\\192.168.20.23\\ExtUSB-4TB\\music\n    FILE_MUSIC_UNCPATH=D:\\music\\\n    \n    # MAX 200 megs to download to extract metadata\n    SMB_MAX_METADATA_SCAN_SIZE=(1024*1024)*200       \n\n    SEARCH_RESULT_LIMIT=1000\n\n    # Scraper Schedular\n    # Time to scrape in cron format\n    # * * * * *\n    # | | | | |\n    # | | | | day of the week (0–6) (Sunday to Saturday;\n    # | | | month (1–12)             7 is also Sunday on some systems)\n    # | | day of the month (1–31)\n    # | hour (0–23)\n    # minute (0–59)\n    #SCRAPER_EVENT_TIME=0 23 * * *\n```\n\nSet your own SMB_MUSIC_UNCPATH or FILE_MUSIC_UNCPATH\nto point to your music files/folders\n\nAdd/Change folder art files and types as required.\n\n\n## Make python virtual envs\n\n**python3 -m venv ./python-slinger**\n\n**ls -al**\n```\ntotal 64\ndrwxr-xr-x 8 root   root     4096 Aug 24 21:42 .\ndrwxr-xr-x 9 root   root     4096 Aug 24 21:31 ..\ndrwxrwxrwx 2 nobody nogroup  4096 Aug 24 21:35 config\ndrwxrwxrwx 3 nobody nogroup  4096 Aug 24 21:30 daemon\n-rwxrw-rw- 1 nobody nogroup 18092 Oct 18  2023 LICENSE\ndrwxrwxrwx 2 nobody nogroup  4096 Aug 24 21:30 logs\n**drwxr-xr-x 5 root   root     4096 Aug 24 21:42 python-slinger**\n-rwxrw-rw- 1 nobody nogroup   547 Aug 24 21:26 README.md\n-rwxrw-rw- 1 nobody nogroup    32 Aug  6 20:56 requirements.txt\n-rwxrwxrwx 1 nobody nogroup  3328 Aug 24 21:33 runner.py\ndrwxrwxrwx 3 nobody nogroup  4096 Aug 24 21:30 slinger\ndrwxrwxrwx 3 nobody nogroup  4096 Aug 24 21:30 webapps\n```\n\n**export PATH=/opt/cc_audio_slinger/python-slinger/bin:$PATH**\n\n**which  pip3**\n\n```/opt/cc_audio_slinger/python-slinger/bin/pip3```\n\n**pip3 install -r requirements.txt**\n\n```\nLooking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple\nCollecting pychromecast\n...\nInstalling collected packages: ifaddr, zeroconf, urllib3, tqdm, pymediainfo, pyasn1, protobuf, idna, charset-normalizer, certifi, requests, pysmb, casttube, pychromecast\nSuccessfully installed casttube-0.2.1 certifi-2024.7.4 charset-normalizer-3.3.2 idna-3.8 ifaddr-0.2.0 protobuf-5.27.3 pyasn1-0.6.0 pychromecast-14.0.1 pymediainfo-6.1.0 pysmb-1.2.9.1 requests-2.32.3 tqdm-4.66.5 urllib3-2.2.2 zeroconf-0.132.2\n```\n\n**cat go**\n\n```\nexport PATH=/opt/cc_audio_slinger/python-slinger/bin:$PATH\necho Access Program from $(ip a  | grep inet | grep global | awk -F'/' '{print $1}' | awk '{print \"http://\"$2\":8008\"}')\npython3 runner.py \u0026\n```\n\n### Boot program\n**./go**\n```\n21:47:13:INFO:HTTPInstances.init port:8008\n21:47:13:INFO:HTTPInstances.run Starts - http://0.0.0.0:8008\n21:47:13:INFO:HTTPInstances.init port:8009\n21:47:13:INFO:HTTPInstances.run Starts - https://0.0.0.0:8009\n```\n\n### Access program\n```echo Access Program from $(ip a  | grep inet | grep global | awk -F'/' '{print $1}' | awk '{print \"http://\"$2\":8008\"}')```\n\n### Terminate program\n**ps**\n```\n    PID TTY          TIME CMD\n 766371 pts/0    00:00:00 bash\n 766962 pts/0    00:00:00 python3\n 766965 pts/0    00:00:00 ps\n```\n\n**pkill python3**\n\n## Install as a Systemd Service\n\n**cat cc_audio_slinger.service**\n```\n[Unit]\nDescription=Chrome Cast Audio Slinger\nAfter=network.target\n\n[Service]\nUser=pi\nGroup=pi\nWorkingDirectory=/opt/cc_audio_slinger\nExecStart=/opt/cc_audio_slinger/python-slinger/bin/python3 runner.py\nRestart=always\n\n[Install]\nWantedBy=multi-user.target\n```\n\n**sudo cp cc_audio_slinger.service /etc/systemd/system**\n\n**sudo systemctl daemon-reload**\n\n**systemctl start cc_audio_slinger.service**\n\n**systemctl status cc_audio_slinger.service**\n```\n● cc_audio_slinger.service - Chrome Cast Audio Slinger\n     Loaded: loaded (/etc/systemd/system/cc_audio_slinger.service; disabled; preset: enabled)\n     Active: active (running) since Wed 2024-09-04 19:52:18 NZST; 2s ago\n   Main PID: 2187 (python3)\n      Tasks: 3 (limit: 3915)\n        CPU: 282ms\n     CGroup: /system.slice/cc_audio_slinger.service\n             └─2187 python3 runner.py\n\nSep 04 19:52:18 detoni-services systemd[1]: Started cc_audio_slinger.service - Chrome Cast Audio Slinger.\nSep 04 19:52:19 detoni-services python3[2187]: 19:52:19:INFO:HTTPInstances.init port:8008\nSep 04 19:52:19 detoni-services python3[2187]: 19:52:19:INFO:HTTPInstances.run Starts - http://0.0.0.0:8008\nSep 04 19:52:19 detoni-services python3[2187]: 19:52:19:INFO:HTTPInstances.init port:8009\nSep 04 19:52:19 detoni-services python3[2187]: 19:52:19:INFO:HTTPInstances.run Starts - https://0.0.0.0:8009\n```\n\n## Enable startup on system reboot\n**sudo systemctl enable cc_audio_slinger.service**\n```Created symlink /etc/systemd/system/multi-user.target.wants/cc_audio_slinger.service → /etc/systemd/system/cc_audio_slinger.service.```\n\n\n## Transcoding Exotic Formats using FFMPEG\nIt is now possible to transcode .dsf (SACD format) files into 24bit 96khz FLAC output. \nDepending on your system and file access, this process is completed in a few seconds.\n\nSee config settings for details. \n\nNote: This feature uses the pyffmpeg Python package, this may not work correctly on \nyou system (i.e. this fails on Raspberry PI, and installs an x86 and not an Arm binary!).\\\nIf this is the case with your system, install ffmpeg externally, and alter config setting *TC_FFMPEG_EXE_OVERRIDE*\n\nExample:\\\n**apt install ffmpeg**\\\n...\n\n**which ffmpeg***\n```\n/usr/bin/ffmpeg\n```\n\nAlter Config setting to new install location of ffmpeg\\\n``TC_FFMPEG_EXE_OVERRIDE=/usr/bin/ffmpeg``\n\n## Screen Shots\n![Screenshot](screenshots/screen1.png)\n\n![Screenshot](screenshots/screen2.png)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdetoni%2Fchromecast_audio_slinger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsdetoni%2Fchromecast_audio_slinger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdetoni%2Fchromecast_audio_slinger/lists"}