Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Change the properties of the mp3 file

Posted on 2006-11-27
5
Medium Priority
?
5,390 Views
Last Modified: 2008-03-17
I like to change the properties of mp3 files like (title, genre, artist) within VB.net program.  I can change the properties manually but I like to change programmaticaly.

Is there a way that I can access the mp3 files and change the properties.

Please provide the code to get the full points.
0
Comment
Question by:tgatif
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 1400 total points
ID: 18020255
This should be close to what you need...

'code let's you change some ID3 metadata in one mp3 file.
  Dim id3 'As New CddbID3Tag
  Set id3 = CreateObject("CDDBControl.CddbID3Tag")
  id3.LoadFromFile "Z:\Work\94.01.09 rozsivani a sklizeni.mp3", False
  id3.Album = "Život za život"
  id3.Title = "Boží rozsívání a sklizeò"
  id3.CopyrightHolder = "Fotobit, s.r.o."
  id3.CopyrightYear = "2005"
  id3.FileId = "Ab-33-00025"
  id3.Genre = "Speech"
  id3.ISRC = "Ab-33-00025"
  id3.LeadArtist = "Alexandr Flek"
  id3.PartOfSet = "1"
  id3.Year = "1994/01/09 10:00"
  id3.Comments = "Remaster kázání 1 "
  id3.SaveToFile "Z:\Work\94.01.09 rozsivani a sklizeni.mp3"
 
      Second code is a VBScript batch which let's you change Artist field in all music or other sound mp3 files in one folder.
'Batch change ID3 tag Author In folder files
'2005 Antonin Foller, Motobit Software
Sub ChangArtist(sFolder, Artist)
 
  'get FileSystemObject To enumerate files
  Dim FS: Set FS = CreateObject("Scripting.FileSystemObject")
 
  'Get id3 object To change data
  Dim id3: Set id3 = CreateObject("CDDBControl.CddbID3Tag")
 
  'Enumerate folder files
  Dim File
  For Each File In FS.GetFolder(sFolder).Files
    'Select only mp3 files In the folder
    If LCase(Right(File.Name, 4)) = ".mp3" Then
      'Load id3 data from the file
      id3.LoadFromFile File.Path, False
     
      'Change Artist In the id3 data
      id3.LeadArtist = Artist
     
      'Save modified id3 data To the file
      id3.SaveToFile File.Path
    End If
  Next
End Sub
 
ref: http://www.motobit.com/tips/detpg_change-id3-tags-script/
0
 
LVL 9

Expert Comment

by:DjDezmond
ID: 18020512
I am half way through a project that is designed for batch processing of MP3 tags... The idea is you drag multiple files onto the form and it will read the titles, renaming it if need be (populating the ID tags as it goes along). It will eventually support command line params also (eg. MyApp.exe "C:\AllMyTunes").

It uses a DLL reference for the MP3 reading...

If it will be useful, I can post a link to the project on my server?
0
 

Author Comment

by:tgatif
ID: 18020933
@sirbounty

I tried the code as it is.  It executed well without any errors.

At the end of execution, it does not change the properties of the file.

Have you tried the code.?

Any suggestions
0
 
LVL 7

Assisted Solution

by:Mohamed Zedan
Mohamed Zedan earned 200 total points
ID: 18022363
Chances are that your mp3 files tag are ID3v2 or higher for this you need to use this library I did that application before for batch renaming of files and titles ...
you'll find this library very usefull ....
btw it's free :) ....

http://home.fuse.net/honnert/hundred/?UltraID3Lib
0
 
LVL 7

Expert Comment

by:Mohamed Zedan
ID: 18022365
there is a sample application on the site also in vb.net
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question