JOCHLSDownloader (Ruby gem)

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.

  You can download the JOCHLSDownloader (Ruby version) from: Gem Version

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 Response to JOCHLSDownloader (Ruby gem)

  1. Pingback: Trim HLS stream with frame accuracy using ffmpeg and Bash script | JORDI CENZANO

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: