Closed Defrost4528 closed 3 years ago
I've attempted to download this on my machine and I am not receiving any skipped frames. I know there are some issues when trying to download a livestream that's actually live and not timeshifted, however that might not be related to this issue. Some things to try (in conjunction with each other):
-o is_live
--username
and --password
instead of --cookies
; FFMPEG might not be handling non-ytdl cookies correctly--fragment-retries "infinite"
If all else fails, specify --hls-prefer-native
. It'll use the internal m3u8 parser instead of the FFMPEG one, which might not skip expired frames. However it's not the default since it doesn't fully parse the m3u8 manifest, and may result in some missed data and/or errors.
NND only allows timeshifting for up to a week, right? And on top of that there's limits to how many streams you can timeshift per month? I'll have a go at downloading the 24hr full stream myself if you're not able to fix this, and maybe the second one if I can get a japanese VPN
Oh and, do you have a discord account? It might be easier to debug this over live chat, plus there are some questions we have about NND itself you might be able to answer (specifically around premium accounts)
Will try these out and get back to you, thank you.
As for downloading the timeshifts go, there is indeed a 1 week limit, thanks for the concern! Both livestreams are now second priority, now that it has shown up in multiple places on the web now, but I'm still looking to try to get this downloaded, and export the comments for both streams, though that's the other opened issue haha.
Here's my Discord: cak3#2321. I'm a little new to premium NND myself actually, but hopefully I can also answer whatever questions you have about it!
We were able to resolve this issue over Discord.
The core of this issue has to do with how NicoNico handles livestreams. It's possibly the most Japanese thing I've ever seen in my life.
Timeshifted (VOD) streams are actually presented to the user as livestream HLS manifests; this I assume is to prevent downloaders from being able to download the livestream video.
You are forced to download the stream at 1.0x speed; the server actually prevents you from downloading any other chunks than what it deems as "live" with a 403 response. As a result, you cannot download streams any faster than 1.0x. This also works in the opposite case; you cannot download slower than 1.0x as the chunks will artificially expire and ffmpeg will terminate the connection, leaving you with missing parts of the stream (and eventually stopping downloading altogether). This was the specific issue with the user; their internet connection was too slow to download the stream.
This cannot be fixed within youtube-dl unfortunately, as the logic would have to be applied within ffmpeg to restart the stream if the downloading falls behind. Let alone figuring out what javascript logic happens to restart the stream in the first place.
Fun fact: because of a bug within the NND servers, the connection cannot last longer than 24 hours. Anything beyond that has to be downloaded a second time
Checklist
Verbose log
(full log has been attatched if needed.)
Description
Resulting download remains in fragmented form, as multiple .ts files, and an m3u playlist which only points to 5 files. Not only that, but the ts files that are downloaded are also incomplete. After manually putting them together through concat, there are skipped sections of the video which are still streamable in the livestream. I believe these to be the areas where these occur: "skipping X segments ahead, expired from playlists". The segments that are skipped seem to also not be consistent between the times I run it.
Platform: Windows 10 Command:
youtube-dl --cookies .\nicovideo_cookies_premium.txt https://live2.nicovideo.jp/watch/lv327626435
(nicovideo_cookies_premium.txt are the cookies extracted from the site)Config:
Links of livestreams attempted: https://live2.nicovideo.jp/watch/lv327626496 (24 hours) https://live2.nicovideo.jp/watch/lv327626435 (Japan only, VPN used)
Thank you for your time!