O!MPD v1.02

O!MPD v1.02

I’m glad to announce, that O!MPD 1.02 has been released 🙂 You can get it form download page.

Changelog:

  • added possibility to synch, copy and add current playlist from one MPD to another (multiroom)
  • added better support for Favorites: tracks can be saved/added to Favorites from any place (Now Playing, album view, search results)
  • added possibility to add stream to current playlist and Favorites
  • added Blacklist
  • added time info (‘End at’ and ‘Left’) for current playlist
  • added possibility to switch off tags from COMMENT
  • added support for MDP password
  • added proxy support (code by Stéphane Ardhuin)
  • added ‘Play to…’ for albums (experimental)
  • improvements in update procedure
  • compatibillity with PHP7 and mySQL 5.7
  • some visual improvements
  • fixed bugs

Installation

If you install O!MPD for the 1st time, just follow instructions from here.

Upgrade from previous versions

Rename old ompd directory to eg. ompd-old and copy new version to your www root dir.

If you upgrade from v1.01 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.02 and END OF NEW IN O!MPD 1.02. You can copy it from new config file to your previous one and set desired values.

If you upgrade from v1.0 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.02.

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: Jonathan, Emmanuel Fraisse, Stefan Maier, Ivan Yonov, Michael Lehner, Matthew, Stéphane Ardhuin. 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!

