The JOCHLSDownloader ruby gem is a very simple native ruby code that downloads all files linked by a m3u8 manifest (used in HLS), I have used several times for test purposes.
Note:
- For LIVE and EVENT playlist types it downloads only the firsts media segments.
- For VOD playlist type it will download all media content.
Usage examples
require 'JOCHLSDownloader.rb'
#URL from HLS apple example
url = "https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8"
downloadpath = "./donloadtestfiles"
logfilename = "jochlsdownloader.log"
begin
hlsdownloader = CJOCHLSDownloader.new(url, downloadpath, logfilename, Logger::DEBUG)
hlsdownloader.startdownload
puts "End!"
rescue Exception => e
puts "Error: #{e.message}, Trace: #{e.backtrace.inspect}"
end
One thought on “JOCHLSDownloader (Ruby gem)”