INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Album Artwork (exact behaviour)  (Read 3344 times)

Slope

  • Recent member
  • *
  • Posts: 35
Album Artwork (exact behaviour)
« on: April 09, 2008, 03:08:41 pm »

Hey,

I was wondering if there is a way of extracting the in mp3-tags saved pictures and add them as images to my library. (You guessed it, I love Artwork...)

Is it furthermore possible to have the artwork, that was previously saved in a custom folder, moved and named according to the cover art file location preferences (Same folder, [Artist] - [Album])?

How about the back of the Artwork & the booklet? I guess it's not possible to associate it with my titles in any other way than saving it as images with an appropriate name (e.g. [Album] - [Artist] Back)). Am I wrong?

One more thing, provided a friend would copy an album from of my library, is there any chance that he might not have the artwork available on his computer?

Thanks

Slope
Logged

PeterO

  • Regular Member
  • Recent member
  • *
  • Posts: 13
  • there are garden animals ...
Re: Album Artwork (exact behaviour)
« Reply #1 on: April 09, 2008, 03:56:43 pm »

Hi Slope,
yes that is possible !
I am long time user of media center and have maintained allmost all my album covers with media center.  After switching to Windows Media Center for a few month I am back again, because WMP 11 is converting all to 200x 200 pixel.
So I wanted to rescue the album covers and have just written a little visual basic.net which is extracting the Album covers out of a MP3 file and store it in the album folder.

It is possible to name it using the existing tags (Album - Artist)  and if there there are several album cover in a single folder (e.g. Various Artists)  then it extracts that as well.
I was able to create this program with the help of a freeware C++ Library, so you have to copy that dll into the system 32 library.
Have found this library with google, the name is "audiogenie".
I am using Visual basic Studo 2008 express which is free of cost as well.
You can have have the source code or the exe, it is up to you.

best regards
Peter
Logged

Frobozz

  • Citizen of the Universe
  • *****
  • Posts: 636
  • There is a small mailbox here.
Re: Album Artwork (exact behaviour)
« Reply #2 on: April 09, 2008, 05:28:08 pm »

The prgram Mp3tag can extract album art from tags and save it using most any naming scheme you want.  I have been using it to extract the album art I have in tags to a separate folder as a backup.

If you try Mp3tag I would suggest using the latest development (beta) edition from http://developer.mp3tag.de/  A couple of bugs have been fixed relating to album art extraction.

Mp3tag is freeware.
Logged

leezer3

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1570
Re: Album Artwork (exact behaviour)
« Reply #3 on: April 09, 2008, 05:31:11 pm »

Its not often that people write handy little utilities like this, so- Source and binary please  ;D
If you're looking for other little bits that would be nice to add, how recursion? (Point it at a top level directory & let it process all subdirectories as well)

Full on tag editors are all very well, but can sometimes be a little much hastle for simple jobs.

Cheers

-Leezer-
Logged

Slope

  • Recent member
  • *
  • Posts: 35
Re: Album Artwork (exact behaviour)
« Reply #4 on: April 09, 2008, 05:37:55 pm »

Slope
Hi Slope,
yes that is possible !
I am long time user of media center and have maintained allmost all my album covers with media center.  After switching to Windows Media Center for a few month I am back again, because WMP 11 is converting all to 200x 200 pixel.
So I wanted to rescue the album covers and have just written a little visual basic.net which is extracting the Album covers out of a MP3 file and store it in the album folder.

It is possible to name it using the existing tags (Album - Artist)  and if there there are several album cover in a single folder (e.g. Various Artists)  then it extracts that as well.
I was able to create this program with the help of a freeware C++ Library, so you have to copy that dll into the system 32 library.
Have found this library with google, the name is "audiogenie".
I am using Visual basic Studo 2008 express which is free of cost as well.
You can have have the source code or the exe, it is up to you.

best regards
Peter

Hey Peter,

Well that sounds great!

That would safe me loaaads of time.

