ebb-earl-co / tidal-wave

Waving at the TIDAL music service
Apache License 2.0
38 stars 2 forks source link

When I Check The Downloaded Tracks Using This Program #60

Closed Rajeshsahoo12 closed 7 months ago

Rajeshsahoo12 commented 7 months ago

Hi,

I used this command tidal-wave https://tidal.com/browse/track/330931239 --audio-format hires to download the tracks in hi-res, as the track is availabe from tidal in 24bit / 96 khz. And it got download fine.

image

But when I check the downloaded file in spectrum analyzer it shows nothing above 20 khz

01 - Husn  HiRes flac

& when I check it with tool from this website https://losslessaudiochecker.com/ it shows the file is upsampled

image

Any views on this

Rajeshsahoo12 commented 7 months ago

& when I check it with tool from this website https://losslessaudiochecker.com/ it shows the file is upsampled

As per this checking tool, it should show clean instead of upsampled. If the file is proper 24 bit / 96 khz as per this tool.

ebb-earl-co commented 7 months ago

@Rajeshsahoo12 I don't have experience with either of the tools that you have mentioned here, unfortunately. When I downloaded the Lossless Audio Checker tool you link to, it doesn't seem to be GNU/Linux friendly:

c@darter-pro:~/projects/tidal-wave$ ~/tools/LAC '/home/c/Music/Anuv Jain/Husn [330931238] [2023]/01 - Husn [HiRes].flac'
Lossless Audio Checker 2.0.5
Copyright (c) 2012-2016 Julien Lacroix & Yann Prime
http://losslessaudiochecker.com
==================================================
File:   /home/c/Music/Anuv Jain/Husn [330931238] [2023]/01 - Husn [HiRes].flac
Result: WAVE header RIFF chunk: bad ID

Separately, I have no knowledge of how audio spectra and frequencies are calibrated or dissected: I only know to trust FFmpeg: if its ffprobe tool tells me that a track is 24-bit, 96 kHz, then I trust it :man_shrugging:

Input #0, flac, from '/home/c/Music/Anuv Jain/Husn [330931238] [2023]/01 - Husn [HiRes].flac':
  Metadata:
    ALBUM           : Husn
    album_artist    : Anuv Jain
    REPLAYGAIN_ALBUM_PEAK: 0.997684
    REPLAYGAIN_ALBUM_GAIN: -6.88
    ARTIST          : Anuv Jain
    ARTISTS         : Anuv Jain
    BARCODE         : 00602458927443
    COMMENT         : http://www.tidal.com/track/330931239
    COPYRIGHT       : ℗ 2023 Anuv Jain
    DATE            : 2023-12-01
    ISRC            : INUM72303081
    TITLE           : Husn
    REPLAYGAIN_TRACK_PEAK: 0.997684
    REPLAYGAIN_TRACK_GAIN: -6.88
    ENGINEER        : Angad Bahra
    PRODUCER        : Anuv Jain;Angad Bahra;Puna
    MIXER           : Angad Bahra
    COMPOSER        : Anuv Jain
    LYRICS          : [00:13.65] देखो-देखो, कैसी बातें यहाँ की, हैं साथ पर हैं साथ ना भी
                    : [00:20.08] क्या इतनी आसान हैं?
                    : [00:23.57] 
                    : [00:26.37] देखो-देखो, जैसे मेरे इरादे, वैसे कहाँ तेरे यहाँ थे
                    : [00:32.64] हाँ, कितनी नादान मैं
                    : [00:38.17] मेरे हुस्न के इलावा कभी दिल भी माँग लो ना
                    : [00:44.57] हाय, पल में मैं पिघल जाऊँ, हाँ
                    : [00:48.94] 
                    : [00:50.98] अब ऐसा ना करो कि दिल जुड़ ना पाए वापिस
                    : [00:57.13] तेरी बातों से बिख़र जाऊँ, हाँ
                    : [01:01.96] 
                    : [01:04.23] माना, ज़माना है दीवाना, इसीलिए तूने ना जाना
                    : [01:10.58] तेरे लिए मैं काफ़ी हूँ
                    : [01:14.76] 
                    : [01:16.87] देखो-देखो, ये ज़माने से थक कर, आते हो क्यूँ मासूम बन कर?
                    : [01:23.02] तेरे लिए मैं क्या ही हूँ?
                    : [01:26.65] 
                    : [01:28.77] फ़िर आते क्यूँ यहाँ करने आँखों में हो बारिश?
                    : [01:35.12] अब आए तो ठहर जाओ ना
                    : [01:41.36] और पूछो ना ज़रा मेरे दिन के बारे में भी
                    : [01:47.50] बस इतने में सँभल जाऊँ, हाँ
                    : [01:53.57] हाँ, एक दिन कभी कोई
                    : [01:59.83] जब भी पढ़े कहानी तेरी
                    : [02:06.26] लगता मुझे, मेरे नाम का
                    : [02:12.56] ज़िक्र कहीं भी होगा नहीं
                    : [02:19.62] हाँ, मैं यहीं
                    : [02:25.19] मेरी ये आँखो में, आँखों में तो देखो
                    : [02:31.33] देखो, ये दिल का हाल क्या, होंठों से होता ना बयाँ
                    : [02:37.82] मेरी ये आँखो में, आँखों में तो देखो
                    : [02:44.17] कैसा नसीब है मेरा, मिलके भी ना मुझे मिला
                    : [02:50.42] मेरी ये आँखो में, आँखों में तो देखो
                    : [02:56.73] तेरी अधूरी सी वफ़ा, माँगूँ, मैं माँगूँ और ना
                    : [03:02.94] मेरी ये आँखो में, आँखों में तो देखो
                    : [03:08.24] 
                    : [03:10.63] देखो-देखो, कैसी खींची लकीरें, चाहे भी दिल तो भी ना जीते
                    : [03:16.89] मैं इस दौड़ में नहीं
                    : [03:20.66] 
                    : [03:23.09] देखो-देखो, कैसी बातें यहाँ की, बातें यही देखूँ जहाँ भी
                    : [03:29.59] मैं इस दौर से नहीं
                    : [03:31.77] 
    DISCTOTAL       : 1
    DISC            : 1
    TRACKTOTAL      : 1
    track           : 1
  Duration: 00:03:37.89, start: 0.000000, bitrate: 2119 kb/s
  Stream #0:0: Audio: flac, 96000 Hz, stereo, s32 (24 bit)
    Side data:
      replaygain: track gain - -6.880000, track peak - 0.000023, album gain - -6.880000, album peak - 0.000023, 
  Stream #0:1: Video: mjpeg (Progressive), yuvj444p(pc, bt470bg/unknown/unknown), 1280x1280 [SAR 72:72 DAR 1:1], 90k tbr, 90k tbn (attached pic)
    Metadata:
      comment         : Cover (front)
      title           : Album Cover

