I’m glad to announce, that O!MPD 1.05 has been released 🙂 You can get it form download page.
Changelog:
- added support for TIDAL
- added support for COMPOSER tag (settable in config.inc.php)
- added ‘Show favorite tracks’ for selected genre
- added popularity of artists (Library -> Popular -> Artist)
- added info about Track Dynamic Range in track lists (settable in config.inc.php)
- changed genre view
- fixed bugs
Installation
If you install O!MPD for the 1st time, just follow instructions from here.
Upgrade from previous versions
WARNING!
Version 1.05 modifies structure of DB. This should be harmless, but just in case, please make a copy of your existing DB.
Rename old ompd directory to eg. ompd-old and copy new version to your www root dir.
If you upgrade from v1.04 you can use your previous include/config.inc.php file, but you need to modify it a little bit. There are some new settings – they are in section between NEW IN O!MPD 1.05
and END OF NEW IN O!MPD 1.05
. You can copy it from new config file to your previous one and set desired values.
If you upgrade from older versions I’d recommend to edit new config file (include/config.inc.php).
Remember about setting write access to dirs:
- /ompd/tmp/
- /ompd/stream/
- /ompd/cache/
Your existing MySQL database will be used, so you don’t have to worry about things like player configuration, users, etc. (unless you change value of $cfg['mysqli_db']
– then new database will be created).
After configuration is done, open http://www-server-IP-address/ompd/index.php
just like in previous versions. If everything is OK, you should now see O!MPD v1.05.
Final thoughts
I’d like to thank all of you, who use or try O!MPD. And special thanks for those of you, who helped me find and fix bugs, add new features, find inspiration for new ones and make O!MPD better: othmar52, brendan-pike, eoli3n, bamyasi, marcbth, hardheid, ffatgit, maartenlangeveld, owl770, hanspu, kostea67, nonplusnl, Julien Borle, Eric Esbelin, Paul Geller. Thank you guys!
I hope you like new version of O!MPD. Feel free to leave your comment or write to me at info@ompd.pl.
Best regards from Poland!
Hi,
I’ve just updated to O!MPD v1.05
It runs just fine on Raspberry Pi 2 under Debian Buster (and Audiophonics I-Sabre DAC ES9023) with Nginx on PHP 7.3 and MariaDB.
Thanks a lot for your work !
Thanks for comment. I’m glad you like O!MPD.
Best regards,
Artur
First off all thank you for your excellent work on ompd! I can imagine, how may hours you are
working for such a project with an excellent user interface and great flexibility.
I am interested in music and IT like you, therefor i started with the music box “otto” from (http://cardhouse.com/otto) in 2004 and calliope by neil verplank (http://neil.verplank.org/) which were written in Perl. After hard work converting them to Php (on a LAMP-server), i found netjukebox and after that, i saw that your work with OMPD has much more progress, than mine.
One of OMPDs special features is to play youtube stream. Unfortunatly this didn’t work for me.
My environment: Kubuntu 18.04.4, Apache 2.4, Ver 15.1 Distrib 10.1.43-MariaDB and PHP 7.2.24.
MPD is version 0.20.1 and OMPD is version 1.05.
I found the following:
If i add for example the stream https://www.youtube.com/watch?v=Vn8phH0k5HI to the favorites,
it is stored as: https://www.youtube.com/watch?v=vn8phh0k5hi. As you see, all upper cases changed
to lower cases, which in result pointed to a wrong stream.
WIth phpmyadmin i administered my database and corrected this entry in table favoriteitem, to see
if this is the bug. But in this case clicking on the above favorite, thefollowing entry in the playlist was shown:
watch?v=Vn8phH0k5HI
https://www.youtube.com/watch?v=Vn8phH0k5HI
Playing the entry gives the following result in the mpd.log:
Dec 27 17:56 : exception: Failed to decode https://www.youtube.com/watch?v=Vn8phH0k5HI
Dec 27 17:56 : player: played “https://www.youtube.com/watch?v=Vn8phH0k5HI”
I tried to find out, if mpd is working correctly and found this:
https://bbs.archlinux.org/viewtopic.php?id=180478
If i tried out the command:
my-system:~$ youtube-dl -F Vn8phH0k5HI
[youtube] Vn8phH0k5HI: Downloading webpage
[youtube] Vn8phH0k5HI: Downloading video info webpage
[info] Available formats for Vn8phH0k5HI:
format code extension resolution note
249 webm audio only tiny 55k , opus @ 50k (48000Hz), 2.94MiB
250 webm audio only tiny 72k , opus @ 70k (48000Hz), 3.88MiB
140 m4a audio only tiny 130k , m4a_dash container, mp4a.40.2@128k (44100Hz), 7.33MiB
…
As you see, the 140-format is listed. Next i tried the command:
my-system:~$ mpc add $(youtube-dl –prefer-insecure -g -f140 Vn8phH0k5HI)
which added the following to the playlist:
videoplayback?expire=1577487832&ei=eDkGXpCyBY7N1gLnurjQDA&ip=2001%3A4dd2%3Ab828%3A0%3Af030%3Aa2a%3A42cf%3A1914&id=o-ANHJx6vZpxeOo4zvcthufH_Vwv3CFw9C6m0MZ4SMY_Sp&itag=140&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-oxujvavbox-jbol%2Csn-4g5ednss&ms=au%2Crdu&mv=m&mvi=2&pl=29&initcwndbps=1553750&mime=audio%2Fmp4&gir=yes&clen=7687854&dur=474.987&lmt=1577219868781946&mt=1577466111&fvip=3&keepalive=yes&fexp=23842630&c=WEB&txp=5531432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHylml4wRAIgbTQfXRJCfT-gR7bpZmMH7Xq1glqMYWHdNjsrRtfVBnQCIGk29Phn6pH1Fcpj4ZoioAYUZdFIF6Xfib6CeV_AS1Jq&sig=ALgxI2wwRQIhAL8EwcDy5cF04faKbLDIKW0R1J46wO53dfy8DHDev7DMAiBTO7QJVgW6dS6G9HArylMwIWhW1uAPNq4fcTLcu4gsDQ==&ratebypass=yes
https://r3—sn-oxujvavbox-jbol.googlevideo.com/videoplayback?expire=1577487832&ei=eDkGXpCyBY7N1gLnurjQDA&ip=2001%3A4dd2%3Ab828%3A0%3Af030%3Aa2a%3A42cf%3A1914&id=o-ANHJx6vZpxeOo4zvcthufH_Vwv3CFw9C6m0MZ4SMY_Sp&itag=140&source=youtube&requiressl=yes&mm=31%2C29&mn=sn-oxujvavbox-jbol%2Csn-4g5ednss&ms=au%2Crdu&mv=m&mvi=2&pl=29&initcwndbps=1553750&mime=audio%2Fmp4&gir=yes&clen=7687854&dur=474.987&lmt=1577219868781946&mt=1577466111&fvip=3&keepalive=yes&fexp=23842630&c=WEB&txp=5531432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&lsparams=mm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AHylml4wRAIgbTQfXRJCfT-gR7bpZmMH7Xq1glqMYWHdNjsrRtfVBnQCIGk29Phn6pH1Fcpj4ZoioAYUZdFIF6Xfib6CeV_AS1Jq&sig=ALgxI2wwRQIhAL8EwcDy5cF04faKbLDIKW0R1J46wO53dfy8DHDev7DMAiBTO7QJVgW6dS6G9HArylMwIWhW1uAPNq4fcTLcu4gsDQ==&ratebypass=yes
(Sorry for the long output, but this was displayed.) Surprisingly OMPS does this streaming well.
I hope, my remarks could be useful for you, to find a solution for that, which would be great.
It seems to bee a bug in the play.php. I played around with some options in the config file:
$cfg[‘youtube-dl_options’] = ‘–prefer-insecure -g -f140’;
but nothing worked.
Again, thanks a lot for your great work and many greetings.
Best regards
Egon
Hi Egon,
thanks for comment and your suggestions.
The only way (for now) to play YT is using NowPlaying -> Add -> paste YT link, like https://www.youtube.com/watch?v=Vn8phH0k5HI -> click Add button. After this youtube-dl is started on the www server and long url for audio stream is resolved. Next, this url is added to mpd playlist and mpd can play this stream. To this working properly you need to have:
1. latest version of youtube-dl
2. correctly defined settings in ‘Play audio from Youtube’ section in config.inc.php. Mine looks like this:
$cfg['python_path'] = '';
$cfg['youtube-dl_path'] = '/usr/local/bin/youtube-dl';
$cfg['youtube-dl_options'] = '-j --no-check-certificate --prefer-insecure';
$cfg['youtube_audio_format_name'] = '140 - audio only (tiny)';
$cfg['youtube_indicator'][] = 'www.youtube.';
$cfg['youtube_indicator'][] = 'youtu.be/';
$cfg['youtube_indicator'][] = 'm.youtube.';
Unfortunately it doesn’t make sense to save this long url as favorites – this url is valid only for certain time (6 hours or so).
The best (IMO) solution would be resolving url just before playing and sending stream to mpd – just like I did with Tidal. Then url passed to mpd would look like:
http://192.168.1.120/ompd/stream.php?action=streamYT&track_id=Vn8phH0k5HI
(for Tidal it looks like: http://192.168.1.120/ompd/stream.php?action=streamTidal&track_id=118793762)
I’ll try to do it this way in near future – I’m just working on YT part of O!MPD (displaying YT results in O!MPD search results and adding them to playlist just like it was a local file), so it is a good moment to this.
Thanks for notice that strings are lowercased after adding to favorites – I’ll take a look at this.
PS
O!MPD with newest features is available on GitHub: https://github.com/ArturSierzant/OMPD
Best regards,
Artur
Thanks Artur!
Impressing work! I have tried a lot of clients, but this is so promising I have spent the whole weekend wrestling with nginx php mysql and mariadb. Now I am waiting for it to scan my library.
I am running Ubuntu Studio (because of RT kernel) on a barebone Intel without fans. Filestorage is FreeNAS.
Using sqlite would be an improvement since you don’t need to install and configure a proper database. The databasefiles would reside inside the installation directory. A security thing as well.
Please share how to connect to Tidal.
Best regards
Mårten
Hi Mårten,
thanks for comment.
I hope you succeeded with scanning – this is the part of O!MPD that causes most problems…
I know about sqlite, but changing from MySQL to sqlite is a lot of work. If I decided to do something with DB, I would probably change it to PDO – it seems to be more flexible.
As for Tidal – you need to set (I assume you have latest O!MPD version from GitHub):
$cfg[‘tidal_username’]
$cfg[‘tidal_password’]
$cfg[‘tidal_token’]
in config.inc.php. This will let you interact with Tidal DB (searching, listing tracks in album, etc.). To play tracks you have at least 2 possibilities:
1. using mpd – you need mpd version >= 0.21. In this case set $cfg[‘tidal_direct’] = false; You also have to set Tidal part in mpd config file.
2. using O!MPD – you need any mpd version with http/https stream support. In this case set $cfg[‘tidal_direct’] = true;
The most critical is tidal_token – you can find instruction how to get it here https://github.com/lucaslg26/TidalAPI. You can also search token in the Internet.
In case of any problems feel free to write.
Best regards,
Artur
Can you help with that Tidal problem?
2020/06/03 21:22:28 [error] 21147#21147: *525 FastCGI sent in stderr: “PHP message: PHP Fatal error: Uncaught Error: Class ‘TidalAPI’ not found in /var/www/ompd/include/library.inc.php:690
Stack trace:
#0 /var/www/ompd/play.php(671): getTrackAlbumFromTidal(‘140445700’)
#1 /var/www/ompd/play.php(54): addSelectUrl()
#2 {main}
thrown in /var/www/ompd/include/library.inc.php on line 690” while reading response header from upstream, client: 192.168.0.161, server: hass, request: “GET /ompd/play.php?action=addSelectUrl&url=https%3A%2F%2Ftidal.com%2Fbrowse%2Ftra>
Hi,
it looks like TidalAPI (
tidalapi/tidal_api.php
) is not loaded. O!MPD loads this only if you set all necessary Tidal credential. This can be done ininclude/config.inc.php
, sectionTidal
. You have to set username/password/token to Tidal work properly. Unfortunately Tidal recently has banned some well-known tokens…Anyway, please check settings in
include/config.inc.php
Regards,
Artur
Thnx for the reply, but turns out I had an error in the config. Works like a charm with a token I have been using with a different app. But still got a different question.
I’m running mpd on a different host than o!mpd. Should o!mpd in this case show the mpd library?
No, O!MPD doesn’t use mpd library and can’t import or show data from it. Actually O!MPD doesn’t need mpd library i.e it can work with any mpd even if this mpd doesn’t have access to your media files or its database is empty: in these cases O!MPD sends stream to mpd.