How to Download M3U8 Video with FFmpeg (HLS Videos)
Over the past few years, more and more video streaming services are adopting HTTP Live Streaming (HLS) protocol to better serve the video content. The best thing about HLS is that it is an adaptive streaming protocol. Which simply means that the video streaming can be automatically adjusted for better video playback experience by dividing the video file into multiple smaller chunks with different data rates.
Though HLS improves the video playback experience, one downside of it is that you cannot directly download the video. In fact, you cannot find the direct download link to the video file.
If you act clever and you use some sort of browser extension, all you get is a manifest file with .M3U8 extension. That is not the video file you are looking for.
But, all is not lost. There are many online services that let you download HLS videos without any hassle. However, why depend on a third party web service when you can use FFmpeg, a free and open-source software to download the video?
In case you are wondering, here's how to download M3U8 video files with FFmpeg.
Download M3U8 Video with FFmpeg
Downloading HLS videos with FFmpeg is way easier than you think. All you have to do is execute a single line command. Since all most all the video streaming services use web-optimized video MP4 format, we are going to download M3U8 video files with FFmpeg and convert them to MP4 format.
2. Next, go to the streaming site from where you want to download and grab the M3U8 video URL. For ease of use, you can use free extensions like Video DownloadHelper available for both Chrome and Firefox to grab the M3U8 file. For Edge, you can try Video Downloader Professional.
3. Now, open the PowerShell or Command Prompt by searching for it in the start menu.
4. Once you have opened the command line tool and have the M3U8 video URL, replace
in the below command with the actual M3U8 video URL and execute it. If you want to, you can customize the output file name by changing
ffmpeg -i "http://example.com/video_url.m3u8" -c copy -bsf:a aac_adtstoasc "output.mp4"
5. As soon as you execute the command, FFmpeg starts the downloading process. i.e, it downloads each individual
file and adds them to create a single .mp4 video files. So, depending on the video length and speed of your internet connection, it can take some time to complete the downloading procedure.
6. Once the procedure has been completed, you can go to the destination folder to see the output file. In my case, the destination folder is
That's all there is to do and it is that simple to download M3U8 video with FFmpeg. If you face any problems while following the procedure, comment below and I will try to help you.