python-tidal icon indicating copy to clipboard operation
python-tidal copied to clipboard

Video.get_url() gives you an url to an m3u8 playlist but not to the video.

Open exislow opened this issue 1 year ago • 3 comments

According to the description of Video.get_url() I would actually expect the direct video url according to my set video_quality: https://github.com/tamland/python-tidal/blob/288fc1ea53d6ca0a23424795ecae3a09b0ec43a3/tidalapi/media.py#L841-L846

Retrieves the URL for a video.

:return: A `str` object containing the direct video URL

But instead this method return a link to an m3u8 playlist, where I need to pick the direct video url for my desired quality by myself. What am I doing wrong? Or is the description of the method not correct?

exislow avatar Apr 20 '24 15:04 exislow

This is how the tidal api works when requested the (stream) url through the api. So the description is slightly vague but correct.

You are presented with an url to the HLS (m3u8) playlist/index which is the (usual) way to handle video steams, the other being MPD-Dash.

I suspect Mpd manifest may also be available (similar to track stream) but I have not looked into it.

tehkillerbee avatar Apr 20 '24 22:04 tehkillerbee

What do you think about this:

  • Let's correct the method comment to be more precise.
  • Have a look at the MPD option in the next step?

exislow avatar Apr 21 '24 19:04 exislow

@exislow Sounds good to me. We should at least make it clear that the URL presented is a HLS stream playlist (m3u8) if this is currently the case. Also we should probably make sure that the quality selection logic actually works as expected, especially if multiple qualities are presented in this HLS stream.

I do believe the video class need a bit of a look over anyways.

tehkillerbee avatar Apr 21 '24 20:04 tehkillerbee