ID3 UDF ID3v1 & ID3v2 MP3 Tags
#41
Posted 06 February 2010 - 01:42 PM
Is there anyone how still can work with this script?
With the coming of version 3.3.2.0 from Autoit it won't work anymore.
I've look to it but the script is to complicated for me.
Is there someone how have the answer for this?
#42
Posted 29 June 2010 - 04:55 PM
Hello,
Is there anyone how still can work with this script?
With the coming of version 3.3.2.0 from Autoit it won't work anymore.
I've look to it but the script is to complicated for me.
Is there someone how have the answer for this?
I have been away from this forum for some time now, but I think I will have time to look into this. I would also like to add some of the fixes that I read about in these postings. Thanks to all the people contributing.
#43
Posted 30 June 2010 - 07:53 AM
I have been away from this forum for some time now, but I think I will have time to look into this. I would also like to add some of the fixes that I read about in these postings. Thanks to all the people contributing.
Yeah!!
I’ll look forward to it.
#44
Posted 10 July 2010 - 04:00 PM
Yeah!!
I’ll look forward to it.
New ID3.au3 code posted, see first posting in this thread. Thanks to michael2t for all his help!
Let me know if there are any issues.
#45
Posted 11 July 2010 - 08:12 AM
Thanks a lot!
New ID3.au3 code posted, see first posting in this thread. Thanks to michael2t for all his help!
Let me know if there are any issues.
#46
Posted 13 August 2010 - 04:54 PM
If you change -
Elseif $FrameID == "TCON" Then;Content Type/Genre $bTagFieldFound = True $bFrameData = Binary($aFrameData[2]) $Genre = BinaryToString($bFrameData) If StringMid($Genre,1,1) == "(" Then ;check if first char is "(" $closeparindex = StringInStr($Genre,")") $GenreID = StringMid($Genre,2,$closeparindex-1) $Genre = _GetGenreByID($GenreID) EndIf ;If no "(" then return the whole field as is $sFrameString = $Genre
to
Elseif $FrameID == "TCON" Then;Content Type/Genre $bTagFieldFound = True $bFrameData = Binary($aFrameData[2]) $bFrameData = BinaryMid($bFrameData,2) $Genre = BinaryToString($bFrameData) If StringMid($Genre,1,1) == "(" Then ;check if first char is "(" $closeparindex = StringInStr($Genre,")") $GenreID = StringMid($Genre,2,$closeparindex-1) $Genre = _GetGenreByID($GenreID) EndIf ;If no "(" then return the whole field as is $sFrameString = $Genre
in the _GetID3FrameString($sFrameData) function, that will do the trick.
You obviously missed including the line $bFrameData = BinaryMid($bFrameData,2). Without it, neither the genre number or text version get's returned.
Once again, thanks for sharing.
I use this UDF in a few of my programs now.
Apologies if this has been mentioned before, but if so it seems you've missed it (i.e. it's still missing from current ID3.au3).
Edited by TheSaint, 13 August 2010 - 04:56 PM.
Make sure brain is in gear before opening mouth! Ignoring those who try to divert conversation with irrelevancies. If I put effort into communication, I expect you to read properly & fully, or just not comment. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox
#47
Posted 12 September 2010 - 04:51 PM
any chance to grab the playtime of the MP3 file in, lets say, seconds?
I thought "TIME" or "TLEN" does the job, but somehow it always returns an empty string ("") for me.
Any suggestions on how to read the track's length in seconds?
Regards
EDIT:
I found some cool UDF by RazerM, Melba23, some code by Simucal, PsaltyDS HERE, works on (at least all of my tested) mp3 files
Cheers!
Edited by gobsor, 12 September 2010 - 05:37 PM.
#48
Posted 18 November 2010 - 08:41 PM
(20100710) I have updated the ID3 UDF to work in the latest Autoit (v3.3.6.1)
Can anyone help me! I'm having problems using ID3.au3 and ID3_Example_GUI.au3 programs
the problem is, is that it don't seem to read some of my mp3 files.
opon opening the result shows
Artist - ÿþA
Album - ÿþV
Please note i have not edited the ID3.au3 and ID3_Example_GUI.au3 files
Whats going on?
#49
Posted 20 November 2010 - 03:02 AM
Can anyone help me! I'm having problems using ID3.au3 and ID3_Example_GUI.au3 programs
the problem is, is that it don't seem to read some of my mp3 files.
opon opening the result shows
Artist - ÿþA
Album - ÿþV
Please note i have not edited the ID3.au3 and ID3_Example_GUI.au3 files
Whats going on?
I believe that is something to do with Unicode text, but I may be wrong?
A quick work-a-round is to use values from File Properties instead, and then rewrite the values.
Do a search in the Forum for the relevant code (or UDF?).
Or use a program like Tagscanner to do it (but be aware, that it defaults to Unicode I think, so you'll need to change that setting).
Hopefully someone will implement a fix for it here before too long.
Make sure brain is in gear before opening mouth! Ignoring those who try to divert conversation with irrelevancies. If I put effort into communication, I expect you to read properly & fully, or just not comment. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox
#50
Posted 10 March 2011 - 01:02 PM
I believe that is something to do with Unicode text, but I may be wrong?
A quick work-a-round is to use values from File Properties instead, and then rewrite the values.
Do a search in the Forum for the relevant code (or UDF?).
Or use a program like Tagscanner to do it (but be aware, that it defaults to Unicode I think, so you'll need to change that setting).
Hopefully someone will implement a fix for it here before too long.
Checkout the updates as of 20110310 (see first post) to see if this problem is corrected.
#51
Posted 11 March 2011 - 02:32 AM
As well as the issue I mention at post #46, I've discovered and quick fixed a few others, including issues with parts of ID3 v1.
I don't know whether you've corrected any of these, but I can pass on to you what I have done so far if you like?
Edited by TheSaint, 11 March 2011 - 02:33 AM.
Make sure brain is in gear before opening mouth! Ignoring those who try to divert conversation with irrelevancies. If I put effort into communication, I expect you to read properly & fully, or just not comment. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox
#52
Posted 11 March 2011 - 11:21 AM
Thanks for that, will check it out.
As well as the issue I mention at post #46, I've discovered and quick fixed a few others, including issues with parts of ID3 v1.
I don't know whether you've corrected any of these, but I can pass on to you what I have done so far if you like?
Thanks for checking it out! I think I have that fix in there that you mention in post #46, but let me know if it works for you. If there is anything else that you found I would love to know about it. Thanks!
#53
Posted 11 March 2011 - 04:44 PM
I've attached my latest version of your UDF, which has some corrections commented by me. For any others I may have missed, you'll have to do a file text comparison.
Obviously your most recent changes have not been incorporated yet.
You no doubt understand this stuff better than me, so you may want to modify my quick corrections somewhat.
ID3.au3 50.96KB
248 downloadsThanks again!
Make sure brain is in gear before opening mouth! Ignoring those who try to divert conversation with irrelevancies. If I put effort into communication, I expect you to read properly & fully, or just not comment. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox
#54
Posted 11 March 2011 - 11:06 PM
This is great feedback! Thanks!No worries, will do.
I've attached my latest version of your UDF, which has some corrections commented by me. For any others I may have missed, you'll have to do a file text comparison.
Obviously your most recent changes have not been incorporated yet.
You no doubt understand this stuff better than me, so you may want to modify my quick corrections somewhat.
ID3.au3 50.96KB 248 downloads
Thanks again!
I want to look at some of the changes you put in there further, but I saw you added a conditional on line 758
; Memory fix by TheSaint (just to avoid crashing)(not a true fix) If $FrameSize > 100000 Then $FrameSize = 100000 $bad = 1 ;MsgBox(262192, "$FrameSize", $FrameSize) EndIf
Did you have problems with the $FrameSize being too big and crashing the program?
Edited by joeyb1275, 11 March 2011 - 11:07 PM.
#55
Posted 12 March 2011 - 10:28 AM
A pleasure to help.This is great feedback! Thanks!
I want to look at some of the changes you put in there further, but I saw you added a conditional on line 758
; Memory fix by TheSaint (just to avoid crashing)(not a true fix) If $FrameSize > 100000 Then $FrameSize = 100000 $bad = 1 ;MsgBox(262192, "$FrameSize", $FrameSize) EndIf
Did you have problems with the $FrameSize being too big and crashing the program?
I don't recall the exact specifics now, but obviously this allowed me to quickly fix an issue where a crash happened (making my program exit) ... probably due to an illegal, oversize or corrupt ID3 tag entry, which can no longer occur now that I've updated the tag.
Edited by TheSaint, 12 March 2011 - 10:29 AM.
Make sure brain is in gear before opening mouth! Ignoring those who try to divert conversation with irrelevancies. If I put effort into communication, I expect you to read properly & fully, or just not comment. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox
#56
Posted 26 March 2011 - 02:43 PM
Func _GetSynLyrics($hFile,$FrameLen) Local $LengthToRead = $FrameLen, $_head, $LyricsFilename = @ScriptDir & "\" & "SynLyrics.txt", $bReturn $ID3Filenames &= $LyricsFilename & "|" $s_head = FileRead($hFile,6) $s_Encoding = BinaryMid($s_head,1,1) $s_Language = BinaryMid($s_head,2,3) $s_Stamp = BinaryMid($s_head,5,1) $s_Type = BinaryMid($s_head,6,1) $LengthToRead -= 6 $s_Descriptor = '' $Byte = FileRead($hFile,1) $sb_Descriptor = $Byte $LengthToRead -= 1 While $Byte <> "0x00" $s_Descriptor &= BinaryToString($Byte) $Byte = FileRead($hFile,1) $sb_Descriptor &= $Byte $LengthToRead -= 1 WEnd $bLyrics_Bin = FileRead($hFile,$LengthToRead) $SynText=Binary('') $i=1 ;~ Do ;~ $i+=1 ;~ $nByte=BinaryMid($bLyrics_Bin,$i,1) ;~ Until $nByte <> "0x00" While $i<$LengthToRead $SynBin=Binary('') While 1 $nByte=BinaryMid($bLyrics_Bin,$i,1) $i+=1 If $nByte="0x00" Then ExitLoop $SynBin &= $nByte WEnd $SynText&=StringToBinary(Dec(Hex(BinaryMid($bLyrics_Bin,$i,4))),1) $SynText&=BinaryMid(0x7C7C,1,2) $SynText&=$SynBin $SynText&=BinaryMid(0x0A0D,1,2) $i+=4 WEnd $hLyricFile = FileOpen($LyricsFilename, 2) ;Open for write and erase existing FileWrite($hLyricFile,$SynText) FileClose($hLyricFile) ;~ Switch $bText_Encoding ;~ Case 0x00 ;~ $Lyrics_Text = BinaryToString($bLyrics_Text) ;~ Case 0x01 ;~ $Lyrics_Text = BinaryToString($bLyrics_Text,2) ;~ EndSwitch $bReturn = $s_Encoding & $s_Language & $SynText $bReturn &= "|" & $LyricsFilename Return $bReturn EndFunc
call the func in _ReadID3v2
Switch $FrameID Case "APIC" ;Picture (Write to File) $FrameData = _GetAlbumArt($hFile,$FrameSize) Case "USLT" ;Lyrics (Write to File) $FrameData = _GetSongLyrics($hFile,$FrameSize) Case "SYLT" $FrameData = _GetSynLyrics($hFile,$FrameSize) Case Else $FrameData = FileRead($hFile,$FrameSize) EndSwitch
#57
Posted 14 April 2011 - 06:20 PM
How to ask questions the smart way!
Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.
Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.
_FileGetProperty - Retrieve the properties of a file SciTE Toolbar - A toolbar demo for use with the SciTE editorGUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.
GUIToolTip UDF Demo - Demo script to show how to use the GUIToolTip UDF to create and use customized tooltips.
#58
Posted 14 April 2011 - 06:28 PM
I get all kinds of garbage happening with this UDF so don't feel alone. It often tells me I need a different version. That's wrong, I just need a UDF that works. Idoesn't work on any Windows version I've tried it on but most problems are in Vista and Win 7, both 32 bit.This isn't working for me, Windows 7 Professional x86, administrator account. Sometimes it works fine and will change the tags when I write them, but most of the time it is blanking out the tags and making the file unplayable in any media player including VLC. I don't get any errors I just get a file with the tags removed and in one case it left the V2 song title and changed the artist name to the album title.
#59
Posted 15 April 2011 - 02:22 PM
Heaven's knows why APE tags need to be inserted into MP3 files?
I use foobar2000 (also see it's utilities right-click option), MP3Tag and/or Tagscanner to fix issues that arise, plus MP3Val to do a final validation.
Most of the time (i.e. with my own LAME ripped tracks) I don't have issues with the UDF.
Various downloads sometimes have header issues or junk in the files, etc.
EDIT
That's with WinXP though.
Edited by TheSaint, 15 April 2011 - 02:23 PM.
Make sure brain is in gear before opening mouth! Ignoring those who try to divert conversation with irrelevancies. If I put effort into communication, I expect you to read properly & fully, or just not comment. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox
#60
Posted 17 April 2011 - 05:11 PM
Make sure brain is in gear before opening mouth! Ignoring those who try to divert conversation with irrelevancies. If I put effort into communication, I expect you to read properly & fully, or just not comment. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users





