Read & Write id3v2 and riff tags in different encodings
Hi,
we need to read id3v2 (id3v2.3 & id3v2.4) and riff tags from various tracks. There should be a setting in the system where the user can define in which encoding their tags are.
- ID3v2 encoding (Options: ISO-8859-1(latin-1), UTF16, UTF-8)
- RIFF encoding: (Options: ISO-8859-1(latin-1), UTF-8)
We are in a linux environment without an xserver so we want to use the kid3-cli. We are calling it from node.js.
My question is how can I define the encoding used by kid3-cli when reading id3v2 and riff tags? There seam to be settings for the kid3 GUI - are they also valid for the console client?
Can I set the ENV variable "set KID3_CONFIG_FILE=kid3.ini"
and configure in the file the setting: TextEncoding=0
Will that work?
The other issue is that there is no direct communication possible - at least as I know - so we need to parse the unstructured output of the kid3-cli (which also means that the console encoding is also manipulating the results):
./kid3-cli -c "select .wav" -c "get all 23" /var/das/music/m7/wav-copy-tag/test/ File: WAV 44100 Hz 2 Channels 6:49 Name: Al Stewart - Year of the Cat (1976) - 09. Year of the Cat.wav Tag 2: ID3v2.3.0 Title Year of the Cat Artist Al Stewart Album Year of the Cat - ÄÖÜ?!"$%§&äöü Date 1976 Track Number 9 Genre ÄÖÜ?!"$%§&äöü#+-.,{][} Album Artist Al Stewart Publisher Holodriö Tag 3: RIFF INFO Title Year of the Cat Artist Al Stewart Album Year of the Cat - AOU?!"$%?&aou Date 1976 Track Number 9 Genre AOU?!"$%?&aou#+*-.,{][}
Is there any possibility to get an json output in the desired encoding? like in ffprobe: ffprobe -v quiet -print_format json -show_format -show_streams -i test.flac
Do you probably know other libs which would fit better for my requirements?
Thanks a lot for your help greetings max
Imported from SourceForge, author: maxbuchner