robertmuth / apetag Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Some combinations of tag or key lengths can cause Apetag to not find an ape tag. This doesn't seem to be specific to Apetag (Taglib exhibits this exact same problem; Mutagen seems to be immune). Attempting to write over such a tag with Apetag causes the original tag to be partially overwritten by the new tag. Apetag can't find the tag to erase it.
How to reproduce: Write a tag with two keys of combined length 11 bytes (e.g. artist + album, artist + title both trigger this problem) and between them distribute 38 bytes. Reading this tag will result in apetag not finding the tag (Taglib improperly parses it; part of the magic EX\xD0 is parsed as the title). Mutagen (puddletag) reads and writes this combination. It also reads perfectly the tag written by Apetag.
$ apetag -i XXXX -m overwrite -p shg="asdasdwdfdssd" -p fidowfky="sergdfgsr sdfgrtseawtertt"
$ apetag -i XXXX
No valid APE tag found
Edit: After further trial and error, this can be reliably reproduced with any combination of key value lengths across two tags only with a total length of 49 bytes.
As subject line says: the apetag tool adds the tag after
the id3v1 tag in a mp3 file, which is the opposite of what
the spec says.
Hi Robert,
I've got a question about writing binary text data to tags.
In short, I'd like to be able to add a custom APE tag, and have the dates stored in HEX format.
For example, this is what I'm needing.
52 65 73 74 72 69 63 74 69 6F 6E 73 00 CF AF 00 00 D1 AF 00 00 00 00 01 00 00 00 00 7F 51 01 00 01 00 00 00 00 7F 51 01 00 01 00 00 00 00 7F 51 01 00 01 00 00 00 00 7F 51 01 00 01 00 00 00 00 7F 51 01 00 01 00 00 00 00 7F 51 01 00 01 00 00 00 00 7F 51 01 00 01 00 00 00 00 00 00 00
The tag is: Restrictions
The data after it however is the rest of the problem.
They are Delphi values of the days from 1899 DEC 30
https://www.delphibasics.co.uk/RTL.php?Name=TDateTime
00 CF AF 00
CFAF is UNIT16 value of 45007
Date: 20230322
00 D1 AF 00
D1AF is UNIT16 value of 45009
Date: 20230324
With these 2 date examples I'm sure I can figure out the rest of the data structure for the full set of tags I'm needing, but how do I add HEX values to a tag?
Thanks,
Steve
Previously one could simply apetag -i $inputfile -file $outputfile
however this flag is no longer available.
The help output seems to ommit any method to write the apetag to disk, but is there still a method to do this?
We are currently pinning to the last known version to work which is 55f3d7a51946787df401573fc92698ed88a2cdee
The full error message is below:
g++ -Wall -Werror -Wextra -pedantic -std=c++0x -O3 -g -c -o basic.o basic.C
In function ‘std::string StringHex(UINT32, UINT32)’,
inlined from ‘std::string ptrstr(const VOID*)’ at basic.H:107:74,
inlined from ‘VOID DefaultTrace()’ at basic.C:182:41:
basic.C:361:15: error: ‘void* __builtin_memset(void*, int, long unsigned int)’ forming offset [64, 4294967294] is out of the bounds [0, 64] of object ‘buffer’ with type ‘CHAR [64]’ {aka ‘char [64]’} [-Werror=array-bounds]
361 | buffer[i] = '0';
| ~~~~~~~~~~^~~~~
basic.C: In function ‘VOID DefaultTrace()’:
basic.C:341:8: note: ‘buffer’ declared here
341 | CHAR buffer[64];
| ^~~~~~
cc1plus: all warnings being treated as errors
make: *** [: basic.o] Error 1
*** Failure: Exit code 2 ***
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.