The past couple of weeks I've noticed that I lose a lot of hard drive space over and over, and when I close down my Streamlink streams, it immediately returns. The single file appears in C:\Windows\Temp. Files have ranged from 4 to 30+ GB, seems to be determined by how long I've watched a stream.
Several, including https://www.twitch.tv/esl_csgo/.
A file is immediately created called htt[random capital letter][3 numbers].tmp
Operating system and version: Win7 SP1 x64
Streamlink and Python version: Streamlink 0.6.0, apparently I don't have Python installed right now, but I had 2.7 before reinstalling Windows.
The same issue occurred before a complete reinstall of Windows, and with Streamlink 0.2.0.
Also using Twitch Streamlink GUI if relevant.
A file is immediately created called htt[random capital letter][3 numbers].tmp
Also using Twitch Streamlink GUI if relevant.
The Streamlink Twitch GUI is using the http player passthrough method by default. Maybe your player is writing its stream buffer to the filesystem after reading it from Streamlink's local http server. Or maybe another program is reading the data, eg. an antivirus software. I'm bringing this up because of the temp file name format, which would fit into this scenario, and since it's Windows I'd not be surprised about something like this.
Neither Streamlink nor Streamlink Twitch GUI are writing the stream data to the filesystem:
https://github.com/streamlink/streamlink/blob/0.7.0/src/streamlink_cli/main.py#L83-L108
https://github.com/streamlink/streamlink/blob/0.7.0/src/streamlink_cli/output.py#L178-L179
https://github.com/streamlink/streamlink/blob/0.7.0/src/streamlink_cli/utils/http_server.py#L104-L108
Do you know which process is writing this file? See this answer here for finding out which file handles are currently open on your Windows system:
https://superuser.com/questions/117902/find-out-which-process-is-locking-a-file-or-folder-in-windows/643312#643312
Does this also happen when not using the http passthrough method? Just try launching Streamlink from the shell without the --hls-passthrough=http parameter or try using a different value like rtmp or hls (you're also able to change this in the Twitch GUI's settings menu when advanced settings are enabled). Also please try using a different player to make sure this is player unrelated.
Btw, being able to write to C:\Windows\Temp usually requires administrator privileges. Are you sure nothing else weird is going on here?
Well, that's odd. I noticed that similar files are created when playing other content. However, not with Streamlink + hls.
Looks like it's an AV/FW issue as you said, the files weren't created when I disabled it. Perhaps an update on that end.
Thanks!
Thanks for the update @sfkpmr, and thanks for the detailed explanation @bastimeyer!