I didn't see a guide on how to do this, so I'll post it myself in case this is of any use to anyone. This will outline how to download a Nico Nico Douga video and get a subtitle file that contains the scrolling comments (called "danmaku"), and, optionally, hardcode the danmaku into the video. No more screen recordings!
(TL;DR: yt-dlp to download the video, ASS Danmaku Firefox add-on to download danmaku, FFmpeg to hardcode.)
To download the video itself, we'll be using yt-dlp. You can get it from [here]. Scroll down to "assets" and download yt-dlp_win.zip, yt-dlp_macos.zip, or yt-dlp_linux.zip depending on your OS. Please note that the following instructions will be using Windows, so your process from here on out may differ slightly if you have Mac or Linux.
After unzipping the archive, open Command Prompt and navigate to the folder's directory. You could use the cd command to do this, or you could type "cmd.exe" into Windows Explorer's address bar when browsing inside the folder. Now, use the command yt-dlp [nicovideo.jp link] to download the video. The resulting .mp4 video will appear in the same directory.
Now that we have the video, we'll use the ASS Danmaku Firefox add-on to get the danmaku as an .ass subtitle file. (If you don't already use Firefox as your primary browser, you should, just saying.) Download it [here]. Navigate to the NND video, and beside the address bar, there will be a speech bubble icon in Firefox's address bar. Click it, and click on your video, and the .ass file will be automatically downloaded.
(If you want, you can adjust things like text opacity and speed in the addon's settings. The default settings are a little slow for my taste, so I set the normal duration to 6 and fixed to 3.5.)
If you don't want to hardcode the danmaku into the video, you're pretty much done! Please note that most media players will not automatically display a video with subtitles unless the subtitle file is in the same directory and has the same name as the video. For example, for badromance.mp4, your subtitle file badromance.ass should be right beside it.
We'll now hardcode the danmaku into the video using FFmpeg. If you don't already have FFmpeg, first download ffmpeg-git-full.7z from [here]. Extract the archive, then add it to your system environment variables by searching for SystemPropertiesAdvanced.exe on your computer, click "Environment Variables...", click "New", and type the path to your FFmpeg bin folder (in my case, C:\Users\user\Downloads\ffmpeg\bin). Hit OK to confirm.
After all that setup, the next part is thankfully easy-- open the Command Prompt and navigate it to the directory where your .mp4 and .ass files are, then enter something like this (using badromance.mp4 as an example again): ffmpeg -i badromance.mp4 -vf subtitles=badromance.ass badromancewithdanmaku.mp4. You're done! In this example, badromancewithdanmaku.mp4 is your finished product.
Here's a few examples of videos created using this method.
As a final note, this could theoretically work with sites like Bilibili and AcFun as well, I just haven't tested those!