Well, i don't know if this is quite the website for this kind of subjects, but let's get on topic ^^
It really depends on the origin of the stream, many stream providers have a different way of delivering the video with different encryption aswell, so you would really have to be more specific... But you could probably google it anyway...
A solution that would always work is some screencapture software, but it's hard to find something that offers proper quality.
i did now. but is it works with any online video site? looks like i need to download a software from that site to download any video like in youtube etc
Seems that someone already suggested keepvid.com.
If you have a Telegram account, I would suggest also some bot there, like @utubebot to download from YouTube, or @FBvidzBot to download from Facebook.
There is a certain home media centre app with a plugin formerly called Genesis that will do exactly what you're asking. You'll have to google to find out more, I cannot be more specific.
Use idm (Internet Download Manager) it is a powerfull downloader tool (fastest i should say) ...it can capture and download videos from any online streaming site...I personally use it a lot for downloading youtube videos.
For youtube i used keevid, it is free and it can also convert the video to mp3. If you are using android, you can use tubemate to download video from youtube using your android device.
For windows software client I use Internet Download Manager.