Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Niconico - Support for DMS formats #8758

Closed
9 of 10 tasks
Dioxaz opened this issue Dec 11, 2023 · 1 comment · Fixed by #9282
Closed
9 of 10 tasks

Niconico - Support for DMS formats #8758

Dioxaz opened this issue Dec 11, 2023 · 1 comment · Fixed by #9282
Labels
site-enhancement Feature request for some website

Comments

@Dioxaz
Copy link

Dioxaz commented Dec 11, 2023

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Region

No response

Example URLs

https://www.nicovideo.jp/watch/sm43110779

Provide a description that is worded well enough to be understood

Since I think December, videos longer than 30 minutes can now benefit from resolutions higher than 360p on Niconico. This wasn't the case before. For the video example I provided (sm43110779), resolutions up to 720p are available on the player within a web browser. A screenshot is included.
sm43110779_720p
These resolutions aren't offered when trying out yt-dlp, even though I'm using --cookies-from-browser, as I usually do (as can be seen on the verbose output).

Is there something I have overlooked on my side, or is it a new feature that would have to be implemented? If the latter, it would be great as I don't see myself downloading each segment one by one and reassembling them by hand (Niconico now exclusively uses HLS now, and this particular video loads a good chunk of CMFV and CMFA segments).

It looks like from what I've briefly seen that other available tools seem to only the 360p variants too on such video.

Edit: it seems it's possible to extract matching m3u8 playlists matching this particular video. A look inside the video-h264-720p.m3u8 reveals that this video has a total of 341 CMFV segments. But downloading them manually doesn't seem to yield valid video streams. I'm not qualified enough in order to understand what is going on.

Edit2: it looks like resolutions above 360p are locked behind Premium account, that could be an indication of why yt-dlp doesn't retrieve all the available formats (I might be wrong), thing is my Niconico account is already premium and I can actually watch the video within a browser

Edit3: it looks like yt-dlp doesn't support DMS yet on Niconico. A new system called DMS has been been introduced on Niconico on November apparently, so I had to use the commits from this pull request in order to be able to download the video (video stream only, no audio yet, or I did something wrong, but I can still grab the audio from the older DMC streams).

Provide verbose output that clearly demonstrates the problem

  • Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
  • If using API, add 'verbose': True to YoutubeDL params instead
  • Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output

[debug] Command-line config: ['-vU', '--cookies-from-browser', 'firefox', '-F', 'https://www.nicovideo.jp/watch/sm43110779']
Extracting cookies from firefox
[debug] Extracting cookies from: "C:\Users\[...]\AppData\Roaming\Mozilla\Firefox\Profiles\[...]\cookies.sqlite"
Extracted 1195 cookies from firefox
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version nightly@2023.12.06.232721 from yt-dlp/yt-dlp-nightly-builds [0b6f829b1] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-107951-g90aa2a88f9-20220901 (setts), ffprobe N-107951-g90aa2a88f9-20220901
[debug] Optional libraries: Cryptodome-3.19.0, brotli-1.1.0, certifi-2023.11.17, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.1.0, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets
[debug] Loaded 1792 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp-nightly-builds/releases/latest
Latest version: nightly@2023.12.06.232721 from yt-dlp/yt-dlp-nightly-builds
yt-dlp is up to date (nightly@2023.12.06.232721 from yt-dlp/yt-dlp-nightly-builds)
[niconico] Extracting URL: https://www.nicovideo.jp/watch/sm43110779
[niconico] sm43110779: Downloading webpage
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, size, br, asr, proto, vext, aext, hasaud, source, id
[info] Available formats for sm43110779:
ID                             EXT RESOLUTION │   FILESIZE  TBR PROTO │ VCODEC  VBR ACODEC  ABR MORE INFO
─────────────────────────────────────────────────────────────────────────────────────────────────────────────
h264_360p_low-aac_64kbps-hls   mp4 640x360    │ ~ 90.64MiB 364k dmc   │ h264   300k aac     64k DMC 低画質 HLS
h264_360p_low-aac_64kbps-http  mp4 640x360    │ ~ 90.64MiB 364k dmc   │ h264   300k aac     64k DMC 低画質 HTTP
h264_360p_low-aac_128kbps-hls  mp4 640x360    │ ~106.58MiB 428k dmc   │ h264   300k aac    128k DMC 低画質 HLS
h264_360p_low-aac_128kbps-http mp4 640x360    │ ~106.58MiB 428k dmc   │ h264   300k aac    128k DMC 低画質 HTTP
h264_360p-aac_64kbps-hls       mp4 640x360    │ ~165.35MiB 664k dmc   │ h264   600k aac     64k DMC 360p HLS
h264_360p-aac_64kbps-http      mp4 640x360    │ ~165.35MiB 664k dmc   │ h264   600k aac     64k DMC 360p HTTP
h264_360p-aac_128kbps-hls      mp4 640x360    │ ~181.29MiB 728k dmc   │ h264   600k aac    128k DMC 360p HLS
h264_360p-aac_128kbps-http     mp4 640x360    │ ~181.29MiB 728k dmc   │ h264   600k aac    128k DMC 360p HTTP
@Dioxaz Dioxaz added site-enhancement Feature request for some website triage Untriaged issue labels Dec 11, 2023
@Dioxaz
Copy link
Author

Dioxaz commented Dec 12, 2023

Update: I was able to download this particular video with help of the commits in this pull request. It looks like Niconico is undergoing a transition to a new system called DMS, which isn't supported yet by the official yt-dlp binary releases available. By applying all the changes from this commit, I was able to retrieve its video stream, but still no audio for the moment (I might be doing something wrong).

@pukkandan pukkandan removed the triage Untriaged issue label Dec 13, 2023
@pukkandan pukkandan changed the title Niconico - Support for resolutions options above 360p for videos longer than 30min? Niconico - Support for DMS formats Dec 13, 2023
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this issue Apr 21, 2024
Closes yt-dlp#8389, Closes yt-dlp#8758, Closes yt-dlp#9254
Authored by: pzhlkj6612, xpadev-net
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-enhancement Feature request for some website
Projects
None yet
2 participants