YTuner is a simple project designed to replace vTuner internet radio service and dedicated to all users of AVRs made by Yamaha, Denon, Onkyo, Marantz and others with built-in vTuner support.
"Everything should be made as simple as possible, but not simpler" - Albert Einstein.
YTuner
YTuner is a simple project inspired by YCast but rewritten from scratch and greatly improved.
Designed to replace vTuner internet radio service and dedicated to all users of AVRs made by Yamaha, Denon, Onkyo, Marantz, Grundig and others with built-in vTuner support.
If you own one (or even more) of the vTuner-enabled AVRs mentioned above and want to enjoy free internet radio stations on your device as before, and be sure that your device's streaming service won't suddenly end, you should consider using YTuner.
Why
YCast is a great project, but my goal was to run a similar service on a very low-spec platform where python along with packages turned out to be too heavy and too slow.
Now, with YTuner you can enjoy improved functionality at full speed of ultra lightweight native app on operating systems such as:
Windows, Linux, macOS, BSD, Solaris, Raspberry Pi OS
AVR bookmarks. Single bookmark for many AVRs or dedicated bookmark for each AVR (if you own more then one) with support of "add" and "del" operations sent from AVR devices.
Easy application configuration with ini files.
Optional SSL support for YTuner HTTPS web request.
Radio stations logo images conversion/resize on the fly with couple of supported image formats (JPG,PNG,GIF,TIFF-optional)
Radio stations logo images optional cache.
Radio-browser extensive caching with many options and auto refresh
UUIDs, data structures and stations cache (based on files or RAM storage).
Local DB based full cache of Radio-browser resources.
Radio browser advanced filtering and sorting (single config for many AVRs or dedicated configs for each AVR (if you own more then one))
YTuner also has build in :
Web service to support AVR requests.
Optional DNS proxy service to intercept vtuner.com related DNS queries and others if needed.
Maintenance service.
Supported devices
Theoretically, YTuner should work with most AVRs that support vTuner.
Now, the list of supported and tested devices below is short, but I hope it will expand with your help.
Please test YTuner with your AVR and give me your feedback.
Denon AVR-X3300W (Tested by citronalco. Thank you.)
Installation
YTuner is a standalone application and in most cases it does not require additional services, frameworks, packages, virtual machines, libraries or tools to run properly (except optional OpenSSL and/or SQLite3 libraries).
You can download from Releases a file specific to your operating system and CPU architecture or build YTuner from source (look at Build section).
After download (or build) save and extract files into prepared directory with granted read/write/execute privileges.
Remember that the credentials who will run YTuner must also have permission to open TCP port 80 and optionally UDP 53 (note below).
Now, you should have directory with some of the following subdirectories and files :
-- ytuner
|-- config (subdir for config files)
|-- stations.ini (if you want to use a ini file with your favorite radio stations)
|-- stations.yaml (if you want to use a yaml/yml file with your favorite radio stations)
|-- avr.ini (common configuration file for all your AVRs)
|-- bookmark.xml (common bookmark file for all your AVRs - only if one of your AVR support bookmark)
|-- ...... (AVRs dedicated bookmark and config files)
|-- cache (subdir for cache files)
|-- rbuuids.txt (Radio browser UUIDs cache file)
|-- ...... (other cache files)
|-- db (subdir for databse cache file)
|-- rb.db (Radio browser database cache file)
|-- ytuner (or ytuner.exe for Windows)
|-- ytuner.ini (YTuner important config file)
Do not forget to add execute privileges to ytuner on linux/*nix systems with a command like chmod +x ytuner.
OpenSSL (optional)
If you want to use SSL to support YTuner HTTPS web request you have to get OpenSSL libraries.
Most linux/*nix systems install OpenSSL by default. Otherwise, use your favorite package manager to get OpenSSL libraries or download them from Github or visit OpenSSL Wiki for binary distributions source.
Windows users can download them from Github (follow NOTES-WINDOWS.md instructions) or visit OpenSSL Wiki for binary distributions source.
Make sure to get/build the correct version of the OpenSSL libraries with the correct bit length for your OS. 32-bit libraries are needed if you chose to use the 32-bit version of YTuner or 64-bit for the AMD64/x86_64 version of YTuner.
Finally, you should have 2 files:
OpenSSL 1.0.2 and earlier:
ssleay32.dll (or libssl32.dll) and libeay32.dll
OpenSSL 1.1.x:
64-bit: libssl-1_1-x64.dll and libcrypto-1_1-x64.dll
32-bit: libssl-1_1.dll and libcrypto-1_1.dll
OpenSSL 3.x.x:
64-bit: libssl-3-x64.dll and libcrypto-3-x64.dll
32-bit: libssl-3.dll and libcrypto-3.dll
and place them in your ytuner directory or anywhere in your system PATH.
Make sure your system has valid CA certificates.
Tip: The YTuner should work with LibreSSL libraries as well.
SQLite3 (optional)
If you want to forget about potential connection problems with Radio-browser.info while using YTuner and listening to your favorite stations, use one of the options [catDB, catMemDB, catPermMemDB] of the RBCacheType parameter in the ytuner.ini file to download the full contents of the Radio-browser.info resources once and store it in your local SQLite3 database.
Of course, only data that is useful for YTuner and AVR devices is downloaded and stored locally.
Due to the use of the very popular SQLite database, YTuner will need to use the library provided by the SQLite development team.
! Important ! : Minimal version of SQLite library is 3.33.0 (2020-08-14)
Tip: If you faced problems with the SQLite library, read this description.
Configuration
Your YTuner machine and AVR(s) have to have internet access. Make sure your firewall is properly configured if necessary.
AVR
Set all DNS servers on your AVR config to your YTuner machine IP address.
Router
Make sure that your YTuner machine is assigned a static IPv4 address.
YTuner Web Service
Regardless of what operating system you use, you need to make sure that TCP port 80 is not being used by another application.
YTuner has a built-in multi-threaded web server that listens on TCP port 80 so you don't have to worry about its configuration and performance.
Tip: In some special cases, it may be necessary to change the default TCP port 80 to another. You can do this by editing the YTuner ini file. See Application configuration section below.
YTuner DNS Service
YTuner has a built-in multi-threaded DNS proxy server that listens on UDP port 53. This feature is optional and you can simple disable it and/or configure by editing configuration .ini file ytuner.ini (See Application configuration section below).
You can also use your favorite DNS server like dnsmasq. Most important is to point *.vtuner.com domain to you YTuner machine and set all DNS servers on your AVR config to your YTuner machine IP address.
Tip: In some special cases, it may be necessary to change the default UDP port 53 to another. You can do this by editing the YTuner ini file. See Application configuration section below.
YTuner Maintenance Service
YTuner has a built-in maintenance service for diagnostic and future goals.
At this moment you can use it to shut down YTuner service only.
Tip: In most cases, you will not need this functionality. See Application configuration section below.
Application configuration
YTuner is configured by simple ytuner.ini file.
This file has the following capabilities:
;Force the use of the selected IP address of one of the existing interfaces.
;Leave this parameter with "default" value when you have one IP address only or you are not sure what to do.
;The application will find the IP address itself.
IPAddress=default
;This parameter may be useful in very rare cases.
;You can set this parameter to any value that will be act in the URL as a host for communication of the AVR device with the YTuner web service (e.g. : yamaha.vtuner.com, denon.vtuner.com)
;or any IP address that does not belong to the machine on which the YTuner process is running and may be useful when using proxy solutions and/or Docker containers.
;Leave this parameter with "default" value or empty when you are not sure what to do.
ActAsHost=default
;Use SSL. 1-Yes 0-No ; Default = 1
UseSSL=1
;Force HTTP code for redirect. It can be useful for PLAY endpoint. Default = 302
;Station logo icon size (width & height). Default = 200
IconSize=200
;Cache icon files. 1-Yes 0-No ; Default = 1
IconCache=1
;Sixteen characters string with your token. Allowed characters: 0-9 and A-F/a-f; Default=0123456789ABCDEF
;Use with care. Changing this parameter also changes the name of the AVR bookmark file(s) (unless you are using a common bookmark.xml file) and not-common filtering/configuration options ini file(s).
MyToken=0123456789ABCDEF
;One common configuration ini file (avr.ini) for all AVR devices. Otherwise, each AVR will own its own filtering/configuration ini file. 1-Yes 0-No ; Default = 0
CommonAVRini=1
;Cache folder location. Empty or "default" = Same as YTuner app location.
;Cache folder named "cache" contains station icon files and Radio-browser UUIDs and stations '*.cache' files.
CacheFolderLocation=default
;Config folder location. Empty or "default" = Same as YTuner app location.
;Config folder named "config" contains bookmark files and AVRs config files.
ConfigFolderLocation=default
;DB folder location. Empty or "default" = Same as YTuner app location.
;DB folder named "db" contains db files.
DBFolderLocation=default
;SQLite3 library file (with full path). Empty or "default" = YTuner will try to find DB library file.
;Applicable when RBCacheType is one of: catDB, catMemDB, catPermMemDB.
;Windows users can get latest sqlite3.dll driver from https://www.sqlite.org/download.html . Please make sure to download the correct 64-bit or 32-bit version for your system.
;Linux / Unix (Solaris, BSD) / macOS users should have such a driver already installed by default. Please make sure you specify the path to the correct 64-bit or 32-bit library file..
;Enables support for the stations list local file. 1-Yes 0-No ; Default = 1
Enable=1
;File name with your favorite stations (.ini or .yaml/.yml file without the path). Default = stations.ini
MyStationsFile=stations.ini
;MyStations auto refresh period (minutes). Only applicable when MyStationsAutoRefreshPeriod => 0. 0 or empty - No refresh ; Default = 0
MyStationsAutoRefreshPeriod=0
[Radiobrowser]
;Enables support for radio-browser.info . 1-Yes 0-No ; Default = 1
Enable=1
;Radio-browser.info API URL. Default = http://all.api.radio-browser.info ;
;Warning! Using an IP address instead of a domain name results in faster performance, however, such a domain IP address may change
;and result in loss of connection to radio-browser.info. It is always worth checking the current list of servers at: http://all.api.radio-browser.info/json/servers
RBAPIURL=http://all.api.radio-browser.info
;Radio-browser.info most popular stations limit. Default = 100
;Warning! Due to the filtering functionality (since YTuner version 1.1.0) performed by the client side, this value means the number of stations got from radiobrowser-info and later optionally filtered out by YTuner.
;For this reason, the station list displayed by AVR may be significantly different from this value or even be empty.
;Determine this value for yourself based on your filtering scope.
;Applicable for [catNone,ctFile,ctMemStr] RBCacheType only.
RBPopularAndSearchStationsLimit=1000
;Radio-browser.info minimum number of stations per category. Default = 3
;Applicable for [catNone,ctFile,ctMemStr] RBCacheType only.
RBMinStationsPerCategory=3
;Radio-browser.info UUIDs file cache TTL (hours) ; Empty or value <= 0 always means a valid UUID file cache (if exists) and never refreshes its content. ; Default = 24
;Applicable for [catNone,ctFile,ctMemStr] RBCacheType only.
RBUUIDsCacheTTL=0
;Radio-browser.info UUIDs file cache auto refresh. Applicable when RBUUIDsCacheTTL>0 only. 1-Yes 0-No ; Default = 0
;Applicable for [catNone,ctFile,ctMemStr] RBCacheType only.
RBUUIDsCacheAutoRefresh=0
;Use one value of set [catNone,catFile,catMemStr,catDB,catMemDB,catPermMemDB] or leave blank.
;catNone or blank = Do not use cache. Slow!
;catFile = Store previously browsed categories and stations in cache files. Most suitable if the amount of free memory is very small.
;catMemStr = Store previously browsed categories and stations in memory cache. Fastest, but may need more bytes of free memory.
;catDB = Store ALL useful information about categories and stations of Radio-browser.info in SQLite DB file.
; The initial DB file creation process may take a few minutes, but will remain persistent after you restart YTuner.
; After this operation, you will no longer need access to redio-browser.info until you decide to refresh the downloaded data (when RBCacheTTL>0).
; Keep RBCacheTTL = 0 to prevent the DB file from being rebuilt after the RBCacheTTL time expires.
;catMemDB = Same as catDB, but the entire database is placed in memory. This solution is NOT permanent and once YTuner is down all data will be lost.
;catPermMemDB = Combination of catMemDB+catDB; The entire database is placed in memory, but it is also saved to a file and remains persistent. The best option if you have valid sqlite3 driver.
;Windows users can get sqlite3.dll driver from https://www.sqlite.org/download.html . Linux / Unix (Solaris, BSD) / macOS users should have such a driver already installed in their OS.
;Pay attention to "DBLibFolderLocation" parameter in "Configuration" section of this ini file.
;catMemDB and catPermMemDB require additional ~30MB of free RAM to load entire database. Refreshing the database involves starting a concurrent thread that downloads the current content of the radio-browser.info resources and creates a second database while the current one is still running.
;After the process is completed, the newly created database becomes the current database and the old one is deleted. Due to this, an additional ~30MB of free memory is needed for the duration of this process.
;Additionally, data in JSON format downloaded from Radio-browser.info takes over 50MB.
;Test the best option for you. Default = catPermMemDB;
RBCacheType=catPermMemDB
;Radio-browser.info stations cache TTL (hours). Empty or value <= 0 always means a valid cache (if exists) and never refreshes its contents. ; Default = 24
RBCacheTTL=0
[Bookmark]
;Enables bookmarks. Your AVR must support bookmark to save stations to bookmark. 1-Yes 0-No ; Default = 1
Enable=1
;One common bookmark file (bookmark.xml) for all AVR devices. Otherwise, each AVR will own its own bookmark file. 1-Yes 0-No ; Default = 0
CommonBookmark=0
;Bookmark stations limit. ; Default = 100
BookmarkStationsLimit=100
[WebServer]
;Web server IP address. Don't change it if it's not necessary. ; "default" mean the same value as entered in IPAddress in Configuration section above.
WebServerIPAddress=default
;Web server TCP port. Don't change it if it's not necessary. ; Default = 80
;DNS server IP address. Don't change it if it's not necessary. ; "default" mean the same value as entered in IPAddress in Configuration section above.
DNSServerIPAddress=default
;DNS server UDP port. Don't change it if it's not necessary. ; Default = 53
DNSServerPort=53
;DNs to intercept. Values must by comma separated. The wildcard character (*) is only accepted at the beginning of a domain name. Default = *vtuner.com
;DNS servers IP Addresses. Values must by comma separated. Default = 8.8.8.8,9.9.9.9
DNSServers=8.8.8.8,9.9.9.9
[MaintenanceServer]
;Enables support for the maintenace service. 1-Yes 0-No ; Default = 0
;With this release of YTuner only one is available: http://[MaintenaceServerIPAddress]:[MaintenaceServerPort]/ytuner/down - Shut down YTuner service.
;Be carefull: It is unwise to run this service on an IP address other than local loopback interface;
Enable=0
;Maintenace server IP address. Don't change it if it's not necessary. ; "default" mean "127.0.0.1" loopback interface.
MaintenanceServerIPAddress=127.0.0.1
;Maintenace server TCP Port. Don't change it if it's not necessary. ; Default = 8080
MaintenanceServerPort=8080
YTuner's filtering and sorting functionality can be oriented by AVR device.
You can decide about it with CommonAVRini setting of ytuner.ini.
Common AVR config file avr.ini or other AVRs dedicated config files have the following capabilities:
Please read the descriptions in both .ini files carefully.
Custom stations
You can enable support for the stations list local file. Two types of files are supported:
.ini file :
[Category one name]
Station one name=http://url-of-station-one|http://url-of-station-one-logo
Station two name=http://url-of-station-two|http://url-of-station-two-logo
[Category two name]
Station three name=http://url-of-station-three|http://url-of-station-three-logo
Station four name=http://url-of-station-four|http://url-of-station-four-logo
.yaml / .yml file :
Category one name:
Station one name: http://url-of-station-one|http://url-of-station-one-logo
Station two name: http://url-of-station-two|http://url-of-station-two-logo
Category two name:
Station three name: http://url-of-station-three|http://url-of-station-three-logo
Station four name: http://url-of-station-four|http://url-of-station-four-logo
YTuner can convert and resize on the fly logo image from JPEG, PNG, GIFF and TIFF (optionaly) to JPEG (default) or PNG format.
Tip: URLs with logo station images are optional.
Bookmark
What is the Bookmark ? Bookmark is what is mentioned in the AVR user's manual. Bookmark is operated only from the AVR device using the remote control. When you listen to a new station you can decide to put it into the Bookmark or want to remove it from it. All stations added in this way are visible in the Bookmark submenu of the AVR receiver.
If you AVR support Bookmark you can enable and use this YTuner functionality.
You can configure YTuner to use one common bookmark file (bookmark.xml) for all your AVR devices (if you have more then one) or each AVR will own its own bookmark file.
See Application configuration section above.
Running the application
Windows
Simply execute ytuner.exe.
Linux / Unix (Solaris, BSD) / macOS
If you credentials meet all requirements mentioned above just go to your ytuner directory and start application or simple use sudo to execute application:
$ sudo ./ytuner
Docker container
If you are not familiar with building Docker containers you can read this.
YTuner uses Indy - Internet Direct library to build its own binary files. Of course, YTuner binaries no longer need any additional libraries beyond the optional OpenSSL and/or SQLite3.
Important: Use the latest version of Indy library to build YTuner.
Summary
If you found this project useful, please star it. ⭐
License
YTuner is licensed under MIT license.
See the license.txt file for more details.
About
YTuner is a simple project designed to replace vTuner internet radio service and dedicated to all users of AVRs made by Yamaha, Denon, Onkyo, Marantz and others with built-in vTuner support.