Open redbatz opened 3 years ago
Can you do me a favor and check how fast ffmpeg is downloading the stream (specifically the speed value when downloading the stream. ffmpeg log doesn't show it which isn't useful)
This needs to be at x1.0 to stop the stream from skipping. NND is hostile towards clients and prevents them from downloading faster than x1.0, and deliberately makes video chunks missing if you're not downloading fast enough (because the server assumes you're going to restart the stream and buffer if you're downloading too slow)
If this is the case, then unfortunately there is no fix for this other than getting a better connection to NNDs servers. I rent a server in a datacenter which I use to download NND streams from so I don't have this issue, but I have heard cases of people who have otherwise decent internet not able to download NND streams exactly as you describe.
Can you do me a favor and check how fast ffmpeg is downloading the stream (specifically the speed value when downloading the stream. ffmpeg log doesn't show it which isn't useful)
This needs to be at x1.0 to stop the stream from skipping. NND is hostile towards clients and prevents them from downloading faster than x1.0, and deliberately makes video chunks missing if you're not downloading fast enough (because the server assumes you're going to restart the stream and buffer if you're downloading too slow)
If this is the case, then unfortunately there is no fix for this other than getting a better connection to NNDs servers. I rent a server in a datacenter which I use to download NND streams from so I don't have this issue, but I have heard cases of people who have otherwise decent internet not able to download NND streams exactly as you describe.
How do I do that? As you say, nothing in the logs mention speed.
@redbatz It should still show in the terminal as it's downloading. It just doesn't persist in the logs
It is barely keeping up, so it sounds like your theory could be correct. I will wait for the first time the errors happen and check speed at that point to verify it.
@bbepis I have now verified that it does happen when the speed drops low. It seems if it below x0.7 it causes the error in the pull function, which in turn causes the whole corrupt segment thing.
Sorry for opening an incorrect ticket, but maybe this behaviour should be noted somewhere in the documentation?
Sorry for opening an incorrect ticket, but maybe this behaviour should be noted somewhere in the documentation?
You didn't do anything wrong. This is an obscure issue within NND and it's okay to ask questions about it.
I'll write something on the README later, and leave this ticket open until it's done. Thanks for suggesting it
Checklist
Verbose log
Description
When using both the latest official release and the latest master commit from the GitHub-fork trying to download anything from NicoNicoLive are resulting in incomplete/corrupt video files. The video files are technically playable, but are missing a lot of chunks and keeps skipping in the audio. A 3 hour stream for example results in somewhere between a 150 and 500 MB MP4-file, varying between each run how many chunks are actually skipped, which is far smaller than they used to be.
Looking at the logs (provided an example above) it seems to be an issue with the keep-alive of the connection that fails, resulting in an some errors (error in the pull function/PES packet size mismatch) and causing whole HLS segments be skipped. Can something have change on NNL's side as this used to work a few weeks ago?