First of all, go to the website with the streaming video and launch it.
If you inspect with the Chrome Devtools, you will see a blob link (which is not allowed to directly download)
Go to the Network panel and find a file which looks like to playlist.m3u8 and download it.
Stay at the Network panel and find at least two segment files.
Sometimes you could find one segment for the audio track and one for the video track.
Open the file with a Text Editor (Notepad, Sublime Text, etc)
You will see several lines with the relative URL chop/segment. Append the full URL of the segment track.
You need to do it twice. (audio track / video track)
seg-1-v1-a1.ts → http://videosource.site/seg-1-v1-a1.ts
Open VLC and go the File > Convert/Stream .
Drag&Drop the playlist.m3u8 file as the media source.
- Select Customize profile and set Encapsulation: MP4/MOV, Video and Audio: "Keep original …".
Apply and then specify the output filename.
Click to Save as File and wait until the converted file finished.
After converted with VCL (twice if you have the audio and video track splitted)
Run this command with ffmpeg :
./ffmpeg -i video.m4v -i audio.m4a -acodec copy -vcodec copy merged-output.mp4