m3u8 to mp4 downloader and converter for Windows and Android

As explained in the previous article that to download and convert m3u8 files to/as mp4 then we need more than one software because a software does not always work well.

Here I recommend you to use software and applications, and not to use the m3u8 downloader and converter site.

Based on experience, I have tried converting m3u8 files on several converter sites and the results are nil, none of these sites can convert m3u8 files, either through file uploads or through URL inserts.

Therefore you need software and applications that must be downloaded first and then installed on the device either on a PC or Android.

Not only that, especially for PC users, I will also recommend a browser extension to make it easier to retrieve the m3u8 file link URL.

Okay, here are the necessary software and applications that have been tested by me on Windows 7 laptop and Android 11 phone.

m3u8 downloader for Windows 7

ffmpeg

This software can be used to download m3u8 as mp4 by using a single command line run via CMD so we don't have to work twice to download and convert because ffmpeg will automatically convert and merge chunks of .ts video files into mp4.

In addition, ffmpeg can do other things with video files stored on PC device storage such as convert video file from one extension to another, create m3u8 file from a video file, or even convert m3u8 files to mp4, mkv, avi and so on. ffmpeg can also be used for audio.

But for those features, I don't understand it yet. So for now I just use ffmpeg to download m3u8 as mp4 directly from URL although it doesn't always work.

ffmpeg software can be obtained for free. And to get it, you can visit the official website of the developer at this link: ffmpeg official and select the ffmpeg-git-full version.

But please note that for Windows, the latest release of this software only supports 64bit, while for 32bit you can get it at this link: ffmpeg for Windows 32bit

Installing ffmpeg on Windows PC

After the software is successfully downloaded, extract the file using Winrar or other similar programs. After that, run CMD and enter the following command:

setx /m PATH "C:\ffmpeg\bin;%PATH%"

Click Enter and wait for the installation process to complete. After that, restart your Windows PC.

If the PC has restarted then the next step is to check the version of ffmpeg by re-opening CMD and entering the following command:

ffmpeg -version

Click Enter and see the result. If the installed version is correct then CMD will show SUCCESS. Otherwise, if it is false then CMD will show an error message.

Using ffmpeg to download m3u8 on Windows PC

Open CMD, then enter the following command:

ffmpeg -i "http://example.com/video_url.m3u8" -c copy -bsf:a aac_adtstoasc output.mp4

You need to change the URL http://example.com/video_url.m3u8 with your m3u8 URL.

Click Enter and see the result. If it works then ffmpeg will continue to run the process in CMD. But if not, a red error message will appear on CMD.

The above command function is to download the m3u8 file and automatically convert it to mp4. This command, according to davd.io can be used to download encrypted m3u8 files. According to my experience, it's true, it can download encrypted m3u8, but it only works on some files. Maybe this is due to the different encryption keys on each m3u8 file.

As for other commands, you can get references on other sites including forums like Stackoverflow.

The downloaded file will be saved in the ffmpeg installation folder which is precisely in the bin folder.

Meanwhile, if you fail to download the m3u8 file using the command I showed above then you can try using VLC media player software.

VLC media player

VLC software can play not only video stored on the device but can also play HLS m3u8 video directly from URL, and it can also convert m3u8 files to mp4.

Actually, the VLC conversion method is similar to ffmpeg, that is by converting chunks of ts video files to mp4 and then combining them into video files. However, in practice what I have done is through files and not through URL.

Therefore, we have to download the m3u8 file first and save it on the PC device storage. And to download the m3u8 file we can use an easy way by using a browser extension which will be explained below.

Using VLC to convert m3u8 files

If you don't have VLC yet, please get one for free via the official VideoLAN website here: VLC for Windows

1. Run VLC, select Media tab. In the options that appear, select Convert/Save.

2. In the window that appears, make sure that the selected tab is File. Then, to the right of the column, click the Add button.

3. Find and select the m3u8 file you want to convert. After that, at the bottom, click the Convert/Save button.

4. Select the profile that will be the result of the conversion which is generally H.264 for video files, while the other options do not need to be set. Then specify the storage where the results will be stored.

5. Finally, click the Start button and wait for the conversion process to complete.

Notes

You need to know that the conversion process using VLC takes a very long time than downloading using ffmpeg.

