tidekeeper icon indicating copy to clipboard operation
tidekeeper copied to clipboard

[BUG]: Downloads as FLAC but file is .m4a

Open DesertRec opened this issue 6 months ago • 11 comments

Which entry point?

tidekeeper-gui

Tidekeeper version or commit

v2026.5.23.0

Platform

macOS

Steps to reproduce

Download a album

Full output / traceback

.

Anything else?

Thanks for the work. Not sure if it's a bug or by design, but would prefer .flac?

Image Image

DesertRec avatar May 29 '26 03:05 DesertRec

@DesertRec it's not a bug, but it would definetely be easier to get .flac and not .m4a m4a is just a media container for some audio stream like aac, alac or flac etc. look at the bottom of your 1st screenshot and you'll find out your m4a file contains flac audio stream. if your player can't open m4a file, you can use ffmpeg cli utility to unbox m4a container

Regiva avatar May 29 '26 09:05 Regiva

All my music files has extension .flac and prefer that, if they are flac should I then just rename the files?

DesertRec avatar May 29 '26 12:05 DesertRec

Its just how the backend downloader functions currently, I can make it unpack to .flac if needed if that's something you would want.

OpenNerdz avatar May 29 '26 14:05 OpenNerdz

Yes, if it's not to much that would be great, thanks

DesertRec avatar May 29 '26 14:05 DesertRec

Its just how the backend downloader functions currently, I can make it unpack to .flac if needed if that's something you would want.

Perhaps a configurable option in settings, opt-in? I also prefer .flac (using CLI)

ScrewTSW avatar May 30 '26 20:05 ScrewTSW

Fixed in the latest version. There is now an optional setting called Save FLAC as .flac files (in the app under Settings, or in CLI settings). Turn it on if you want .flac files instead of .m4a.

You do not need to rename files yourself — that does not actually change the file type. If the app cannot convert to FLAC (for example if ffmpeg is not installed), it will keep the file as .m4a so the name matches what is inside.

OpenNerdz avatar Jun 02 '26 00:06 OpenNerdz

Hi there,

First of all, thank you for developing and maintaining this project!

I am currently using the command-line interface (CLI), but I am having trouble configuring it to save an entire album in FLAC format. Could you please guide me on how to achieve this?

go85tidals-crypto avatar Jun 04 '26 06:06 go85tidals-crypto

Appreciate the comment

Worth knowing up front: even without the FLAC setting on, lossless downloads usually land as .m4a files. That's still FLAC audio, just wrapped in an M4A container (same quality, different extension). Turning on Save FLAC as .flac files unpacks them to .flac if you want that for your library.

For what you're after (full album from the CLI as .flac), yep that's supported. Just a couple of things to check are enabled first.

  1. Turn on FLAC files (off by default): run tidekeeper, open Settings, and set Save FLAC as .flac files to yes. One-time thing.

  2. Grab the album with your link, e.g.:

    tidekeeper -q HiFi -l "https://tidal.com/browse/album/YOUR_ALBUM_ID"
    

    Use your actual album URL there. -q HiFi is the lossless FLAC quality; Max works too if your plan has it.

Your TIDAL sub needs to include lossless (HiFi+), otherwise tracks won't come down as FLAC.

If you installed with our install.sh script, it should have pulled in ffmpeg for you. Quick check: tidekeeper --doctor (look for ffmpeg OK). If you only did pip install, you may need to install ffmpeg yourself.

If you try that and something's still off, just drop the command you used and what you got back and we'll sort it.

openclawed-007 avatar Jun 04 '26 18:06 openclawed-007

The album is still saved in M4A format. I checked my Tidal plan. Plan Family 110M+ lossless tracks, HiRes FLAC, and Dolby Atmos Ad-free, offline listening Clean playlists and curated content for kids Each member has an individual account.

Settings {"albumFolderFormat": "{ArtistName}/{Flag} {AlbumTitle} [{AlbumID}] [{AlbumYear}]", "apiKeyIndex": 4, "audioQuality": "MAX", "audioQualityPriority": [], "checkExist": true, "downloadDelay": true, "downloadPath": "/mnt", "downloadVideos": false, "includeEP": true, "language": 0, "lyricFile": false, "multiThread": false, "playlistFolderFormat": "Playlist/{PlaylistName} [{PlaylistUUID}]", "requestIntervalSeconds": 1.0, "saveAlbumInfo": false, "saveAsFlac": false, "saveCovers": true, "showProgress": true, "showTrackInfo": true, "trackFileFormat": "{TrackNumber} - {ArtistName} - {TrackTitle}{ExplicitFlag}", "usePlaylistFolder": true, "videoFileFormat": "{VideoNumber} - {ArtistName} - {VideoTitle}{ExplicitFlag}", "videoQuality": "P360"}

onizuka@raspberrypi:~ $ tidekeeper -q max -l https://tidal.com/album/522537349/u [INFO] AccessToken good for 3 hours, 33 minutes. [INFO] Download path:/mnt +----------------+---------------------+ | ALBUM-PROPERTY | VALUE | +----------------+---------------------+ | Title | Grand Serpent Rising | | ID | 522537349 | | Track Number | 13 | | Video Number | 0 | | Release Date | 2026-05-22 | | Version | None | | Explicit | False | +----------------+---------------------+ 100%|▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓| 629397/629397 B +----------------+---------------------+ | TRACK-PROPERTY | VALUE | +----------------+---------------------+ | Title | Tridentium | | ID | 522537361 | | Album | Grand Serpent Rising | | Version | None | | Explicit | False | | Max-Q | LOSESS | | Get-Q | HI_RES_LOSSLESS | | Get-Codec | flac | +----------------+---------------------+ 100%|▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓| 49912102/49912102 B [SUCCESS] Tridentium +----------------+---------------------+ | TRACK-PROPERTY | VALUE | +----------------+---------------------+ | Title | Ascent | | ID | 522537363 | | Album | Grand Serpent Rising | | Version | None | | Explicit | False | | Max-Q | LOSESS | | Get-Q | HI_RES_LOSSLESS | | Get-Codec | flac | +----------------+---------------------+ 100%|▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓| 71656644/71656644 B [SUCCESS] Ascent +----------------+-----------------------+ | TRACK-PROPERTY | VALUE | +----------------+-----------------------+ | Title | As Seen in the Unseen | | ID | 522537364 | | Album | Grand Serpent Rising | | Version | None | | Explicit | False | | Max-Q | LOSESS | | Get-Q | HI_RES_LOSSLESS | | Get-Codec | flac | +----------------+-----------------------+ 100%|▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓| 91721725/91721725 B [SUCCESS] As Seen in the Unseen +----------------+---------------------+ | TRACK-PROPERTY | VALUE | +----------------+---------------------+ | Title | The Qryptfarer | | ID | 522537366 | | Album | Grand Serpent Rising | | Version | None | | Explicit | False | | Max-Q | LOSESS | | Get-Q | HI_RES_LOSSLESS | | Get-Codec | flac | +----------------+---------------------+ 100%|▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓| 58727546/58727546 B [SUCCESS] The Qryptfarer +----------------+---------------------+ | TRACK-PROPERTY | VALUE | +----------------+---------------------+ | Title | Ulvgjeld & Blodsodel | | ID | 522537367 | | Album | Grand Serpent Rising | | Version | None | | Explicit | False | | Max-Q | LOSESS | | Get-Q | HI_RES_LOSSLESS | | Get-Codec | flac | +----------------+---------------------+ 100%|▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓| 73264632/73264632 B [SUCCESS] Ulvgjeld & Blodsodel +----------------+-----------------------------------+ | TRACK-PROPERTY | VALUE | +----------------+-----------------------------------+ | Title | Repository of Divine Transmutation | | ID | 522537368 | | Album | Grand Serpent Rising | | Version | None | | Explicit | False | | Max-Q | LOSSLESS | | Get-Q | HI_RES_LOSSLESS | | Get-Codec | flac | +----------------+-----------------------------------+ 100%|▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓| 85592849/85592849 B [SUCCESS] Repository of Divine Transmutation +----------------+------------------------+ | TRACK-PROPERTY | VALUE | +----------------+------------------------+ | Title | Slik Minnes en Alkymist | | ID | 522537369 | | Album | Grand Serpent Rising | | Version | None | | Explicit | False | | Max-Q | LOSESS | | Get-Q | HI_RES_LOSSLESS | | Get-Codec | flac | +----------------+------------------------+ 100%|▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓| 74695389/74695389 B [SUCCESS] Slik Minnes en Alkymist +----------------+-----------------------+ | TRACK-PROPERTY | VALUE | +----------------+-----------------------+ | Title | Phantom of the Nemesis | | ID | 522537370 | | Album | Grand Serpent Rising | | Version | None | | Explicit | False | | Max-Q | LOSESS | | Get-Q | HI_RES_LOSSLESS | | Get-Codec | flac | +----------------+-----------------------+ 100%|▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓| 67609111/67609111 B [SUCCESS] Phantom of the Nemesis +----------------+---------------------+ | TRACK-PROPERTY | VALUE | +----------------+---------------------+ | Title | The Exonerated | | ID | 522537371 | | Album | Grand Serpent Rising | | Version | None | | Explicit | False | | Max-Q | LOSESS | | Get-Q | HI_RES_LOSSLESS | | Get-Codec | flac | +----------------+---------------------+ 100%|▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓| 77278172/77278172 B [SUCCESS] The Exonerated +----------------+---------------------+ | TRACK-PROPERTY | VALUE | +----------------+---------------------+ | Title | Recognizant | | ID | 522537372 | | Album | Grand Serpent Rising | | Version | None | | Explicit | False | | Max-Q | LOSESS | | Get-Q | HI_RES_LOSSLESS | | Get-Codec | flac | +----------------+---------------------+ 100%|▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓| 76307156/76307156 B [SUCCESS] Recognizant +----------------+---------------------------------+ | TRACK-PROPERTY | VALUE | +----------------+---------------------------------+ | Title | At the Precipice of Convergence | | ID | 522537373 | | Album | Grand Serpent Rising | | Version | None | | Explicit | False | | Max-Q | LOSESS | | Get-Q | HI_RES_LOSSLESS | | Get-Codec | flac | +----------------+---------------------------------+ 100%|▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓| 57863574/57863574 B [SUCCESS] At the Precipice of Convergence +----------------+-----------------------------------+ | TRACK-PROPERTY | VALUE | +----------------+-----------------------------------+ | Title | Shadows of a Thousand Perceptions | | ID | 522537375 | | Album | Grand Serpent Rising | | Version | None | | Explicit | False | | Max-Q | LOSESS | | Get-Q | HI_RES_LOSSLESS | | Get-Codec | flac | +----------------+-----------------------------------+ 100%|▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓| 69966312/69966312 B [SUCCESS] Shadows of a Thousand Perceptions +----------------+---------------------+ | TRACK-PROPERTY | VALUE | +----------------+---------------------+ | Title | Gjǫll | | ID | 522537377 | | Album | Grand Serpent Rising | | Version | None | | Explicit | False | | Max-Q | LOSESS | | Get-Q | HI_RES_LOSSLESS | | Get-Codec | flac | +----------------+---------------------+ 100%|▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓| 50638071/50638071 B