I guess I'd be safer to give people like me the .exe version, tough...

Many thanks,


Logged

Slope

  • Recent member
  • *
  • Posts: 35
Re: Album Artwork (exact behaviour)
« Reply #5 on: April 09, 2008, 05:41:52 pm »

Its not often that people write handy little utilities like this, so- Source and binary please  ;D
If you're looking for other little bits that would be nice to add, how recursion? (Point it at a top level directory & let it process all subdirectories as well)

Full on tag editors are all very well, but can sometimes be a little much hastle for simple jobs.

Cheers

-Leezer-


Good link, looks like a handy little piece of software. Gonna have a closer look at that.

Peace

Slope
Logged

leezer3

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1570
Re: Album Artwork (exact behaviour)
« Reply #6 on: April 09, 2008, 06:44:45 pm »

If you're talking to me, thats not a bit of software, but rather a fancy little trick that can be implemented in PeterO's program :)

Cheers

-Leezer-
Logged

PeterO

  • Regular Member
  • Recent member
  • *
  • Posts: 13
  • there are garden animals ...
Re: Album Artwork (exact behaviour)
« Reply #7 on: April 13, 2008, 07:14:52 am »

Hi all,
:-)  yes it is dangerous to download and start an unknown exe file, so I give you only the source code in txt format.
What is the best way to post such things?

It is Visual basic code like the following text:

Currently I have round 600 lines.  An other option is to zip the visual basic project files and give you that.
Then you could download the free Microsoft Visual Basic 2008 Express Edition and open and compile the project to get the exe-
But then you have to trust the dll's package from AudioGenie   ;-)

I see , live is not so easy.

The most tricky things is what you should /can do with the extracted JPG files ! 
Just store it for backup is boring.  Do you have a good idea ?

I am using jriver Jukebox/MediaCenter since 2002 and the best idea would be to combine theses ideas with the MediaCenter.
Like using the Playing Now HTML code to show more pictures than the standard picture.
I have learned in the last days that you can store more than one jpg picture in one mp3 file.

You can easily modify the MediaCenter playing now Track Info Visualization stored in directory
C:\Program Files\J River\Media Center 12\Visualizations\Track Info
Just copy and paste one of the existing and modify and improve it.
You can then choose in MediaCenter your version of the trackinfo, with a bigger Album Cover, with rolling lyric text and much more thing.
It is just limited by your imagination.

best regards +  :-)
Peter


