Prerequesites
Step 1 : Find the file which looks like to playlist.m3u8
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.
Step 2 : Find segment track files URL
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.
Step 3 : Edit the playlist.m3u8 file
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
Step 4 : Open and convert with VLC
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.
Step 5 : Merge the audio and video track together
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
Alternatives
Links
https://stackoverflow.com/questions/29876518/how-to-download-video-from-m3u8-file
Top comments (0)