I have an M3U8 file saved locally.
How can I download the video from this file?
The movie can be easily downloaded using the FFmpeg command line tool:
ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i my_movie.m3u8 -c copy my_movie.ts
Note that if the .m3u8 file was downloaded from the Internet and contains relative URLs, those URLs will need to be converted to absolute URLs. For example, seg-1-v1-a1.ts
→ http://videosource.site/seg-1-v1-a1.ts
. Since .m3u8 is a textual format, one option would be to find/replace those values, either from the command line or a text editor.
ffmpeg -i "http://videosource.site/video.m3u8" output.ts
. FFMpeg will automatically work out the URLs for each individual file and download them. – Haxiel Jan 24 '22 at 09:03