+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 20 of 43

[SCRIPT] fancy album art script

This is a discussion on [SCRIPT] fancy album art script within the Modifications and Skins forums, part of the Firmware category; Check bottom of this post for Windows (DOS) version. (updated to v0.3) Here's the bash script, that some of you ...

  1. #1
    Member
    Join Date
    Oct 2007
    Location
    Finland
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    [SCRIPT] fancy album art script

    Check bottom of this post for Windows (DOS) version. (updated to v0.3)

    Here's the bash script, that some of you Linux users out there might want, which will create fancy album art.

    I created it to go with my BRITE skin, but it'll work with any skin, of course.

    You need ImageMagick for this and a little bit of script knowledge to set the 3 or 4 paths, but that shouldn't be too difficult for most Linux users. The script will query your amarok music and find the appropriate album art, resize it, optionally add some magic to make it extra pretty and load it to your music directory.

    Requirements:
    • ImageMagick
    • mounted miniplayer
    • already know that album art is working with your directory setup
    Preparations:
    • set the path of the miniplayer music directory in the MUSICDIR variable
    • set the path of your amarok albumcovers/large (script has a default location)
    • set the path of the nocover.png image (also downloadble here
    • optionally, set the path to the temp directory you want the script to use
    • for ease of use, make sure the file is executable and in your $PATH environment variable
    • the script assumes your MUSIC directory contains a structure like this: "<artistname>-<albumname>" and it will place an <albumname>.jpg file in those directories. Of course if you use another way of displaying album art, you can adjust this in the script
    How to use:

    Code:
    $ meizu_amarok_albumart
    This will just place regular album art on your miniplayer, like we're used to

    Code:
    $ meizu_amarok_albumart true
    This will put a fancy version, with reflection, on a black background, so only suitable for a black background, on your miniplayer

    Code:
    $ meizu_amarok_albumart true <absolute_path_to_your_wallpaper>
    This will put a fancy version of your album art, with reflection based on the supplied background. This can be a background that's on your miniplayer in the PICTURES directory or any other place.The result of the most fancy version you can see in the attached screenshot.

    Any suggestions are welcome, of course. If I feel like it, maybe I'll make one based on (Py)Qt for easier configuration, though once you have the configuration set, there's not much else you'd need a gui for.

    --------------------------------------------------------------------------------

    Windows/DOS version
    Couldn't stand it, had to do one for 'the rest' of the world. So, below is a Windows download. You must alsow have ImageMagick installed.

    Now, for the script instructions. Just extract the zip to a location of your choice. First edit the meizu_albumart.bat file to set your MUSIC directory (the one on your miniplayer). Make sure the miniplayer is connected so that you enter the correct path. Then, go to a DOS prompt, cd to the location of the batch file and run it:

    Code:
    meizu_albumart.bat <optional_path_to_background_image>
    That's all there is to it. How it works? The first script is sort of a wrapper which searches through your miniplayer's MUSIC directory, checking for jpg files. If it finds one, it calls the other script and converts it to look all pretty. So, don't forget: you need to have your albumart in place already.

    Known bugs
    - DOS' SET command can't calculate with decimals, so the alignment of the albumart with the reflection might not be perfect. There are calculation tools that can do this, might build support for that later or find another way.

    Changelog

    version 0.3
    ------------------------------
    20080426 - Changed: added comments so it's easier for others to use

    version 0.2
    ------------------------------
    20080403 - Fixed: slashes don't always work in paths, converted to backslashes
    Attached Images
    Attached Files
    Last edited by parena; 04-26-2008 at 06:22 AM. Reason: windows version updated to 0.3

  2. #2
    Passing By
    Join Date
    Mar 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Waiting for the Windows script
    Look so good!!
    What about resized album art,any ideas??

  3. #3
    Member
    Join Date
    Oct 2007
    Location
    Finland
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Don't hold your breath for the Windows script just yet. Seems it's a bit more complicated than expected.

    What do you mean by resized album art? If you're talking about album art that is not X by X, but ix more like X by Y, then it's not a problem. The script calculates the needed height and adjusts the picture accordingly. Check the attached files to see what I mean. I created those using a standalone version of the resize part.
    Attached Images
    Last edited by parena; 04-01-2008 at 10:34 PM. Reason: extra screenshot

  4. #4
    Member
    Join Date
    Oct 2007
    Location
    Finland
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Windows (well, DOS) version coming. I started creating a batch script by myself and I've got it working like this:

    You place your album art on your M6 like you always do and start the script (after setting the right location for the MUSIC directory). You can also provide a background, just like the Linux version. The script will then find all .jpg files in the MUSIC directory structure and alter those. Woohoo!

    I'm just trying to get rid of a few wrinkles (like positioning of the album image itself, which should have decimal calculations but that's not possible in DOS), but I have it working 100%

  5. #5
    Administrator
    Join Date
    May 2007
    Posts
    3,191
    Thanks
    17
    Thanked 32 Times in 29 Posts
    please no automatic scanning for covers ! (or at least as an option). Drag&Drop would be absolutely sufficient, so I can choose the covers to be converted by myself.
    BatMan, the free video converter for Meizu players. Problems ? English First Aid here. Deutsche Erste Hilfe hier.
    Join the Meizume Chatroom at irc://irc.moofspeak.net/meizume ! Firefox Users : get the Chatzilla Plugin. Other Browsers : use this web client.

  6. #6
    Member
    Join Date
    Oct 2007
    Location
    Finland
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well, the thing I'm working on can be a base for someone else to create a gui for it. I'm a Linux guy and only use Windows to play games and for the meizu resource editor. For now, 2 scripts are needed. One wrapper that scans images and it calls the second one who actually does the converting, per file. So the ability is there already, it's just that someone needs to create that gui for it.

  7. #7
    Administrator
    Join Date
    May 2007
    Posts
    3,191
    Thanks
    17
    Thanked 32 Times in 29 Posts
    perfectly ok that way (for me). Please share what you got so far.
    BatMan, the free video converter for Meizu players. Problems ? English First Aid here. Deutsche Erste Hilfe hier.
    Join the Meizume Chatroom at irc://irc.moofspeak.net/meizume ! Firefox Users : get the Chatzilla Plugin. Other Browsers : use this web client.

  8. #8
    Member
    Join Date
    Oct 2007
    Location
    Finland
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    First windows version is here. Check the original post.

  9. #9
    Junior Member
    Join Date
    Oct 2007
    Posts
    54
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm using windows. I have followed your instructions: installed imagemagick (This version: ImageMagick-6.4.0-3-Q16-windows-dll.exe), connected the player to the pc. Then i have put all my album art in the music directory (My covers previously were in f:\ALBUMS directory, but i think i can modify the MUSICDIR directory in the first script to make it working in that way).
    Open a dos windows, navigate to the folder in which the scripts are, and then i have write "meizu_albumart.bat".
    Then on the video appears the following errors (I have put only one cover in the music directory to make this screen):




    ("Sintassi del comando errata" means "error in syntax command")


    Where is my mistake?
    Last edited by passero; 04-03-2008 at 05:29 PM.

  10. #10
    Freshman
    Join Date
    Jul 2007
    Location
    Netherland
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    hhm

    same here on vista

    composite: unable to open image

  11. #11
    Administrator
    Join Date
    May 2007
    Posts
    3,191
    Thanks
    17
    Thanked 32 Times in 29 Posts
    got the same error, so I debugged the "/" problem.
    The following version features a simple drag+drop plan for single pictures while creating an automatic backup of the original cover.

    Just a quick and dirty hack ... I am too tired today. But it works (good job parena btw !!!)
    Attached Files
    BatMan, the free video converter for Meizu players. Problems ? English First Aid here. Deutsche Erste Hilfe hier.
    Join the Meizume Chatroom at irc://irc.moofspeak.net/meizume ! Firefox Users : get the Chatzilla Plugin. Other Browsers : use this web client.

  12. #12
    Member
    Join Date
    Oct 2007
    Location
    Finland
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Updated to version 0.2 to fix the forward slash (/) bug. Really weird that it was giving problems. It works fine on my XP over here. Oh well...

    Hope the drag and drop can get advanced, that'd be great. How does it work now? Just drop your albumart on top of the bat icon? Sorry for the people who have like 50 albums on their player. Or can you drop multiple files on it? Do you, afterwards, have to copy all those files to your player or do you connect the player and drop the files from there onto the icon?
    Last edited by parena; 04-03-2008 at 08:53 PM.

  13. #13
    Freshman
    Join Date
    Jul 2007
    Location
    Netherland
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it works with dragndrop (one by one), makes a new cover image and copies by it self.
    i only dislike the black borders.

  14. #14
    Member
    Join Date
    Oct 2007
    Location
    Finland
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by cwtim View Post
    it works with dragndrop (one by one), makes a new cover image and copies by it self.
    i only dislike the black borders.
    My version can use the background you want by giving it on the command line. However, you can alter BobbyQ's version by just setting the background you're using on the batch file itself, I guess. So, mine is automatic and does all your miniplayer's albumart, but BobbyQ's is a one by one version that now has a basis for expansion. I'd personally recommend using my version for now, unless you don't want to do all the covers on your miniplayer. But you're welcome to contribute, of course!

  15. #15
    Passing By
    Join Date
    Mar 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can you post a step-by-step tutorial for windows users?
    I'm a little confused about the steps to follow,i tried it for several times,i don't
    know what i,m doing wrong, i don´t know nothing about MS-DOS commands
    help me please !
    Attached Images

  16. #16
    Freshman
    Join Date
    Jul 2007
    Location
    Netherland
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    well, with drag and drop i get this error in dos.. (attachment)

    and the cover still has black borders.. this is the line i edited in dragndrop.bat

    tried them both

    on pc.
    IF EXIST "E:/Documenten van Tim/Mijn afbeeldingen/bg5.jpg" or
    on meizu
    IF EXIST "M:/PICTURES/ClearView/bg5.jpg"
    Attached Images

  17. #17
    Administrator
    Join Date
    May 2007
    Posts
    3,191
    Thanks
    17
    Thanked 32 Times in 29 Posts
    Hi guys, mith parena's permission I will make a BatMan plugin for this nifty gadget. But right now I have a sh**load of other things to do, so that will take a while.
    I am not a fan of the "convert all my covers on the Meizu at once without any way of restoring it to the pristine state" strategy. So, I will try to do it in a "do it / revert it" style. I do have a couple of ideas but no time :-/
    BatMan, the free video converter for Meizu players. Problems ? English First Aid here. Deutsche Erste Hilfe hier.
    Join the Meizume Chatroom at irc://irc.moofspeak.net/meizume ! Firefox Users : get the Chatzilla Plugin. Other Browsers : use this web client.

  18. #18
    Member
    Join Date
    Oct 2007
    Location
    Finland
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Okay, all these errors with the drag and drop version I cannot do anything about, really, at the moment. Perhaps BobbyQ can give a hint or two.

    For me it's not a problem that the thing would browse my miniplayer. The original album art is on your PC right? And having only some converted would look strange to me.

    All I know is that my 'do them all' version works perfectly fine, also with a provided background. Just remember to call the meizu_albumart.bat file (after connecting your miniplayer and changing the paths to the correct locations) and not the other one. This is tested on XP only, though. I have no idea how Vista works with this kind of stuff. I'm not touching Vista. Hurts me enough to use XP.

    And of course it's no problem to integrate this thing in BatMan. The more people can benefit, the better it is.

  19. #19
    Passing By
    Join Date
    Sep 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Great feature!! Nice job!!

    Works on Vista, just edit the .bat-files, right-click meizu_albumart.bat and run it as administrator, next the cmd-screen popping up will stay empty and will disappear when ready..

    Only problem: when you change the meizu background, the border of the album art doesn't match anymore..

    Question: is there a way to increase the transpercy of the reflection? I no programmer so the code in the .bat's is all gibberish to me
    Last edited by Pakkendu; 04-10-2008 at 12:18 PM.

  20. #20
    Junior Member
    Join Date
    Apr 2007
    Posts
    75
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Does it have to be on a black background for the reflecction to work?
    Meizu M6 Miniplayer
    Black
    4gb:D


 

Similar Threads

  1. Yet Another Mencoder Script
    By wishmechaos in forum Video and Imaging
    Replies: 17
    Last Post: 12-17-2008, 03:20 AM
  2. Bash script for conversion under Linux
    By parena in forum Video and Imaging
    Replies: 9
    Last Post: 11-06-2008, 08:42 PM
  3. Linux script for mencoder.
    By shookie in forum Video and Imaging
    Replies: 50
    Last Post: 05-20-2008, 08:10 PM
  4. Batman / Mencoder script based conversion in windows
    By hitman in forum Video and Imaging
    Replies: 2
    Last Post: 11-10-2007, 12:10 PM
  5. album artist tag conflicts with album tag
    By wolffsed in forum Technical
    Replies: 1
    Last Post: 02-22-2007, 09:11 PM