Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to download and decrypt HTTP Live Streaming (HLS) videos in iOS?

Tags:

I want to download M3U8 file chunks (HLS) and store that video (after decrypting it) for later viewing. I have made a demo to play M3U8 file but I want to download video data for later view.

like image 205
NSPratik Avatar asked Jul 04 '16 12:07

NSPratik


People also ask

How do I download HLS stream files?

It's very simple to use. Just open 9XBUDDY website by inputting https://9xbuddy.com/ in any browser, copy and paste the HLS video URL or M3U8 link, click "DOWNLOAD NOW" button after it displays all available video streams.

Does HLS work on iOS?

Send live and on‐demand audio and video to iPhone, iPad, Mac, Apple Watch, Apple TV, and PC with HTTP Live Streaming (HLS) technology from Apple. Using the same protocol that powers the web, HLS lets you deploy content using ordinary web servers and content delivery networks.

Is HLS encrypted?

HLS encryption delivers secure multiple bitrate encoding wherein each rendition and each segment of each rendition is protected in multiple ways. HLS encrypted videos are available for play on desktop and mobile devices when the first rendition of a video is uploaded and encrypted.


1 Answers

You can use ffmpeg to download and decode the HTTP-LS stream:

ffmpeg -i http://example.org/playlist.m3u8 -c copy -bsf:a aac_adtstoasc output.mp4

There is an iOS version of ffmpeg available.

like image 132
niutech Avatar answered Oct 14 '22 00:10

niutech