Private Sub CheckSubFolder(ByVal OneFolder, ByVal posi, ByVal pLogfileName)
        Dim OutputText As String = ""
        Dim bErfolgreich As Boolean = False
        Dim PictureType As String = ""
        Dim PictureNumberInFolder As Integer = 0
        Dim NewPictureName As String = ""
        Dim NewPictureName1 As String = ""
        Dim NewPictureName2 As String = ""
        Dim PictureArray1() As System.Byte
        Dim PictureArray2() As System.Byte


        Dim PictureArray1Length As Integer = 0
        Dim PictureArray2Length As Integer = 0

        Dim PictureIndex1 As Integer = 0
        Dim PictureIndex2 As Integer = 0
        Dim outputFolder As String = OneFolder
        Dim outputFolder1 As String = OneFolder
        Dim outputFolder2 As String = OneFolder
        Dim errorText As String = "Check Subfolder "

        Try

            errorText = "read folder storage checkbox ..."

            If FolderStorage.CheckState = CheckState.Checked Then
                outputFolder = OneFolder
                outputFolder1 = fullAlbumArtistCoverFilePath
                outputFolder2 = fullArtistAlbumCoverFilePath
            Else

                outputFolder1 = fullAlbumArtistCoverFilePath
                outputFolder2 = fullArtistAlbumCoverFilePath


            End If



            Dim Genie As AudioGenie2
            Genie = New AudioGenie2
            Dim Files As String() = Directory.GetFiles(OneFolder)
            If nStopSearch = 1 Then
                '  MsgBox("Stopped")
            Else
                ' MsgBox("Searching")

                errorText = "start going trough all files in subfolder: " & OneFolder

                For Each TempFile As String In Files
                    ' MsgBox(TempFile)
                    'MsgBox(Genie.AUDIOAnalyzeFile(TempFile))
                    errorText = "Analyse type of file: ..mp3.. ogg .." & TempFile

                    If TempFile.ToUpper.EndsWith("MP3") Then
                        If (Genie.AUDIOAnalyzeFile(TempFile)) = 1 Then


                            errorText = "Analyse type of file has found that File is MP3: " & TempFile

                            PictureNumberInFolder = PictureNumberInFolder + 1
                            errorText = "started going through all files in subfolder: PictureNumberInfolder = " & PictureNumberInFolder
                           
                            OutputText = OutputText & TempFile & vbTab '& vbCrLf
                            OutputText = OutputText & Genie.AUDIOArtist & " - " & Genie.AUDIOAlbum & vbTab '& vbCrLf

                            ' Genie.ID3V2DeleteComments()
                            'Genie.AUDIOSaveChanges()

                            Dim numberPictures As Integer = Genie.ID3V2GetPictures()
                            OutputText = OutputText & "Number of Pictures = " & numberPictures & "  " & vbTab '& vbCrLf

                            For tempPictureNo As Integer = 1 To numberPictures

                                OutputText = OutputText & "Picture No " & tempPictureNo & " :  " & Genie.ID3V2GetPictureMime(tempPictureNo) & vbTab '& vbCrLf

                                PictureType = ""
                                PictureType = Genie.ID3V2GetPictureMime(tempPictureNo)

                                Dim NewAlbum_Artist_Name As String = Genie.AUDIOAlbum & " - " & Genie.AUDIOArtist
                                Dim NewAlbum_Artist_Name_before = NewAlbum_Artist_Name

                                errorText = "Checking if there are not allowed characters in Album Artist Name: Name = " & NewAlbum_Artist_Name



                                NewAlbum_Artist_Name = NewAlbum_Artist_Name.Replace(":", "_")
                                NewAlbum_Artist_Name = NewAlbum_Artist_Name.Replace("*", "_")
                                NewAlbum_Artist_Name = NewAlbum_Artist_Name.Replace("/", "_")
                                NewAlbum_Artist_Name = NewAlbum_Artist_Name.Replace("\", "_")

... and so on ...                 
Logged

rossp

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 772
Re: Album Artwork (exact behaviour)
« Reply #8 on: April 18, 2008, 08:30:07 am »

Hi Peter, can you give me the source code please.

Ross
Logged

PeterO

  • Regular Member
  • Recent member
  • *
  • Posts: 13
  • there are garden animals ...
Re: Album Artwork (exact behaviour)
« Reply #9 on: April 19, 2008, 10:32:09 am »

Hi Slope and Ross,
have just zipped the whole Visual Basic Net Project Folder and you can download from
www.peterobermeier.de/Album Cover Export.zip
Just copy it in the Visual Basic 2008 Express Project Folder and open it with File/ Open Project.
The file path should be:  Visual Basic 2008 / Projects / AudioGenie1.sln

But be aware that you need to have the freeware  dlls from www.audiogenie.de.
All what you have to do is to copy it in the windows system32 directory. On the audiogenie webpage you will find the instructions.
I have no personal relationship to this webpage or the owner and I am just a normal user who has googled out this web page and using the freeware code.

The main function of my code is to go recursively through all subfolders and check if there are jpg, bmp, gif and other picture files stored in MP3 File.
You can choose to store it in a special folder or in the artist Album folders.
Please start with the special folder, it is much easier to delete.
But even a deletion in the artist album folder is easy because the files names are always starting with "AlbumCover - "
example:  "AlbumCover - Celine Dion - Falling into You - P1-1.jpg"
I have tried to check if the album cover is dublicate and if all mp3 files have the same picture it will work 100%.
If there is one mp3 in the middle with no album cover or a different, the other pictures will be extracted again with a new name.
So you can manage VARIOUS ARTISTS Folders as well.

In my code there is a currently deactivated part where I have extracted all the comments in the MP3 File.
with the purpose to read and change the old MediaCenter 10/11 special attributes.


Please be aware that it is your own risk to use that piece of software and make sure you have a backup even the software is currently only reading!!!

You should create first a test folder with some Artist Album subfolders.  Create the exe file and copy it in the parent test folder.
Or you can create  a test folder in D:\AlbumCoverTest.
This file path can be choosen easily with the SHOW TEST PATH button.
A logfile will be created and you see what files has been checked by the software and what album covers has been extracted. You can open it with excel.

Meanwhile I have created a playing now Track info plugin, just very simple where I could view the backside of album cover in addition to the front album cover.
Naturally it must exist and stored in a special folder or in the artist album folder.  It is still in beta phase and if I can show good results I will share.
I am using the Media Center SDK you will find under the wiki: http://wiki.jrmediacenter.com/index.php/Track_Info_Template_SDK
A very nice plugin which is using the same SDK is the PM plugin and you can find it under:   http://yabb.jriver.com/interact/index.php?topic=42976.0


best regards
Peter
Logged

PeterO

  • Regular Member
  • Recent member
  • *
  • Posts: 13
  • there are garden animals ...
Re: Album Artwork (exact behaviour)
« Reply #10 on: April 19, 2008, 10:53:28 am »

PS: Have forgotten to mention that the Code ( I call it PAC-SA) was tested only under Vista! 
Here a screenshot of the program:
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1260
Re: Album Artwork (exact behaviour)
« Reply #11 on: April 20, 2008, 04:26:48 am »

Hi Slope,
yes that is possible !
I am long time user of media center and have maintained allmost all my album covers with media center.  After switching to Windows Media Center for a few month I am back again, because WMP 11 is converting all to 200x 200 pixel.
So I wanted to rescue the album covers and have just written a little visual basic.net which is extracting the Album covers out of a MP3 file and store it in the album folder.

Are you saying that WMP 11 takes the folder.jpgs in folders and resixe them if you use WMP11, or do I misunderstand you
Logged

PeterO

  • Regular Member
  • Recent member
  • *
  • Posts: 13
  • there are garden animals ...
Re: Album Artwork (exact behaviour)
« Reply #12 on: April 20, 2008, 08:20:33 am »

Hi Elvis 133,
yes that is correct! 
But it is not happen automatically, just after you click on the Button: Save all changes (or similar, I have the German version of WMP11 so I cannot tell the exact name).

To get a better explanation please google it out, just use the keywords:  resize  200x200  WMP11
There is a very nice web log with a good explanation from  Dale Preston, he is having good freeware tools round MP3 Tagging and Viewing as well.
In fact, Dales Tool was the trigger for my own tool, because it is not working if there is an incorrect (empty) COMMENT inside the MP3 File.
And the challenge was to remediate the wrong comment or create an own piece of software.

Bottom Line: After I have realized what WMP11 is doing I have stopped using it and switched back to JRiver Media Center 11 and will update to Version 12 in the next days.

best regards
Peter
Logged

flac.rules

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1260
Re: Album Artwork (exact behaviour)
« Reply #13 on: April 20, 2008, 09:13:20 am »

Ugh, why do MS insist on making software that changes the files in ways the user does not expect? I hate it when programs change files in that way.
Logged

Slope

  • Recent member
  • *
  • Posts: 35
Re: Album Artwork (exact behaviour)
« Reply #14 on: April 30, 2008, 03:37:27 pm »

Many thanks PeterO!

I normally stay at the shallow end, but this time I might just have to take the plunge!

@Elvis133

Yeah, I've been boycotting that type of software for years and still the market is full of it.   ;D
Logged
Pages: [1]   Go Up