nilaoda / N_m3u8DL-CLI

[.NET] m3u8 downloader 开源的命令行m3u8/HLS/dash下载器,支持普通AES-128-CBC解密,多线程,自定义请求头等. 支持简体中文,繁体中文和英文. English Supported.
https://nilaoda.github.io/N_m3u8DL-CLI/
MIT License
14.14k stars 2.14k forks source link

DAZN CA NFL not working #353

Closed PlaceboPRS closed 3 years ago

PlaceboPRS commented 3 years ago

Hi,

Not sure what information I should share, DAZN CA works fine for all sports except NFL for some reason:

image

You can see it works as normal until the final segment, then it can't read the last one, combine and download the audio, ends up with a folder full of the individual files.

I've tried reading various other reports to try to figure out the solution myself, tried using headers/cookies (although I'm not really sure which ones I should be including).

.json says VOD true, mpdVideo.m3u8 has #EXT-X-ENDLIST (no idea if either is relevant but I saw issues caused by these in other people's posts).

Here's the log file:

2021-01-26_07-54-13.log

Thanks in advance!

nilaoda commented 3 years ago

I will check. It seems that the program has parsed an extra piece.

PlaceboPRS commented 3 years ago

Thanks for the reply! I enabled the setting --disableIntegrityCheck and that seems to have resolved it and the download completes and can be decrypted ok! :)

I also have issues with Peacock (sometimes football matches have the wrong length they display eg 55hrs instead of 3hours but can be fixed with ffmpeg) and Viaplay (sometimes when a downloaded file is decrypted it suddenly shrinks to a small size and only shows a fraction of the full event). But I'll try to figure out those issues myself without spamming your issues section!

nilaoda commented 3 years ago

Thanks for the reply! I enabled the setting --disableIntegrityCheck and that seems to have resolved it and the download completes and can be decrypted ok! :)

I also have issues with Peacock (sometimes football matches have the wrong length they display eg 55hrs instead of 3hours but can be fixed with ffmpeg) and Viaplay (sometimes when a downloaded file is decrypted it suddenly shrinks to a small size and only shows a fraction of the full event). But I'll try to figure out those issues myself without spamming your issues section!

try enable binary merge

nilaoda commented 3 years ago

Could you just upload the dash.mpd? i cant download from https://dca-voddash-perform.secure.footprint.net/bc1aphlu8kol19sub5bn8uzqb/web/stream.mpd?channel=1407&mta=en&outlet=dazn-ca&plang=en

PlaceboPRS commented 3 years ago

Yep no problem, attached

stream.zip

try enable binary merge

I just grabbed a Peacock event to test and according to the output it did that automatically, audio displays 17hrs 31 mins when decrypted (correct is 2hrs 2 mins and Medianfo displays that ok)

image image image

PlaceboPRS commented 3 years ago

Decrypted the video and it's the same:

image image

Fortunately as I discovered an easy fix:

ffmpeg -i "video(Audio) decrypted.aac" -t 2:02:00 -c:v copy -c:a copy -c:s copy "video(Audio) decrypted_fixed.aac"

ffmpeg -i "video decrypted.mp4" -t 2:02:00 -c:v copy -c:a copy -c:s copy "video decrypted_fixed.mp4"

image

(obviously every chance these issues are not related to your very awesome N_m3u8DL-CLI! So apologies for bringing them up)

nilaoda commented 3 years ago

N_m3u8DL-CLI_test_0127.zip

I have modified some codes that calculate the total number of segments. Can you help me test whether there are any excess or missing segments? Best to test multiple websites. Waiting for your reply.

Thanks.

PlaceboPRS commented 3 years ago

I can give it a go! Would that help solely with the DAZN issue or with the other issues I raised?

nilaoda commented 3 years ago

I can give it a go! Would that help solely with the DAZN issue or with the other issues I raised?

I tested stream.mpd, result 5636 segs. But I did not test whether it will affect mpd from other websites, so I want you to test it. 😂

PlaceboPRS commented 3 years ago

That I can do! :)

PlaceboPRS commented 3 years ago

Ok we've tried a few downloads and so far so good, maybe it fixed the issues or maybe we got lucky with the downloads!

Couple of questions/observations, the audio download, is it at all possible that could be done first? That way we can test the encryption key while we wait for the video, also the audio for some reason is always a much slower download, like 1mb/s compared to 30mb/s+ for the video, is that a server issue or it only downloads with one thread?

nilaoda commented 3 years ago

image

I used the mpd-parser of videojs, the analysis result is also 5637 segments, so I think it may be the problem of MPD itself?

Azzuray commented 3 years ago

Does it do the same when you mux it in MKV file ?

PlaceboPRS commented 3 years ago

Does it do the same when you mux it in MKV file ?

Apologies I missed your reply, do you mean the DAZN issue or the Peacock one? But yes it's the same if muxed with MIKVToolnix.