|
what about mp3 artwork?
how to read them ?
ZaneRsoft Corporation
|
|
|
|
|
Does the source code get the CRC after the header (if their is one)? Then calculate what the CRC should be and compare it to the one read after the header for MPEG Frame Audio Header validation?
|
|
|
|
|
|
With MP3Info.ID3v1Tag
.Title = DataGridViewMp3.Rows(e.RowIndex).Cells(4).Value
.Artist = DataGridViewMp3.Rows(e.RowIndex).Cells(3).Value
.Album = DataGridViewMp3.Rows(e.RowIndex).Cells(5).Value
.Year = DataGridViewMp3.Rows(e.RowIndex).Cells(6).Value
.Genre = 9
End With
MP3Info.Update()--> Funktioniert nicht
|
|
|
|
|
I have an application where all of the mp3 files will have made up genres which are not in the list of enums. In all cases I get 12 when I read the genre or "other" when I read the string. Is there a way to read back the actual genre string in these cases.
|
|
|
|
|
|
Reading works fine. When i write to the tag, the value doesn't appear to change if it already contained a value. However, if i proceed to read the same information it returns what i previously wrote.
Example:
The MP3 ID tag already contains the album name "Original Album" as seen in the file system. I write the new album info like this:
objMP3Info.ID3v1Tag.Album = "New Album"
objMP3Info.Update()
If i read the tag again, i will see "New Album", but if i view the file properties i don't see the change. If i clear the tag using the file system (Windows Vista) and re-run the code i will get the results i expect. The new album name will be written and viewed correctly in the file system.
Basically, i need to manually clear out all the tag info if i want this sample code to write values that i will see with my OS.
Please help!
|
|
|
|
|
you should use objMP3Info.ID3v1Tag.Update()
but 'Update' is not a member of 'Monotic.Multimedia.MP3.ID3v1Tag'.
we all are waiting for an answer.
|
|
|
|
|
I am looking for a fresh version of the ID with words of the songs. It is extremely useful in hip hop songs.
Also while looking at website about hip hop dance moves I have found that the old tags might do the job because there are less words at the songs.
|
|
|
|
|
http://developer.novell.com/wiki/index.php/TagLib_Sharp
by the way, not by me... I am just using it...
|
|
|
|
|
this sample code for the mp3-tags is excellent for reading the tags, but how can i write some informations??
objMP3Info.ID3v1Tag.Title = "Another title"
objMP3Info.ID3v1Tag.update()
error: update isnt a member of monotonic.multimedia.mp3.ID3v1Tag...
it doesnt work ;-(
anybody can help me?
|
|
|
|
|
|
Is it possible to read the tags for remote MP3's with this class?
|
|
|
|
|
Hi,
I'm using this powerfull code and I think that is very well done.
I think that the form to obtain the genre is a little archaic, and i'm gona implement the search whit a XML file that can be editable in the future.. i don't now what you think..
For now I think that the GetGenreString function must end like this:
Public Function GetGenreString(ByVal bytGenre As Byte) As String
Dim strGenres() As String = {"Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", _
"Hip - Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B", "Rap", "Reggae", "Rock", "Techno", _
"Industrial", "Alternative", "Ska", "Death Metal", "Pranks", "Soundtrack", "Euro -Techno", "Ambient", _
"Trip -Hop", "Vocal", "Jazz Funk", "Fusion", "Trance", "Classical", "Instrumental", "Acid", "House", "Game", _
"Sound Clip", "Gospel", "Noise", "AlternRock", "Bass", "Soul", "Punk", "Space", "Meditative", _
"Instrumental Pop", "Instrumental Rock", "Ethnic", "Gothic", "Darkwave", "Techno -Industrial", "Electronic", _
"Pop -Folk", "Eurodance", "Dream", "Southern Rock", "Comedy", "Cult", "Gangsta", "Top 40", "Christian Rap", _
"Pop/Funk", "Jungle", "Native American", "Cabaret", "New Wave", "Psychadelic", "Rave", "Showtunes", "Trailer", _
"Lo - Fi", "Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", _
"Folk", "Folk/Rock", "National Folk", "Swing", "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde", _
"Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock", "Big Band", "Chorus", _
"Easy Listening", "Acoustic", "Humour", "Speech", "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony", _
"Booty Bass", "Primus", "Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba", "Folklore", "Ballad", _
"Power Ballad", "Rhythmic Soul", "Freestyle", "Duet", "Punk Rock", "Drum Solo", "A Cappella", "Euro - House", _
"Dance Hall", "Goa", "Drum & Bass", "Club - House", "Hardcore", "Terror", "Indie", "BritPop", "Negerpunk", _
"Polsk Punk", "Beat", "Christian Gangsta Rap", "Heavy Metal", "Black Metal", "Crossover", "Contemporary Christian", _
"Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "JPop", "Synthpop"}
If bytGenre > 147 Then
Return "Unknown"
Else
Return strGenres(bytGenre)
End If
End Function
Thanks again for the class man..
Ricsamma
|
|
|
|
|
ricsamma wrote: I think that the form to obtain the genre is a little archaic, and i'm gona implement the search whit a XML file that can be editable in the future.. i don't now what you think..
Yes, it is, but i think there is no need for an extra xml file, because the genres don't will change.
|
|
|
|
|
Hi,
This is a really nifty little class. Thanx a million for it. There was no project or anything in the download though, so I created a project, added a form to it and on the form put a ListBox1 and a "test" button called btn_test.
Then I changed the code from this page and added it to the btn_test.
Hope this helps others.
John
Private Sub btn_Test_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Test.Click
Dim objMP3Info As New Monotic.Multimedia.MP3.MP3Info
With ListBox1.Items
' Set the filename property
objMP3Info.Filename = "test.mp3"
' Add the header information to a listview
.Add("Filesize= " & objMP3Info.Filesize & " Byte")
.Add("SamplingRateFrequency= " & objMP3Info.SamplingRateFrequency & " Hz")
.Add("Padding= " & objMP3Info.Padding & " Bytes")
.Add("Private= " & objMP3Info.PrivateBit)
.Add("Copyright=" & objMP3Info.Copyright)
.Add("OriginalBit= " & objMP3Info.OriginalBit)
.Add("Bitrate= " & objMP3Info.Bitrate & " bps")
.Add("FrameSamples= " & objMP3Info.FrameSamples)
.Add("FrameSize= " & objMP3Info.FrameSize & " Byte")
.Add("Length= " & objMP3Info.Length & " s (" & Int(objMP3Info.Length / 60) & ":" & objMP3Info.Length Mod 60 & " m)")
.Add("HeaderPosition= " & objMP3Info.HeaderPosition)
.Add("VBRScale= " & objMP3Info.VBRScale)
Select Case objMP3Info.MPEGVersion
Case MP3Info.Monotic.Multimedia.MP3.MPEGVersionEnum.MPEG1
.Add("MPEGType= " & "MPEG 1")
Case MP3Info.Monotic.Multimedia.MP3.MPEGVersionEnum.MPEG2
.Add("MPEGType= " & "MPEG 2")
Case MP3Info.Monotic.Multimedia.MP3.MPEGVersionEnum.MPEG25
.Add("MPEGType= " & "MPEG 2.5")
End Select
Select Case objMP3Info.Layer
Case MP3Info.Monotic.Multimedia.MP3.LayerEnum.LayerI
.Add("Layer= " & "Layer I")
Case MP3Info.Monotic.Multimedia.MP3.LayerEnum.LayerII
.Add("Layer= " & "Layer II")
Case MP3Info.Monotic.Multimedia.MP3.LayerEnum.LayerIII
.Add("Layer= " & "Layer III")
End Select
Select Case objMP3Info.Protection
Case MP3Info.Monotic.Multimedia.MP3.ProtectionEnum.None
.Add("Protection= " & "None")
Case MP3Info.Monotic.Multimedia.MP3.ProtectionEnum.CRC
.Add("Protection= " & "By CRC")
End Select
Select Case objMP3Info.ChannelMode
Case MP3Info.Monotic.Multimedia.MP3.ChannelModeEnum.DualChannel
.Add("ChannelMode= " & "Dual Channel")
Case MP3Info.Monotic.Multimedia.MP3.ChannelModeEnum.JointStereo
.Add("ChannelMode= " & "Joint Stereo")
Case MP3Info.Monotic.Multimedia.MP3.ChannelModeEnum.SingleChannel
.Add("ChannelMode= " & "Single Channel")
Case MP3Info.Monotic.Multimedia.MP3.ChannelModeEnum.Stereo
.Add("ChannelMode= " & "Stereo")
End Select
Select Case objMP3Info.Emphasis
Case MP3Info.Monotic.Multimedia.MP3.EmphasisEnum.CCIT
.Add("Emphasis= " & "CCIT")
Case MP3Info.Monotic.Multimedia.MP3.EmphasisEnum.MS5015
.Add("Emphasis= " & "50/15 ms")
Case MP3Info.Monotic.Multimedia.MP3.EmphasisEnum.None
.Add("Emphasis= " & "None")
End Select
Select Case objMP3Info.Encoding
Case MP3Info.Monotic.Multimedia.MP3.EncodingEnum.CBR
.Add("Encoding= " & "CBR")
Case MP3Info.Monotic.Multimedia.MP3.EncodingEnum.VBR
.Add("Encoding= " & "VBR")
End Select
' Add the ID3v1 tag information to a listview
If (objMP3Info.ID3v1Tag.TagAvailable) Then
.Add("ID3 Title= " & objMP3Info.ID3v1Tag.Title)
'[...]()
End If
' Update the tag
'objMP3Info.ID3v1Tag.Title = "Another title"
'objMP3Info.ID3v1Tag.Update()
End With
End Sub
|
|
|
|
|
Hi I need some very basic instruction in how to use this dll in an Excel macro. For instance where do I place the dll to begin with (that is which directory?) I'm using excel 2002. Let's say I want to get the bitrate, size, and encoding(stereo or joint stereo etc) for a single file.
Thanks,
Steve
|
|
|
|
|
You'll need ta compile the DLL with a STRONG NAME and den will need to smack a COM wrapper on it and den register it on your machine using REGSRV23.EXE, a Windows provided executable.
After ya dun all that, the DLL will be available in the VBE as an add-able reference.
|
|
|
|
|
I got a problem with the Property Bitrate() As Integer.
On some MP3 files I have an issue in computing the Bitrate. Stepping with the debugger, I found for those files: Encoding=CBR, MPEGVersion=MPEG25, Layer=Reserved, and then no IF branch inside the block:
If (Me.Encoding = EncodingEnum.CBR) Then
...
Else
is executed, resulting in a Bitrate set to 0 and consequently an overflow error while computing the track length (in seconds) as:
Return Math.Round(f_intAudioSize / Me.Bitrate * 8, 0)
I read somewhere that computing the track length may be difficult for VBR files, but this one is CBR. I read also that ID3 tags should expose the "duration" of the track (solving also inaccuracies eventually coming in this computation on VBR files), but ID3v1Tag property of your class doesn't expose such "duration" (maybe a ID3 v2 feature...).
Can you help me, please?
Thank you in advance,
AV
|
|
|
|
|
|
I had the same problem, but solved it by changing the length property like this:
Public ReadOnly Property Length() As Integer<br />
Get<br />
If Me.Bitrate = 0 Or Me.Bitrate = -1 Then<br />
Return 0<br />
Else<br />
Return Math.Round(f_intAudioSize / Me.Bitrate * 8, 0)<br />
End If<br />
End Get<br />
End Property
Then I made an errorhandling wehn length = 0.
|
|
|
|
|
Add an int parameter (errorskip ) to BinaryHeader function :
private string BinaryHeader(ref string filename, ref bool ReadHeader, ref MP3Info mp3InfoStr, int errorskip = 0)
{...
set a variable int byterrorSkip=0
and when finds the second byte :
if (x == 255) {
FileSystem.FileGet(FIO, ref x, i + 1);
if (x > 249 & x < 252) {
if (errorskip > byterrorSkip){byterrorSkip += 1;continue;}
Headstart = i;
//set header start position
break; // TODO: might not be correct. Was : Exit For
So In ReadHeader Function, every time
bitratio = 0 ...
GoTo anothertry... BinaryHeader(..,..,..,++errorskip )
|
|
|
|
|
objMP3Info.ID3v1Tag.Update() is missing. How can I write tags to mp3 file from my program?
|
|
|
|
|
Above sample is working on my machine, please post the code to find the error.
|
|
|
|
|
I use the same code as you provide in this page (above), but objMP3Info.ID3v1Tag.Update() is missing in your dll. Infact I checked ID3v1Tag and it doesn't contain any Update(), how can it works?
Please upload the correct version of these downloads (files). This will correct this problem.
|
|
|
|
|