Bash script "Automated TAF to MP3 converter"

Hi @OliKo great script thank you.
But I was not able to resolve my problem (or even if I don’t believe your code).
My output looks like this so the Track name wasn’t transferred:

'1508506646 - Track #10.mp3' '1508506646 - Track #4.mp3' '1508506646 - Track #8.mp3' '1508506646 - Track #1.mp3' '1508506646 - Track #5.mp3' '1508506646 - Track #9.mp3' '1508506646 - Track #2.mp3' '1508506646 - Track #6.mp3' '1508506646 - Track #3.mp3' '1508506646 - Track #7.mp3'

python3 -c "import pkg_resources; [print(d.project_name, d.version) for d in pkg_resources.working_set if 'protobuf' in d.project_name.lower()]"
protobuf 4.21.12
types-protobuf 3.20

The Track names are under https://raw.githubusercontent.com/toniebox-reverse-engineering/tonies-json/release/tonies.json present.

hi it is possible to run the script in a separate container?

Please do not mix ‘file name’ and ‘id3 track name’. If a track name is availale at boxine the is stored in id3tag as “Track Name”. file name is always "<audio-id - Track #.mp3
If you don’t want this behavior, feel free to adapt my script. :slight_smile:

Yes, i do not run it in a container at all. i run it on a separate linux machine. You only need to have access to the teedycloud content dir.

I tried converting my Tonies. A directory was created, but it was empty…

root@NAS:~# sudo bash ./conv.sh -f

Automated TAF to MP3 converter v1.1

./conv.sh: Zeile 54: curl: Kommando nicht gefunden.
Processing file “/srv/dev-disk-by-uuid-f965fa7e-a581-4e86-8005-25986e0e00e7/Docker/volumes/teddycloud_library/_data/by/audioID/1490952835.taf”…
- AUDIO_ID: 1490952835
- PERFOMER: Janosch
- ALBUM: Janosch - Oh, wie schön ist Panama
- TRACK: Oh, wie schön ist Panama
- Loading Cover art: ./conv.sh: Zeile 107: curl: Kommando nicht gefunden.
convert-im6.q16: unable to open image _cover.png': Datei oder Verzeichnis nicht gefunden @ error/blob.c/OpenBlob/2924. convert-im6.q16: no images defined cover.jpeg’ @ error/convert.c/ConvertImageCommand/3229.
rm: das Entfernen von ‘_cover.png’ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
Ok.
- Get tracknames from JSON: Ok.
- Convert TAF to split MP3: ls: Zugriff auf ‘*.opus’ nicht möglich: Datei oder Verzeichnis nicht gefunden
Ok.

This is the output in the shell

EDIT:

I’ve gotten it working now. However, it only works if I create a single file.

When I try to split it, the following error message appears…

  • Convert TAF to split MP3: ls: Zugriff auf ‘*.opus’ nicht möglich: Datei oder Verzeichnis nicht gefunden

Does anyone have any ideas?

You need to install curl, e.g. apt install curl

I’ve figured that out now. I’ve installed Curl.

The only problem I have now is that the following error message appears when splitting stories…

Convert TAF to split MP3: ls: Unable to access ‘*.opus’: File or directory not found

pls see here: Bash script “Automated TAF to MP3 converter” - #10 by OliKo
and the following posts. i think you have the same issue with opus2tonie.
Check tmp dir if taf is splitted to opus files. use absolute path.

Only cover.jpeg and tonies.json are created in the temp folder.