Perhaps this has to do with the change that occurred in TIDAL's service in June 2023? Before that, they used MQA exclusively for the highest-quality "HiRes" audio, but changed to fLaC for the HiRes audio offering. This might be where the "upsampling" came in?

Rajeshsahoo12 commented 7 months ago

Perhaps this has to do with the change that occurred in TIDAL's service in June 2023? Before that, they used MQA exclusively for the highest-quality "HiRes" audio, but changed to fLaC for the HiRes audio offering. This might be where the "upsampling" came in?

Okay. But this track was release in after that TIDAL service changes. As this track is in MAX quality. As per tidal what I understand is that MAX = MQA (anything above 16 bit 44.1 khz) & HI-RES FLAC (anything above 16 bit 44.1 khz)

But there are many tracks which I have downloaded using this program that lossless audio checker program has flagged as "CLEAN"

But this tracks many tracks of this artists behaves same way marked as "UPSAMPLED". Let it be anyway leave it. Your program is really good. Thanks for making such a good program.

A suggestion how to get rid of always getting new access token..? As, what I do now is to get fresh access token is clear android app info & data. Then re-login to get the fresh access token.

But can't we get refresh token anyhow..?

Rajeshsahoo12 commented 7 months ago

A suggestion how to get rid of always getting new access token..? As, what I do now is to get fresh access token is clear android app info & data. Then re-login to get the fresh access token.

But can't we get refresh token anyhow..?

To download hi-res & 360 reality audio we need access token from android device. As windows device access token does not work.

But this token expires in one day I think. Just need any way to refresh access token automatically.

ebb-earl-co commented 7 months ago

A suggestion how to get rid of always getting new access token..? As, what I do now is to get fresh access token is clear android app info & data. Then re-login to get the fresh access token. But can't we get refresh token anyhow..?

To download hi-res & 360 reality audio we need access token from android device. As windows device access token does not work.

But this token expires in one day I think. Just need any way to refresh access token automatically.

That's right, TIDAL doesn't provide HiRes or Atmos or 360 Reality Audio to desktop clients.

You don't have to log in or log out of the TIDAL app on Android for a new token; you just have to delete the okhttp directory in your Android file manager app, then start playing back whatever song or video in the app, and a new access token will have been written.

At the moment, I have no automated way to refresh the Android token, and this is out of my control. The reason that the Fire TV and Android Auto options have automated refresh tokens is that they are "appliance" devices; i.e., they don't have a standard input mechanism like a keyboard/mouse or a touchscreen and aren't meant to be interacted with like a desktop or a mobile device. Thus, for customer appeal, they need to be a "hands-off" device once logged in, or the users wouldn't put up with it.