m3u8 and mp4 downloader browser extension

I use CocoCut browser extension which can be installed on Chromium browsers such as Google Chrome and Yandex Alpha, and can be found on Chrome Web Store.

But it would be better if you use Google Chrome because if the extension detects the mp4 video then Yandex Alpha sometimes can't download it but will play it instead.

Once the extension is installed, make sure you enable it. After that, visit the website that displays the HLS m3u8 video, then click the play button on the video.

Look at the extension, there will be some detected media files which are usually m3u8 and mp4.

But you need to know that video type ads also use these two file extensions. Therefore, to determine which file is the main video file, look at the name in the URL by clicking on the media file name to display the file URL address.

In URL address, the main video file usually has name "index" preceded by a quality name such as file_360/index.m3u8, or URL prefix indicating the host of the file and not the host of the ad provider.

As for mp4 media files, the main video files generally have a larger size.

If the main file can be determined then we can click on the available download icon until the page will be redirected to the downloader page. However, don't be surprised if some m3u8 files can't be downloaded, either as mp4 or as m3u8 files, and this usually happens on encrypted m3u8 files.

To solve this problem is to copy the file address and then open it in a new browser tab so that the browser will automatically downloads the file. However, if the browser fails to download and instead displays a page containing an error message, then we have to do another trick with a different type of device which in this experiment I use android.

m3u8 downloader for Android

UC Browser - Turbo

In the experiment that I have done, I use UC Turbo because this browser can also be used to download HLS m3u8 videos.

To do so, we need to run UC Turbo browser and visit the address of the page that displays the HLS m3u8 video. After that, we may need to play the video so that the browser can display options next to the video. We may need to play the video for about 3 to 5 minutes, because if not then the browser might download only m3u8 files without chunks of video.

If there is a download icon then we only need to click on the icon so that the browser will automatically download the file, whether it's mp4 or m3u8.

If the downloaded file is m3u8 then the browser will download an m3u8 file along with a folder containing all the chunks of video files. But, the video file will not have any extension, whether it's .ts or .html and so on. Instead, it's just a file with an unknown extension.

Note

When you are going to download the m3u8 file, set the downloaded storage to internal so that when it is converted later, there will be no errors.

Especially for Android 10 and later, the folder where the downloaded files are stored may be hidden by the system. Therefore, we need a third-party file manager application such as ZArchiver or RAR (winrar for Android) to browse the files.

But even so, HLS m3u8 videos that have been downloaded will be able to be played even if only in UC browser and not on other video player devices. And to start playing it we have to open the UC browser first, then go to the download menu. In the download list, click the video file that you want to play.

To convert the downloaded m3u8 file, we need a third-party converter application.

m3u8 to mp4 converter for Android

Not many apps can actually convert m3u8 files to mp4. But one that really can is Media Converter app.

In the previous version update, there was an error in this app which caused it to be unable to perform the conversion, which is why this app got a low rating. But as of the current latest version (v 1.2.5), it can be used to convert m3u8 to mp4 again, and you can get it on Google Play Store.

1. Install and open converter app, allow app to access storage.

2. Before we start, we need to set a few things in the app settings like Scan folder, Output folder, and Video profile.

3. To convert, click the File tab. There will be a list of m3u8 files along with the video chunks folder. We just need to select and click on the file that has the extension m3u8. Then the video preview may appear and the video plays automatically.

4. Look at the bottom. On the far left, we can set the video codec which is generally mp4 - h264. And on the far right (the Start button) is to start the conversion.

If it is successful, look for the converted file which by default will be saved in Device storage » Android » Media Converter. If you're on Android 10 and above, and can't find the folder then try browsing it using a third-party file manager.

The size of the converted file will swell to be about 4 times larger. The conversion time duration when using this application is faster than using VLC on Windows.

© aLeziana

Tentang Penulis :

Hai, Saya adalah seorang blogger yang senang mempelajari berbagai macam hal, terutama seni, teknologi, dan ilmu pengetahuan umum. Saya membuat blog ini bertujuan untuk berbagi hal yang bermanfaat, termasuk hal yang telah saya pelajari.

Artikel Terkait

Post Terbaru Post Sebelumnya

Tidak ada komentar:

Posting Komentar