Comments (4)
Hmmm... I played around with it for a bit this evening and so far haven't been able to directly reproduce your issue. I do however notice neither windows nor Foobar2000 seem to recognize ID3v2 tags placed at the end of the file with node-taglib-sharp
. It's worth noting as well that Foobar2000 seems to cache tags when a file is added to a playlist. I wasn't able to get the scenario you had where Windows doesn't show the picture but Foobar2000 does, but this might be because Foobar2000 needed to reload the tags.
node-taglib-sharp
by default creates new ID3v2 tags at the beginning of the file, but if a file already has ID3v2 tag at the end of the file, it will write any changes (via dest.tag
) to that tag. As a workaround, you could try removing and re-adding the tag so that it is added at the end of the file.
const file = taglib.File.createFromPath("pathtofile");
const cover = taglib.Picture.fromPath("pathtopicture");
const oldId3v2 = file.getTag(taglib.TagTypes.Id3v2, false);
file.removeTags(0xFFFFFFFF);
const newId3v2 = file.getTag(taglib.TagTypes.Id3v2, true);
oldId3v2.copyTo(newId3v2, true);
// make changes via file.tag
file.save();
file.dispose();
Inspecting the file I tested with, I see the image is being added to the tag and node-taglib-sharp
can see it. However, the fact neither foobar2000, vlc, nor windows can see the tag means something is wrong.
from node-taglib-sharp.
Thanks for your help, I accidentally got two samples today, one cover displays properly and the other doesn't.
Compared the content of two files, I notice that the tag type of two samples are different, and 'id3v2.3' can display properly,
Thus, I suppose that explorer.exe can't read newer tag type.
Thanks again for your help, have a nice day.
from node-taglib-sharp.
taglib.Id3v2Settings.forceDefaultVersion=true;
taglib.Id3v2Settings.defaultVersion=3;
After forcing the version of id3v2, The problem has been solved.
from node-taglib-sharp.
Hi @RogerChen2005 yes, ID3v2.4 still isn't supported in nearly as many places as ID3v2.3 is. Glad you found a workaround. The investigation for your issue also uncovered a related issue with ID3v2 tags at the end of a file. I'll track that in a separate issue, but thanks for helping bring it to my attention.
from node-taglib-sharp.
Related Issues (20)
- Version 5.2.3 breaks reading of mp3 picture.data for some files HOT 4
- bitrate will be 0 on some files HOT 2
- Error setting tags for m4a files HOT 26
- Remove Ogg granule position safe integer check and make granule position a number HOT 1
- Support for M4A HOT 7
- use in browser HOT 5
- Matroska tag docs didn't get generated HOT 1
- Question - error setting title HOT 2
- Question - Setting the text information frames in a id3v2TextInformationFrame HOT 2
- Id3v2FrameIdentifier doc and possible bug ? HOT 4
- Named export not found HOT 4
- ID3v2 tags at end of file not showing up in players
- Throwing error: `Argument null: ${name} was not provided` HOT 10
- 'Cannot set property ByteVector' error on load of module HOT 3
- id3v2 frameId RGAD causes failure to read tags HOT 4
- Add Legacy ReplayGain Frame Support
- Why Tag class has no accessor for 'artist' ? HOT 1
- poor performance when saving picture HOT 3
- wrong duration of `.mp3` and `.wav` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-taglib-sharp.