
added appveyor windows test CI (thanks to scivision). added support for calling TinyTag.get with pathlib.Path (thanks to scivision). using setup.cfg instead of setup.py (thanks to scivision).
fixed wav files not correctly reporting the number of channels #61. Improved stability when reading corrupted mp3 files. Improved text decoding for many malformed files. added option to ignore encoding errors ignore_errors #73. made str deterministic and use json as output format. always cast mp3 bitrates to int, so that CBR and VBR output behaves the sam. implemented support for binary paths #72. fixed opus duration being wrong for files with lower sample rate #81. detecting file types based on their magic header bytes, #85. Added automatic detection for certain MP4 file headers. fixed package install being reported as UNKNOWN for some python/pip variations #90 (thanks to russpoutine). fixed data type to always return str for disc, disc_total, track, track_total #97 (thanks to kostalski). Tag.track_total # total number of tracks as stringĪdditionally you can also get cover images from ID3 tags: tag = TinyTag.get('/some/music.mp3', image=True) Tag.duration # duration of the song in seconds Tag.disc_total # the total number of discs Tag.audio_offset # number of bytes before audio data begins List of possible attributes you can get with TinyTag: tag.album # album as string
> Ĭheck python -m tinytag -help for all CLI options, for example other output formats` Print('It is %f seconds long.' % tag.duration)Īlternatively you can use tinytag directly on the command line: $ python -m tinytag -format csv /some/music.mp3 Print('This track is by %s.' % tag.artist) It can determine track number, total tracks, title, artist, album, year, duration and more.
Tinytag only provides the minimum needed for reading MP3, OGG, OPUS, MP4, M4A, FLAC, WMA and Wave meta-data. Just a few hundred lines of code (just include it in your project!).Read tags, length and cover images of audio files.Tinytag is a library for reading music meta data of MP3, OGG, OPUS, MP4, M4A, FLAC, WMA and Wave files with python