TypeError: 'NoneType' object is not subscriptableĭuring handling of the above exception, another exception occurred:įile "D:\Program_Files\Python\lib\site-packages\tinytag\tinytag.py", line 94, in get Traceback (most recent call last):įile "D:\Program_Files\Python\lib\site-packages\tinytag\tinytag.py", line 311, in _determine_durationįrame_bitrate = ID3.bitrate_by_version_by_layer It works with ffplay, VLC and WMP (and probably all music playing software)įile was downloaded using youtube_dl, not sure if that matters. Now I get that this means the mp3 is invalid, but the weird thing is: I was trying to use (filename), but it errored and said fixed decoding of UTF-16LE ID3v2 Tags, improved overall stability.
#M4a magic tagger mp4
#M4a magic tagger install
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.
#M4a magic tagger code
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