currently im working on a script in Python to read and edit ID3 tags in audio files. I'm currently using https://github.com/supermihi/pytaglib which is based on http://taglib.org/ but this library doesn't support dsf Files. Is there any library for Python or a commandline based tool to work with dsf files? A alternative would be to write and read the tags directly from the file. Byte 20-28 should be the Pointer where the ID3 Tags are stored. Is there any documentation how the ID3v2 Tags are stored in binary data?
Asked
Active
Viewed 834 times
1 Answers
1
DSD files are ID3V2 compliant. I did some digging and found this Python library mutagen (https://mutagen.readthedocs.io/en/latest/index.html) It supports ID3v2 tag reading and editing. In order to decipher the output of metadata you should have this website opened(http://id3.org/id3v2.3.0). Here is a sample script to help bring it together:
# !/usr/bin/python
# -*- coding: utf-8 -*-
import mutagen
x = mutagen.File("/Volumes/music/emilie-claire_barlow/seule_ce_soir_2ch64fs_dsd-dsf_2_8224_mhz/01_quand_le_soleil_dit_bonjour_aux_montagnes_2ch64.dsf")
if 'TDRC' in x:
print('Year: {}'.format(x['TDRC']))
print('Track Number: {}'.format(x['TRCK']))
print('Title/songname/content description: {}'.format(x['TIT2']))
print('Content type(genre): {}'.format(x['TCON']))
if 'TXXX:DURATION' in x:
print('Duration: {}'.format(x['TXXX:DURATION']))
print('Lead performer(s)/Soloist(s): {}'.format(x['TPE1']))
print('Band/orchestra/accompaniment: {}'.format(x['TPE2']))
print('Album/Movie/Show title: {}'.format(x['TALB']))
if 'TCOM' in x:
print('Composer: {}'.format(x['TCOM']))

mmv_sat
- 458
- 8
- 15