24 thoughts on “O!MPD v1.02

  1. Peter

    Running great! Thank you!!
    Just updated from v1.0 and now i didn’t have to modify anything to make it work with newest php-7.

    Cheers

    1. Artur Sierżant Post author

      Hi,
      can you tell me how do you distinguish each CD from multi-CD album? I add to album title ‘Disc x’ where x is disc number.
      This could be nice new feature in next O!MPD release.

      Regards.

  2. Happy user

    At first – very BIG thanks!
    Sorry, i don’t know english.
    _https://s12.postimg.org/n6wf20l65/ompd.png
    Google translate:
    In the screenshot you can see how ugly it looks now. A pile of identical covers. I believe that despite the fact that several disks is still one album, and the number of disks can be displayed in tracklist
    Sorry, forgot to say, it is stored on disk as:
    Artist/Album/CD1/many flac files.
    Artist/Album/CD2/many flac files.

    1. Artur Sierżant Post author

      OK, now I see what you mean. So this should work like this:
      – on the album list there should be only one entry (cover) for multi-disc album
      – when you enter into album view, there should be list of all tracks of all discs of album grouped by disc:
      Disc 1 – list of tracks from disc 1
      Disc 2 – list of tracks from disc 2
      Disc 3 – list of tracks from disc 3
      etc…
      I will think how to do this. However one thing is sure: it will rely on tags from files, not on folder names. Anyway, I’m not promising anything…
      BTW
      The easiest way to achieve this result is copy all files from multi-disc album into one folder and number them starting from 101, 102,.. for disc 1, 201, 202, … for disc 2, 301, 302… for disc 3, etc.
      Regards and thanks for comment.

  3. Chris Olive

    Fantastic!

    Most clients for mpd are either abandonware or they only work on certain devices or certain interfaces. O!mpd is a godsend for my project which has people accessing mpd from at least 6 different platforms. Smooth, error free and so far totally stable. Excellent work!

  4. Mappr

    Hi Artur,

    Thanks for your work. I’ve got things mostly set up (used your preconfigured Xbian image on my RPi2). The Update completed successfully (with only a few ID3v2 tag errors), and the Library is populated with albums and album art. But when I try to play a track I get this error:

    Music Player Daemon error
    Error: ACK [50@0] {addid} Not found
    Command: addid “Violent Femmes/Violent Femmes/01 Blister In The Sun.mp3”

    Just in case, I updated music_directory in /etc/mpd.conf to match the path of my music, but that didn’t work.

    Any thoughts? Thanks again!

    1. Mappr

      update (if this is helpful):

      Here’s what I see in /var/log/mpd/mpd.log

      Mar 12 22:04 : client: [33] opened from 127.0.0.1:54434
      Mar 12 22:04 : client: [33] closed
      Mar 12 22:04 : client: [34] opened from 127.0.0.1:54442
      Mar 12 22:04 : client: [34] closed
      Mar 12 22:04 : client: [35] opened from 127.0.0.1:54444
      Mar 12 22:04 : db: No such song: Violent Femmes/Violent Femmes/01 Blister In The Sun.mp3
      Mar 12 22:04 : client: [35] closed
      Mar 12 22:04 : client: [36] opened from 127.0.0.1:54450
      Mar 12 22:04 : client: [36] closed

      1. Mappr

        update 2:

        From the web browser I can click on an album thumbnail, then click the hamburger menu beside a track and then click “File Details”. That brings me to the GetID3 report that shows all the tags and I can click the file path on the first line to see the entire album.

        So it looks like the files are in the database – not sure why addid isn’t working.

        Thanks,

        1. Artur Sierżant Post author

          Hi Mappr,

          it looks like Violent Femmes/Violent Femmes/01 Blister In The Sun.mp3 is not directly in directory entered in music_directory in your mpd.conf. The absolute path to this file should looks like ‘music_directory/Violent Femmes/Violent Femmes/01 Blister In The Sun.mp3′. Is it so in your system? Please write what is your music_directory, $cfg['media_dir'] and where is your music (is it in your network or locally on RasPi).

          Other reason may be that mpd database is not updated – you can easily check it by executing command mpc listall on RasPi terminal: you should see the list of all files indexed by mpd. When you execute mpc listall Violent Femmes/Violent Femmes you should see all files from this dir (but you probably won’t…)

          1. Mappr

            You’re right, the path doesn’t seem to be set right:
            —————–
            from /etc/mpd.conf (default path)
            # Files and directories
            music_directory “/var/lib/mpd/music”

            and then that directory’s contents:
            [root@xbian ~ # ls -l /var/lib/mpd/music
            total 16
            drwxr-xr-x 1 root root 0 Sep 16 2015 nas
            lrwxrwxrwx 1 root root 11 Sep 17 2015 usb0 -> /media/usb0
            lrwxrwxrwx 1 root root 11 Sep 17 2015 usb1 -> /media/usb1
            lrwxrwxrwx 1 root root 11 Sep 17 2015 usb2 -> /media/usb2
            lrwxrwxrwx 1 root root 11 Sep 17 2015 usb3 -> /media/usb3

            [root@xbian ~ # ls -l /media/usb0
            lrwxrwxrwx 1 root root 18 Mar 13 18:51 /media/usb0 -> /media/PassportTwo
            ——————-
            from /var/www/html/opmd/include/config.inc.php
            $cfg[‘media_dir’] = ‘/media/PassportTwo/MusicAndMovies/iTunes/iTunes Media/Music/’;
            ——————-

            My music is on a usb drive (a partitioned volume named “PassportTwo” and using iTunes file structure) attached directly to the RPi at /dev/sda2 (usb0?), and mounted at /media/PassportTwo/. It looks like mpd is not using the mount path, but instead using /media/usb0 with links?

            Looking at:
            [root@xbian ~ # mpc listall | grep Violent\ Femmes
            the mpd database has the tracks listed at :
            usb0/MusicAndMovies/iTunes/iTunes Media/Music/Violent Femmes/Violent Femmes/01 Blister In The Sun.mp3
            usb0/MusicAndMovies/iTunes/iTunes Media/Music/Violent Femmes/Violent Femmes/02 Kiss Off.mp3
            usb0/MusicAndMovies/iTunes/iTunes Media/Music/Violent Femmes/Violent Femmes/03 Please Do Not Go.mp3
            usb0/MusicAndMovies/iTunes/iTunes Media/Music/Violent Femmes/Violent Femmes/04 Add It Up.mp3
            etc…

            but
            [root@xbian ~ # mpc listall Violent Femmes/Violent Femmes (your suggested command from above) returns
            error: not found
            ——————–

            So it’s pretty obviously a path issue, but I haven’t yet figured it out.

            I tried changing from the mount path (/media/PassportTwo) to /media/usb0: $cfg[‘media_dir’] = /media/usb0/MusicAndMovies/iTunes/iTunes Media/Music/ (keeping mpd.conf music_directory unchanged) and ran Update in O!MPD browser settings. No luck.

            then set /etc/mpd.conf music_directory to: /media/usb0/MusicAndMovies/iTunes/iTunes Media/Music. No luck either.
            ————-
            Then I traced the full default path from /etc/mpd.config:
            [root@xbian ~ # ls -l /var/lib/mpd/music
            lrwxrwxrwx 1 root root 11 Sep 17 2015 usb0 -> /media/usb0
            lrwxrwxrwx 1 root root 11 Sep 17 2015 usb1 -> /media/usb1
            lrwxrwxrwx 1 root root 11 Sep 17 2015 usb2 -> /media/usb2
            lrwxrwxrwx 1 root root 11 Sep 17 2015 usb3 -> /media/usb3
            [root@xbian ~ # ls -l /var/lib/mpd/music/usb0
            lrwxrwxrwx 1 root root 11 Sep 17 2015 /var/lib/mpd/music/usb0 -> /media/usb0
            [root@xbian ~ # ls -l /var/lib/mpd/music/usb0/MusicAndMovies/iTunes/iTunes\ Media
            drwxr-sr-x 1 xbian xbian 4 Mar 2 06:51 Automatically Add to iTunes.localized
            drwxr-sr-x 1 xbian xbian 2 Mar 2 06:51 Downloads
            drwxr-xr-x 1 xbian xbian 338 Mar 2 22:06 Music

            So I tried setting $cfg[‘media_dir’] to:
            /var/lib/mpd/music/usb0/MusicAndMovies/iTunes/iTunes Media/Music/ and ran Update again.

            None of those worked. Any thoughts?

            Another thing: No matter how I set the music_directory path in /etc/mpd.conf, when I run mpc update and watch /var/log/mpd/mpd.log, the database always starts the scan at /var/lib/mpd/music/usb0/. That is, it doesn’t seem to respect the subdirectory I set as the top directory (e.g. /var/lib/mpd/music/usb0/MusicAndMovies/iTunes/iTunes Media/Music/)

            I guess I may need to dive deeper into the mpd documentation.

            Thanks again, I’m sure this will be awesome if I can get it to work!

            (btw, how are you able to format the text in your replies? makes it a lot easier to read!)

  5. Mappr

    Also, streaming individual songs works well. But when I stream an album, the first song plays but subsequent songs cut in and out, then drop out completely.

    Sorry for the long posts – would it be better for you if I logged issues on Github instead?

    Here’s the tail output from /var/log/mpd/mpd.log
    ———–
    Mar 14 02:04 : ffmpeg/mp3: Could not find codec parameters (Audio: mp3, 0 channels, s16p)
    Mar 14 02:04 : ffmpeg/mp3: Estimating duration from bitrate, this may be inaccurate
    Mar 14 02:04 : ffmpeg/aac: Sample rate index in program config element does not match the sample rate index configured by the container.
    Mar 14 02:04 : ffmpeg/aac: get_buffer() failed
    Mar 14 02:04 : ffmpeg/aac: More than one AAC RDB per ADTS frame
    Mar 14 02:04 : ffmpeg/aac: is not implemented. Update your Libav version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
    Mar 14 02:04 : ffmpeg/aac: Error decoding AAC frame header.
    Mar 14 02:04 : ffmpeg/aac: Could not find codec parameters (Audio: aac, 0 channels, fltp, 352 kb/s)
    Mar 14 02:04 : ffmpeg/aac: Estimating duration from bitrate, this may be inaccurate
    Mar 14 02:04 : ffmpeg/aac: More than one AAC RDB per ADTS frame
    Mar 14 02:04 : ffmpeg/aac: is not implemented. Update your Libav version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
    Mar 14 02:04 : ffmpeg/aac: Error decoding AAC frame header.
    Mar 14 02:04 : ffmpeg/aac: More than one AAC RDB per ADTS frame
    Mar 14 02:04 : ffmpeg/aac: is not implemented. Update your Libav version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
    Mar 14 02:04 : ffmpeg/aac: Error decoding AAC frame header.
    Mar 14 02:04 : ffmpeg/aac: Sample rate index in program config element does not match the sample rate index configured by the container.
    Mar 14 02:04 : ffmpeg/aac: Input buffer exhausted before END element found
    Mar 14 02:04 : ffmpeg/aac: More than one AAC RDB per ADTS frame
    Mar 14 02:04 : ffmpeg/aac: is not implemented. Update your Libav version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
    Mar 14 02:04 : ffmpeg/aac: Error decoding AAC frame header.
    Mar 14 02:04 : ffmpeg/aac: Sample rate index in program config element does not match the sample rate index configured by the container.
    Mar 14 02:04 : ffmpeg/aac: Sample rate index in program config element does not match the sample rate index configured by the container.
    Mar 14 02:04 : ffmpeg/aac: Not evaluating a further program_config_element as this construct is dubious at best.
    Mar 14 02:04 : ffmpeg/aac: SSR
    Mar 14 02:04 : ffmpeg/aac: is not implemented. Update your Libav version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
    Mar 14 02:04 : ffmpeg/aac: If you want to help, upload a sample of this file to ftp://upload.libav.org/incoming/ and contact the libav-devel mailing list.
    Mar 14 02:04 : ffmpeg/aac: More than one AAC RDB per ADTS frame
    Mar 14 02:04 : ffmpeg/aac: is not implemented. Update your Libav version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
    Mar 14 02:04 : ffmpeg/aac: Error decoding AAC frame header.
    Mar 14 02:04 : ffmpeg/aac: Number of bands (13) exceeds limit (8).
    Mar 14 02:04 : ffmpeg/aac: More than one AAC RDB per ADTS frame
    Mar 14 02:04 : ffmpeg/aac: is not implemented. Update your Libav version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
    Mar 14 02:04 : ffmpeg/aac: Error decoding AAC frame header.
    Mar 14 02:04 : ffmpeg/aac: Could not find codec parameters (Audio: aac, 47 channels, fltp, 574 kb/s)
    Mar 14 02:04 : ffmpeg/aac: Estimating duration from bitrate, this may be inaccurate

    1. Mappr

      I’m getting somewhere!

      Long story, but I was using the USB drive described above to test and see how O!MPD worked and if I liked it. Originally, when I first set up the Pi using Raspbian, I had my music on a RAID disk (created from usb sticks on a hub).

      When I installed your XBIAN image I couldn’t get madam (RAID controller) to install on XBIAN. (It had to do with Upstart/systemd/SysV weirdness). But I found a workaround and now the RAID disk is working, so I disconnected the usb drive and am now using the RAID.

      Mounted the drive at /media/pi/MusicAndMedia and in /etc/mpd.conf set:
      music_directory “/media/pi/MusicAndMovies/iTunes/iTunes\ Media/Music”

      Also in /var/www/html/ompd/include/config.inc.php set:
      $cfg[‘media_dir’] = ‘/media/pi/MusicAndMovies/iTunes/iTunes Media/Music/’;

      Ran O!MPD update and now no path errors when playing a track! Can add tracks to playlist and seeing the progress bar move and animated waveform-y icon beside the track that’s playing – but not hearing anything.

      Thought that could be because the O!MPD web interface is just the front end controller for mpd? So I set up a player profile using :6600 and then tried to listen on VLC using Network Stream. No dice.

      Progress, but still not quite there. Any thoughts?

      Thanks,

        1. Mappr

          It’s working!

          (sorry, this thread is getting really long. I’d clean it up, but can’t go back and edit my comments)

          Music is now playing though local audio output on the RPi. Still haven’t figured out how to configure playing on other clients or in the browser.

          But thanks, this is an awesome piece of software. Congrats!

          1. Artur Sierżant Post author

            I’m glad you solved the problem 🙂

            Using O!MPD’s interface you can only control mpd servers. If you want to play music on other clients (vlc, foobar, etc.) you can use streaming options – in this case O!MPD creates and sends to browser .m3u file, which can be open in any program that supports streaming. You mentioned that streaming doesn’t work properly in your configuration – if you use version 1.02 from xbian image from my web page, then please try version from github. It might solve this issue. Besides, github version allows to play music on any mpd in the network – without the need of configuring music_directory and updating mpd database (this is based on streaming).

            Thanks for your comment and don’t worry about length of this thread – maybe this will help somebody.

  6. Joseph Donahue

    I have one problem guys please help me: If I download two songs of the same artist the music art of the first song gets copied on to the second song’s music art. Any help would be much appreciated. 

    1. Artur Sierżant Post author

      Hi, there are at least 2 possible solutions:

      1. If you have some tracks that doesn’t belong to any particular album and are performed by various artists, you can place them in folder defined in configuration file in section Misc artists folder. Every file from this folder will be assigned to an album with this name and file image/misc_image.jpg will be used as cover.

      2. If you have some tracks of an artist, that doesn’t belong to any particular album, you can place them in folder defined in configuration file in section Misc tracks folder. All files from this folder will be assigned to album which name consists of name of that folder and name of artist (name of artist is taken from tag ARTIST or ALBUMARTIST from first media file in folder). OK, an example: default value of $cfg['misc_tracks_folder'] is Various Tracks of . If you create this folder (name of this folder must contain this string, but you can add some more info, i.e. you can create folder Various Tracks of U2) and place in this some tracks of U2, O!MPD will create album called Various Tracks of U2 and will assign cover from file folder.jpg or folder.png from this folder.

      In both cases in Now Playing every track will have cover taken from its PICTURE tag (if defined – in other case cover will be taken from file folder.jpg or folder.png from this folder).

      You can find some other info about file structure on Configuration page.

      Hope that helps.

      Best regards,
      Artur

Leave a Reply

Your email address will not be published. Required fields are marked *