Comments (7)
Hi Egbert,
All the resources on which tinytag are based are linked in the source code, you can find most specifications of the formats next to the functions/classes that implement their parsers.
What kind of audio data are you dealing with? TinyTag makes it seems as if all meta-data was the same, but actually the formats of the meta-data differs enormously between file formats.
Also, can you please provide some sample data so I can play around with it if I find the time?
from tinytag.
I understand that. The most recent example was using FLAC audio, but I do have several occasions of the same situation in MP3. I'm not sure if all file formats support the 'disc number' tag, but it would be great to extract this data when it's available.
Due to copyright issues I can't share the media file in question, but it shouldn't be a problem to forge a sample. I'll look into it shortly.
I'll also have a look at the documentation referenced in the source code to see if I get anywhere with it.
from tinytag.
I found the info in the docs in the source code and did an initial attempt to parse the data in: b004715
I need to test if it works correctly, but I need to gather samples for all supported formats first. It seems that disc number is supported in WMA (WM/PartOfSet), OGG (not officially but de facto as DISCNUMBER) and ID3v2 (as TPOS). That leaves it unavailable in ID3v1 but I guess that's not a big deal. I'll report back when I verified the behavior.
Additionally, I encountered a bug in the WMA implementation: the mapping of AlbumArtist was to album, rather than to artist. I fixed that while I was at it.
from tinytag.
I put together some short samples that I found randomly on the internet of WMA, OGG, FLAC and MP3. I used a program called Mp3tag to add track numbers and disc numbers to all of them, and used these to test it. Some bugs remained, which I fixed in commit 26f8cd9 - this one reads the disc number in all of them. I moved some code around to parse the track number / total number of tracks as the same system is used for disc number, and it's also used in all formats, so I added this to _set_field() directly. In the event that the fieldname is either disc or track, it is optionally split on the '/' sign.
The samples I used are available here, for the time being:
http://www.pointpro.nl/samples.zip
from tinytag.
Hey Egbert,
Thanks for the patch, it looks very good, you even took the time to properly refactor everything, nice :)
Before I release a new version with your changes, I will create new test samples from the samples you gave me; I will have to reduce their size before I can check them in.
Anyway, thank you very much for helping, I appreciate it!
from tinytag.
Hey Egbert, I tested it and released a new version 0.11.0 on pypi.
Thanks again for the help :)
from tinytag.
Great, thanks!
from tinytag.
Related Issues (20)
- [BUG] TinyTag cannot properly read metadata of two folders HOT 3
- Feature Request: Adding Song Titles HOT 2
- [BUG] AIFF text should be treated as UTF-8 HOT 2
- [BUG] Incorrect bitrate and duration for VBR mp3s HOT 5
- [BUG] UnicodeDecodeError on valid MP3 file
- Make use of code linting HOT 1
- How to handle filebuffer instead of filenames
- [BUG] Some mp3 files report 1/2 of actual duration HOT 2
- Some MP3‘s genre cannot be read correctly since v1.8.0
- [Question] - detect image encoding / format HOT 1
- tag artist, quando adicionado mais de um artista a string fica mal formatada. HOT 1
- [BUG] struct.error: unpack requires a buffer of 4 bytes HOT 8
- [BUG] Parsing mp3 file w/ valid TDRC tag does not populate year HOT 4
- Replace deprecated aifc module HOT 3
- [BUG] TDRC tag not captured as "year" HOT 2
- [BUG] Can't read `extra` tags from .m4a files HOT 1
- Expose a list of supported file extensions HOT 4
- Fail to read track_total, but it is ok in foobar
- asyncio interfaces HOT 3
- [BUG] Incompatibility with Python-pip HOT 2
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 tinytag.