Conversely, Android does have a username/password and software users on mobile phones are more forgiving when it comes to having to re-authenticate. You can read more about the OAuth 2.0 specification, and indeed I will add some information to the wiki about this, but short of finding a way to de-compile the Android APK and read through some Java, I don't believe there is a way to hijack the Android authentication system. I will post updates as I investigate, however!

Rajeshsahoo12 commented 7 months ago

That's right, TIDAL doesn't provide HiRes or Atmos or 360 Reality Audio to desktop clients.

Okay, that's may be the reason when I use access token from windows 10 PC in which I have installed TIDAL application from website manually. But when I search for tidal application on MS store, it is not available. And when I use access token from this PC, it does not get success.

Rajeshsahoo12 commented 7 months ago

You don't have to log in or log out of the TIDAL app on Android for a new token; you just have to delete the okhttp directory in your Android file manager app, then start playing back whatever song or video in the app, and a new access token will have been written.

Okay understood the procedure. Was doing very long steps. Thanks for the trick.

Rajeshsahoo12 commented 7 months ago

At the moment, I have no automated way to refresh the Android token, and this is out of my control. The reason that the Fire TV and Android Auto options have automated refresh tokens is that they are "appliance" devices; i.e., they don't have a standard input mechanism like a keyboard/mouse or a touchscreen and aren't meant to be interacted with like a desktop or a mobile device. Thus, for customer appeal, they need to be a "hands-off" device once logged in, or the users wouldn't put up with it.

Ohhhh okay. Can't we use android SDK & make a virtual device of any android device which will run in virtualization whenever we want. Which will give us the access token for android device but no need to for refresh. Basically it will act as a duplicate device such as android appliances devices.

Rajeshsahoo12 commented 7 months ago

At the moment, I have no automated way to refresh the Android token, and this is out of my control. The reason that the Fire TV and Android Auto options have automated refresh tokens is that they are "appliance" devices; i.e., they don't have a standard input mechanism like a keyboard/mouse or a touchscreen and aren't meant to be interacted with like a desktop or a mobile device. Thus, for customer appeal, they need to be a "hands-off" device once logged in, or the users wouldn't put up with it.

Ohhhh okay. Can't we use android SDK & make a virtual device of any android device which will run in virtualization whenever we want. Which will give us the access token for android device but no need to for refresh. Basically it will act as a duplicate device such as android appliances devices.

I am referring as this

image

ebb-earl-co commented 7 months ago

At the moment, I have no automated way to refresh the Android token, and this is out of my control. The reason that the Fire TV and Android Auto options have automated refresh tokens is that they are "appliance" devices; i.e., they don't have a standard input mechanism like a keyboard/mouse or a touchscreen and aren't meant to be interacted with like a desktop or a mobile device. Thus, for customer appeal, they need to be a "hands-off" device once logged in, or the users wouldn't put up with it.

Ohhhh okay. Can't we use android SDK & make a virtual device of any android device which will run in virtualization whenever we want. Which will give us the access token for android device but no need to for refresh. Basically it will act as a duplicate device such as android appliances devices.

I am referring as this

image

Interesting, I had not seen something like this before. In terms of this project, I don't believe that integrating a virtual Android device in scope: I don't have experience with this kind of development, and so there is an entire class of bugs that would result...

Even in this situation, the virtual Android device would still need to run the TIDAL application, which means that you would still need to interact with it manually in order for it to produce logs, particularly the okhttp package logs which contain the bearer token. This is fundamentally the security model for TIDAL on mobile: requiring manual interaction (as far as I have discovered up to this point!).

Rajeshsahoo12 commented 7 months ago

At the moment, I have no automated way to refresh the Android token, and this is out of my control. The reason that the Fire TV and Android Auto options have automated refresh tokens is that they are "appliance" devices; i.e., they don't have a standard input mechanism like a keyboard/mouse or a touchscreen and aren't meant to be interacted with like a desktop or a mobile device. Thus, for customer appeal, they need to be a "hands-off" device once logged in, or the users wouldn't put up with it.

Ohhhh okay. Can't we use android SDK & make a virtual device of any android device which will run in virtualization whenever we want. Which will give us the access token for android device but no need to for refresh. Basically it will act as a duplicate device such as android appliances devices.

I am referring as this image

Interesting, I had not seen something like this before. In terms of this project, I don't believe that integrating a virtual Android device in scope: I don't have experience with this kind of development, and so there is an entire class of bugs that would result...