onizuka@raspberrypi:~ $ tidal-dl --doctor Tidekeeper doctor [SUCCESS] [OK] Download path - /mnt [SUCCESS] [OK] TIDAL client - Tidekeeper OAuth [SUCCESS] [OK] ffmpeg - /usr/bin/ffmpeg [SUCCESS] [OK] Token - valid for country LV [SUCCESS] Doctor finished.

I feel like I'm missing something :(

go85tidals-crypto avatar Jun 05 '26 03:06 go85tidals-crypto

Your downloads look good. The tracks are coming down as lossless FLAC audio, they are just saved in .m4a containers by default.

In the settings you pasted, "saveAsFlac" is still false. Turn on Save FLAC as .flac files in CLI Options (menu option 6), or set "saveAsFlac": true in ~/.tidal-dl.json, then download the album again.

Since checkExist is on, delete the existing .m4a files first or Tidekeeper may skip those tracks. Your ffmpeg check already looks fine.

OpenNerdz avatar Jun 05 '26 16:06 OpenNerdz

FYI I was getting this warning WARNING:root:saveAsFlac is enabled but ffmpeg was not found; saving container as XXX.m4a even with the flac setting on and checking that the ffmpeg was installed. I copy my songs to a sony nw a306 walkman and the player was not able to reproduce them. I had run a script manually to convert them:

for f in *.m4a; do
  ffmpeg -i "$f" -c copy "${f%.m4a}.flac" && rm "$f"
done

This will delete the m4a file and keep only the flac file. After that my walkman was able to play the songs.

dcortes92 avatar Jun 05 '26 17:06 dcortes92