Skip to main content

yt-dlp-nicocomments

A yt-dlp postprocessor plugin that converts Niconico comments to an ASS subtitle track.

Fonts

The plugin lays out and draws comments with:

The package includes these fonts under the SIL Open Font License 1.1. With --embed-subs, the plugin saves the video as an MKV file and attaches the fonts to it (unless embedfonts=false).

To keep the video file small, the plugin removes the unused glyphs from the fonts using fontTools.

Install

If yt-dlp is installed with uv or pip, install the plugin in the same environment:

uv tool install yt-dlp --with yt-dlp-nicocomments
pip install -U yt-dlp-nicocomments

If you use the yt-dlp executable, download the .whl file from the latest release and put it in a yt-dlp plugin directory:

Platform Plugin directory
macOS, Linux ~/.config/yt-dlp/plugins/
Windows %APPDATA%\yt-dlp\plugins\

To make sure that the release workflow of this repository built the file, run:

gh attestation verify yt_dlp_nicocomments-*.whl -R hiroki-io/yt-dlp-nicocomments

The yt-dlp executable cannot load fontTools from the plugin directory. To attach smaller fonts, install fontTools so that the pyftsubset command is on PATH, for example with brew install fonttools or pipx install fonttools.

To use the code from a clone of this repository, download the fonts and put the repository in a plugin directory:

python3 ~/yt-dlp-nicocomments/tools/font_data.py
mkdir -p ~/.config/yt-dlp/plugins
ln -s ~/yt-dlp-nicocomments ~/.config/yt-dlp/plugins/yt-dlp-nicocomments

Usage

yt-dlp --embed-subs --use-postprocessor "NicoComments:when=video" \
  https://www.nicovideo.jp/watch/sm9

when=video is necessary because the plugin must run before yt-dlp writes the subtitles.

Options

Options are passed after the postprocessor name (NicoComments:), separated by semicolons:

Option Values Default Description
lang ja, en, or zh, separated by commas ja Comment languages. Each language becomes a separate subtitle track.
nglevel high, medium, low, or none medium Hide comments that many users added to their NG lists. high hides the most comments.
opacity A number from 0 to 1 1 Comment opacity
embedfonts true, yes, 1, false, no, or 0 true Attach the fonts to the video file when --embed-subs is used
defaulttrack true, yes, 1, false, no, or 0 true Mark the subtitle track of the first comment language as default

Example:

--use-postprocessor "NicoComments:when=video;lang=ja,en;nglevel=high"

Shortcut

To shorten the command, define an alias in the yt-dlp configuration file ~/.config/yt-dlp/config:

--alias --nico "--embed-subs --use-postprocessor NicoComments:when=video"

Then use the alias instead of the options:

yt-dlp --nico https://www.nicovideo.jp/watch/sm9

Save only the comment track

To save the comment track as an ASS file without the video, use --write-subs and --skip-download:

yt-dlp --skip-download --write-subs --use-postprocessor "NicoComments:when=video" \
  https://www.nicovideo.jp/watch/sm9

The ASS file does not contain the fonts, so install the font files linked in Fonts on the computer that plays it.

Burn the comments into the video

To burn the comment track into the video, run this command with an FFmpeg build that includes libass:

ffmpeg -i video.mkv -vf subtitles=video.mkv -c:a copy video-burned.mp4

FFmpeg encodes the video again, so this takes time and lowers the quality.

Metadata

Release files for yt-dlp-nicocomments 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yt-dlp-nicocomments 0.2.0
File Size Uploaded
yt_dlp_nicocomments-0.2.0.tar.gz 26.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for yt-dlp-nicocomments 0.2.0
File Interpreter ABI Platform
yt_dlp_nicocomments-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 52.8 MB

Release files / yt_dlp_nicocomments-0.2.0.tar.gz

Download URL yt_dlp_nicocomments-0.2.0.tar.gz
Size 26.4 MB
Tags Source
SHA-256 checksum
How to use checksums
2346fec900ec292cfe02f9dddcd33727ad6a0ad324a80e5220a0411027d866a0
BLAKE2b-256 checksum
How to use checksums
8c494e7faacd1d2aebc963f45d1613802fff8e78bfc6a7586911a898a62f340b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release files / yt_dlp_nicocomments-0.2.0-py3-none-any.whl

Download URL yt_dlp_nicocomments-0.2.0-py3-none-any.whl
Size 26.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
74b0e617c6156a802449853bfa50cb6401f182e1fc80dbfe9a153702179f0a0c
BLAKE2b-256 checksum
How to use checksums
7227aa26ed67835a0663383a9ded4468442e5509a9e74debbd02b1f3625f06b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page