This PR adds support for downloading videos from Niconico/nicovideo.jp. Pretty much all the important work was done by @lurkook in #60, I just implemented it. So thank you! I've tested video and audio-only downloads with a few videos, but I haven't tested it super thoroughly yet, so probably best to consider it experimental for now. We can only get 360p streams, since Niconico paywalls higher qualities for premium members (maybe in the future users could add auth info to the settings page so we can fetch higher quality streams?).
Also, I found a weird quirk with the ffmpeg args and had to add a special case for Nicovideo to disable the empty_moov flag in -movflags. Otherwise, ffmpeg only saves about a second of video. Not sure why, all I know is removing the flag fixed it lol
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/imputnet/cobalt/pull/144
**Author:** [@oatmilkcat](https://github.com/oatmilkcat)
**Created:** 6/22/2023
**Status:** ❌ Closed
**Base:** `current` ← **Head:** `niconico-support`
---
### 📝 Commits (7)
- [`4015799`](https://github.com/imputnet/cobalt/commit/4015799fdb210230b827a8b5f86d1d64f2ccf519) nicovideo: basic niconico video support
- [`193e822`](https://github.com/imputnet/cobalt/commit/193e8225bf3ddb2deca791b546461718bd3bef90) nicovideo: add audio filename
- [`0dba8d1`](https://github.com/imputnet/cobalt/commit/0dba8d1cfbecf135a6c4d95dd0fd154ae01dbb7a) nicovideo: add Niconico to "Supported services" in README
- [`d489007`](https://github.com/imputnet/cobalt/commit/d4890079ac29ed524bb1d4db1027b6d07df74d72) nicovideo: fix deepsource variable shadowing lint
- [`7baa581`](https://github.com/imputnet/cobalt/commit/7baa581983c8ecf46e50043b84ab38a38f3a1063) nicovideo: add tests
- [`6cf3e34`](https://github.com/imputnet/cobalt/commit/6cf3e34ab378e013bd00450bc39301fb39552530) Merge branch 'current' into niconico-support
- [`6406aca`](https://github.com/imputnet/cobalt/commit/6406aca51a9d6a5849f059397676c0bde006decb) Merge branch 'current' into niconico-support
### 📊 Changes
**6 files changed** (+171 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `src/modules/processing/match.js` (+3 -0)
➕ `src/modules/processing/services/nicovideo.js` (+131 -0)
📝 `src/modules/processing/servicesConfig.json` (+6 -0)
📝 `src/modules/processing/servicesPatternTesters.js` (+4 -0)
📝 `src/modules/stream/types.js` (+7 -1)
📝 `src/test/tests.json` (+20 -0)
</details>
### 📄 Description
This PR adds support for downloading videos from Niconico/nicovideo.jp. Pretty much all the important work was done by @lurkook in #60, I just implemented it. So thank you! I've tested video and audio-only downloads with a few videos, but I haven't tested it super thoroughly yet, so probably best to consider it experimental for now. We can only get 360p streams, since Niconico paywalls higher qualities for premium members (maybe in the future users could add auth info to the settings page so we can fetch higher quality streams?).
Also, I found a weird quirk with the ffmpeg args and had to add a special case for Nicovideo to disable the `empty_moov` flag in `-movflags`. Otherwise, ffmpeg only saves about a second of video. Not sure why, all I know is removing the flag fixed it lol
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/imputnet/cobalt/pull/144
Author: @oatmilkcat
Created: 6/22/2023
Status: ❌ Closed
Base:
current← Head:niconico-support📝 Commits (7)
4015799nicovideo: basic niconico video support193e822nicovideo: add audio filename0dba8d1nicovideo: add Niconico to "Supported services" in READMEd489007nicovideo: fix deepsource variable shadowing lint7baa581nicovideo: add tests6cf3e34Merge branch 'current' into niconico-support6406acaMerge branch 'current' into niconico-support📊 Changes
6 files changed (+171 additions, -1 deletions)
View changed files
📝
src/modules/processing/match.js(+3 -0)➕
src/modules/processing/services/nicovideo.js(+131 -0)📝
src/modules/processing/servicesConfig.json(+6 -0)📝
src/modules/processing/servicesPatternTesters.js(+4 -0)📝
src/modules/stream/types.js(+7 -1)📝
src/test/tests.json(+20 -0)📄 Description
This PR adds support for downloading videos from Niconico/nicovideo.jp. Pretty much all the important work was done by @lurkook in #60, I just implemented it. So thank you! I've tested video and audio-only downloads with a few videos, but I haven't tested it super thoroughly yet, so probably best to consider it experimental for now. We can only get 360p streams, since Niconico paywalls higher qualities for premium members (maybe in the future users could add auth info to the settings page so we can fetch higher quality streams?).
Also, I found a weird quirk with the ffmpeg args and had to add a special case for Nicovideo to disable the
empty_moovflag in-movflags. Otherwise, ffmpeg only saves about a second of video. Not sure why, all I know is removing the flag fixed it lol🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.