This is cool and there are a few other projects in the wild like it, that I’ve tried, but the use case it would be a good discussion vs other approaches vs the tools below.
There are free tools to do this, even those that allow you to do this as a project and edit the capture to make sure you only have what you really want.
Example https://www.screentogif.com
The below does screen capture to gif as well, but you can't edit it. https://www.cockos.com/licecap
Lastly, there is good old PSR (Problem step recorder) that is built ingot every version of Windows since Windows 7.
https://support.microsoft.com/en-us/help/22878/windows-10-record-steps
Now, Win7 PSR only allowed for 99 captures per session, whereas Win8+ allows for 999 captures. It captures per click, the entire screen, and you can make notes alone the way. This produces an .mht file that you can view in any browser. A decent auto documentation tool.
Yet, all things have merit depending on need. Good work though and I will play with it, anyway. Just cause. 8^}
I recently just stumbled across MS Steps Recorder.
https://support.microsoft.com/en-us/help/22878/windows-10-record-steps
Will be using this to create simple workflow documentation. Also great to help recreate workflows in support.
Are you getting the actual stream address from the source code or are you just copy/pasting the webpage URL in VLC?
What program's search bar are you pasting into?
Clicking 'save video as' as using VLC's transcoding system to make a copy of the stream?
Use the Problem Steps Recorder to show us exactly what you're trying to do, as it's not really clear by your description.
Not sure if this is will help, but
https://support.microsoft.com/en-us/help/22878/windows-10-record-steps
The Problems Steps Recorder in Windows 7 (just Steps Recorder in later versions) is a tool nobody uses but should be to get end users to click-track their errors. https://support.microsoft.com/en-us/help/22878/windows-10-record-steps
Like I said, anyone with access to the host can see your screen. If they want to record what you do and replay it later for review, they're going to need to add extra software to the VM or use the Steps Recorder tool built into Windows 7 or later...