Even in this situation, the virtual Android device would still need to run the TIDAL application, which means that you would still need to interact with it manually in order for it to produce logs, particularly the okhttp package logs which contain the bearer token. This is fundamentally the security model for TIDAL on mobile: requiring manual interaction (as far as I have discovered up to this point!).

Yeah I too have thought about it. But was thinking if it is possible at all to replicate the android device which is keyboard less.

If any how we replicate the android appliance for testing, but we need a device which is android running but not considered as fire tv coz fire tv access token will not work to extract HI-RES & 360 REALITY AUDIO.

Will ANDROID TV access token will auto refresh...?

ebb-earl-co commented 7 months ago

At the moment, I have no automated way to refresh the Android token, and this is out of my control. The reason that the Fire TV and Android Auto options have automated refresh tokens is that they are "appliance" devices; i.e., they don't have a standard input mechanism like a keyboard/mouse or a touchscreen and aren't meant to be interacted with like a desktop or a mobile device. Thus, for customer appeal, they need to be a "hands-off" device once logged in, or the users wouldn't put up with it.

Ohhhh okay. Can't we use android SDK & make a virtual device of any android device which will run in virtualization whenever we want. Which will give us the access token for android device but no need to for refresh. Basically it will act as a duplicate device such as android appliances devices.

I am referring as this image

Interesting, I had not seen something like this before. In terms of this project, I don't believe that integrating a virtual Android device in scope: I don't have experience with this kind of development, and so there is an entire class of bugs that would result... Even in this situation, the virtual Android device would still need to run the TIDAL application, which means that you would still need to interact with it manually in order for it to produce logs, particularly the okhttp package logs which contain the bearer token. This is fundamentally the security model for TIDAL on mobile: requiring manual interaction (as far as I have discovered up to this point!).

Yeah I too have thought about it. But was thinking if it is possible at all to replicate the android device which is keyboard less.

If any how we replicate the android appliance for testing, but we need a device which is android running but not considered as fire tv coz fire tv access token will not work to extract HI-RES & 360 REALITY AUDIO.

Will ANDROID TV access token will auto refresh...?

Yes, the Fire TV client (which is Android) does have a mechanism to auto-refresh its access token when it has expired, because it uses OAuth 2.0.

In any situation with an Android device (emulated, physical, rooted appliance, etc.), there will still need to be manual input from the user. As far as I can figure from the logs and from other projects, it's not possible to automate interaction with TIDAL on Android, and this is done intentionally by the TIDAL developers.

Rajeshsahoo12 commented 7 months ago

Yes, the Fire TV client (which is Android) does have a mechanism to auto-refresh its access token when it has expired, because it uses OAuth 2.0.

Okay. If fire-tv access token can get refresh automatically. But then will have problem of not able to download HIRES & 360 REALITY AUDIO. As, it requires android / windows access token.

Rajeshsahoo12 commented 7 months ago

At the moment, I have no automated way to refresh the Android token, and this is out of my control. The reason that the Fire TV and Android Auto options have automated refresh tokens is that they are "appliance" devices; i.e., they don't have a standard input mechanism like a keyboard/mouse or a touchscreen and aren't meant to be interacted with like a desktop or a mobile device. Thus, for customer appeal, they need to be a "hands-off" device once logged in, or the users wouldn't put up with it.

Ohhhh okay. Can't we use android SDK & make a virtual device of any android device which will run in virtualization whenever we want. Which will give us the access token for android device but no need to for refresh. Basically it will act as a duplicate device such as android appliances devices.

I am referring as this image

Interesting, I had not seen something like this before. In terms of this project, I don't believe that integrating a virtual Android device in scope: I don't have experience with this kind of development, and so there is an entire class of bugs that would result... Even in this situation, the virtual Android device would still need to run the TIDAL application, which means that you would still need to interact with it manually in order for it to produce logs, particularly the okhttp package logs which contain the bearer token. This is fundamentally the security model for TIDAL on mobile: requiring manual interaction (as far as I have discovered up to this point!).

Yeah I too have thought about it. But was thinking if it is possible at all to replicate the android device which is keyboard less. If any how we replicate the android appliance for testing, but we need a device which is android running but not considered as fire tv coz fire tv access token will not work to extract HI-RES & 360 REALITY AUDIO. Will ANDROID TV access token will auto refresh...?

Yes, the Fire TV client (which is Android) does have a mechanism to auto-refresh its access token when it has expired, because it uses OAuth 2.0.

In any situation with an Android device (emulated, physical, rooted appliance, etc.), there will still need to be manual input from the user. As far as I can figure from the logs and from other projects, it's not possible to automate interaction with TIDAL on Android, and this is done intentionally by the TIDAL developers.

Ohhhh okay