Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Problems with metadata of high-quality FLAC files downloaded from Tidal via the downloader #232

Closed
Artemyx-DataScientist opened this issue Nov 13, 2024 · 12 comments · Fixed by #233
Assignees
Labels
bug Something isn't working

Comments

@Artemyx-DataScientist
Copy link

Artemyx-DataScientist commented Nov 13, 2024

What happened?

Description: When downloading high-quality FLAC files from Tidal through downloader, there are problems with playback and metadata management in some audio applications. Despite the fact that the files must be of high quality, they are incorrectly processed by certain programs.

Observed problems:

Problems with playback:

foobar2000: Refuses to play some FLAC files, indicating that the file is corrupted.
Roon: Cannot import some tracks into the audio library, citing corruption errors.
VLC Media Player: Plays affected FLAC files without problems, displaying metadata correctly.
Metadata processing:

MediaInfo: Correctly displays metadata for problematic FLAC files.
Mp3tag: Does not display metadata for these files. Attempts to clear or edit tags result in errors.
dBpoweramp: Cannot convert affected FLAC files, referring to corrupted metadata.
The workaround:

Converting problematic FLAC files to WAV via Adobe Audition solves all problems. After conversion, the metadata is saved and the files are played and imported correctly in all applications.
However, manually converting each track through Adobe Audition is inconvenient and time-consuming when working with large libraries.
Steps for playback:

Use the downloader to download high-quality FLAC tracks from Tidal (for example, try download hi res flac album The last of Lucy - Godform (https://tidal.com/browse/album/346576029)).
Try to play the downloaded FLAC files in foobar2000 or import them into Roon.
Pay attention to the error messages indicating that the file is corrupted.
Open the same files in VLC to confirm that they are playing correctly with the metadata.
Use MediaInfo to check for metadata.
Try editing the metadata using Mp3tag or converting the file via dBpoweramp and note the errors that occur.
Convert the problematic FLAC file to WAV using Adobe Audition and make sure that the file works correctly in all applications after conversion.
Expected behavior: High-quality FLAC files uploaded via the Tidal downloader should be fully compatible with all standard metadata playback and management applications. Metadata must be correctly embedded and readable by tools such as Mp3tag and dBpoweramp, without causing corruption errors.

Actual behavior: Some FLAC files contain metadata issues that cause them not to be reproduced or cannot be processed correctly in certain applications. Only after converting to WAV via Adobe Audition do these problems disappear, which indicates the presence of corrupted or incorrectly formatted metadata in the original FLAC files.
image

Version App

v.0.20.1

What operating system are you seeing the problem on?

Windows

Relevant log output

No response

Your settings

{
    "skip_existing": true,
    "lyrics_embed": true,
    "lyrics_file": true,
    "video_download": true,
    "download_delay": true,
    "download_base_path": "D:\\Music",
    "quality_audio": "HI_RES_LOSSLESS",
    "quality_video": "1080",
    "format_album": "Albums/{album_artist} - {album_title}{album_explicit}/{album_track_num}. {artist_name} - {track_title}",
    "format_playlist": "Playlists/{playlist_name}/{artist_name} - {track_title}",
    "format_mix": "Mix/{mix_name}/{artist_name} - {track_title}",
    "format_track": "Tracks/{artist_name} - {track_title}{track_explicit}",
    "format_video": "Videos/{artist_name} - {track_title}{track_explicit}",
    "video_convert_mp4": true,
    "path_binary_ffmpeg": "D:\\Dwnld\\ffmpeg-2024-11-11-git-96d45c3b21-full_build\\ffmpeg-2024-11-11-git-96d45c3b21-full_build\\bin\\ffmpeg.exe",
    "metadata_cover_dimension": "320",
    "metadata_cover_embed": true,
    "cover_album_file": true,
    "extract_flac": true,
    "downloads_simultaneous_per_track_max": 20
}
@Artemyx-DataScientist Artemyx-DataScientist added the bug Something isn't working label Nov 13, 2024
@exislow
Copy link
Owner

exislow commented Nov 13, 2024

Thank you for this comprehensive bug report. Could you verify, if the files are also detected as corrupt by some tools, if you download the HI_RES_LOSSLESS audio files with TIDAL-DL-NG v0.15.6 (https://github.com/exislow/tidal-dl-ng/releases/tag/v0.15.6) instead of with v0.20.1

@F1zzyD
Copy link

F1zzyD commented Nov 14, 2024

Thank you for this comprehensive bug report. Could you verify, if the files are also detected as corrupt by some tools, if you download the HI_RES_LOSSLESS audio files with TIDAL-DL-NG v0.15.6 (https://github.com/exislow/tidal-dl-ng/releases/tag/v0.15.6) instead of with v0.20.1

I tried using v0.15.6 and the meta data downloads fine, however it no longer downloads the highest quality version. Using v0.20.1 also does not download the highest quality version and ignores metadata.

@Jio0oiJ
Copy link

Jio0oiJ commented Nov 14, 2024

same situation by my side.
can not import to roon and can not be played by UAPP on mobile phone also.
only appeared on hires files.

@SteadyStatus21
Copy link

Hopefully I can help here, using flac CLI this is the output I get for a single song, happens to every track downloaded sadly:

flac 1.3.0, Copyright (C) 2000-2009, 2011-2013  Josh Coalson & Xiph.Org Foundation
flac comes with ABSOLUTELY NO WARRANTY.  This is free software, and you are
welcome to redistribute it under certain conditions.  Type `flac' for details.

50 Cent, Justin Timberlake, Timbaland - Ayo Technology(Explicit).flac: *** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC

The input file is either not a FLAC file or is corrupted.  If you are
convinced it is a FLAC file, you can rerun the same command and add the
-F parameter to try and recover as much as possible from the file.
*** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC
*** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC
*** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC
*** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC
*** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC
*** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC
** REMOVED 135 REPEATING LINES **
*** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC
*** Got error code 0:FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC


50 Cent, Justin Timberlake, Timbaland - Ayo Technology(Explicit).flac: ERROR while decoding metadata
                                                                       state = FLAC__STREAM_DECODER_END_OF_STREAM
Press any key to continue . . .

@exislow
Copy link
Owner

exislow commented Nov 14, 2024

@ALL: Please be as precise as possible if you like to help. This include posting exact links to media sources and also not only execution results but also the exact command you have executed. This makes it a lot easier for me.

@ratavaz
Copy link

ratavaz commented Nov 14, 2024

Some additional information.
I had the same problems when downloading some recent tracks for the High Resolution version, but I've also noted that the same track in Low resolution gives an error in download (invalid literal for int() with base 10: '31a03da8435a77cd06bd314ea2573a00').

As an example the track Walk the Earth by Slot Machine
HI_RES_LOSSLESS https://listen.tidal.com/album/397080938/track/397080939
LOW https://listen.tidal.com/album/397727895/track/397727897

Couldn't test the previous version but an old installation of Yaronzz Tidal-GUI downloads both tracks without any problem.

Thanks for the great work, by the way.

@Artemyx-DataScientist
Copy link
Author

On ver 0.15.6 is no such problem. Tested by example https://tidal.com/browse/album/154294394?u

image

exislow added a commit that referenced this issue Nov 14, 2024
…f-high-quality-flac-files-downloaded-from-tidal-via-the-downloader

🛠️ Workaround for wrong extension detection of `tidalapi`. Fixes #232
@exislow
Copy link
Owner

exislow commented Nov 14, 2024

File extension detection is wrong in tidalapi == v0.8.0/1. I have applied a hot fix for now released it with v0.20.2

@ratavaz
Copy link

ratavaz commented Nov 14, 2024

Hi exislow,
I can confirm that the HiRes track gets downloaded correctly now, but the Low res one still gives an error only with the new version the error has changed

As an example the track "Walk the Earth" by "Slot Machine"
HI_RES_LOSSLESS https://listen.tidal.com/album/397080938/track/397080939 - Now OK
LOW https://listen.tidal.com/album/397727895/track/397727897

  • Previous error: invalid literal for int() with base 10: '31a03da8435a77cd06bd314ea2573a00'
  • New version error: 'NoneType' object has no attribute 'first_url'

exislow added a commit that referenced this issue Nov 14, 2024
Fixed GUI crash on trailing / leading spaces in search terms.
@exislow
Copy link
Owner

exislow commented Nov 14, 2024

You are right and sorry for not noticing your comment in the first place. I have fixed it with a9ff6dc

See https://github.com/exislow/tidal-dl-ng/releases/tag/v0.20.3

@ratavaz
Copy link

ratavaz commented Nov 14, 2024

Perfectly working!

Thanks for the great job!!!

@Artemyx-DataScientist
Copy link
Author

Artemyx-DataScientist commented Nov 16, 2024

Спаси (тебя) Бог (=Спасибо)! =Thank You!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants