m3u8 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/m3u8/playlist.rb +11 -8
- data/lib/m3u8/version.rb +1 -1
- data/m3u8.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10053d8ebe04216b38b3853f64042f566e649ba8
|
4
|
+
data.tar.gz: 0d485697ea68989dfae63eb50fe0eb2cee9b37f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 852df594c23783213b96b003c90d72f26a27de4f1e172b619d4d859ab511cca0ad527a247ab73bc7d2b85a51b4439ec0b2b6c6fa00223320bebe511f51ec807a
|
7
|
+
data.tar.gz: 1b5f1fe3a50b326468d289d597cc34a32f4bae3fa35ca67c7a1c5612e97a4d330214c62da2a64e1289407abeffbc440cad3f962a807a4586ea46f008d19a3630
|
data/README.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/m3u8.svg)](http://badge.fury.io/rb/m3u8)
|
2
|
+
[![Build Status](https://travis-ci.org/sethdeckard/m3u8.svg?branch=master)](https://travis-ci.org/sethdeckard/m3u8)
|
3
|
+
[![Coverage Status](https://coveralls.io/repos/sethdeckard/m3u8/badge.png)](https://coveralls.io/r/sethdeckard/m3u8)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/sethdeckard/m3u8/badges/gpa.svg)](https://codeclimate.com/github/sethdeckard/m3u8)
|
5
|
+
[![Dependency Status](https://gemnasium.com/sethdeckard/m3u8.svg)](https://gemnasium.com/sethdeckard/m3u8)
|
1
6
|
# m3u8
|
2
7
|
|
3
8
|
m3u8 provides generation of m3u8 playlists used the [HTTP Live Streaming](https://developer.apple.com/library/ios/documentation/networkinginternet/conceptual/streamingmediaguide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008332-CH1-SW1) (HLS) specification created by Apple. This is useful if you wish to generate m3u8 playlists on the fly in your web application (to integrate authentication, do something custom, etc) while of course serving up the actual MPEG transport stream files (.ts) from a CDN. You could also use m3u8 to generate playlist files as part of an encoding pipeline.
|
@@ -20,6 +25,7 @@ Or install it yourself as:
|
|
20
25
|
|
21
26
|
## Usage
|
22
27
|
|
28
|
+
|
23
29
|
require 'm3u8'
|
24
30
|
|
25
31
|
#create a master playlist and add child playlists for adaptive bitrate streaming:
|
data/lib/m3u8/playlist.rb
CHANGED
@@ -128,15 +128,18 @@ module M3u8
|
|
128
128
|
end
|
129
129
|
|
130
130
|
def video_codec profile, level
|
131
|
-
|
132
|
-
return
|
133
|
-
return 'avc1.42001f' if profile.downcase == 'baseline' and level == 3.1
|
134
|
-
return 'avc1.77.30' if profile.downcase == 'main' and level == 3.0
|
135
|
-
return 'avc1.4d001f' if profile.downcase == 'main' and level == 3.1
|
136
|
-
return 'avc1.4d0028' if profile.downcase == 'main' and level == 4.0
|
137
|
-
return 'avc1.64001f' if profile.downcase == 'high' and level == 3.1
|
138
|
-
return 'avc1.640028' if profile.downcase == 'high' and (level == 4.0 or level == 4.1)
|
131
|
+
if profile.nil? or level.nil?
|
132
|
+
return
|
139
133
|
end
|
134
|
+
|
135
|
+
profile = profile.downcase
|
136
|
+
return 'avc1.66.30' if profile == 'baseline' and level == 3.0
|
137
|
+
return 'avc1.42001f' if profile == 'baseline' and level == 3.1
|
138
|
+
return 'avc1.77.30' if profile == 'main' and level == 3.0
|
139
|
+
return 'avc1.4d001f' if profile == 'main' and level == 3.1
|
140
|
+
return 'avc1.4d0028' if profile == 'main' and level == 4.0
|
141
|
+
return 'avc1.64001f' if profile == 'high' and level == 3.1
|
142
|
+
return 'avc1.640028' if profile == 'high' and (level == 4.0 or level == 4.1)
|
140
143
|
end
|
141
144
|
|
142
145
|
def resolution width, height
|
data/lib/m3u8/version.rb
CHANGED
data/m3u8.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["seth@deckard.me"]
|
11
11
|
spec.summary = %q{Generate m3u8 playlists for HTTP Live Streaming (HLS).}
|
12
12
|
spec.description = %q{Generate m3u8 playlists for HTTP Live Streaming (HLS).}
|
13
|
-
spec.homepage = ""
|
13
|
+
spec.homepage = "https://github.com/sethdeckard/m3u8"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: m3u8
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Deckard
|
@@ -73,7 +73,7 @@ files:
|
|
73
73
|
- m3u8.gemspec
|
74
74
|
- spec/playlist_spec.rb
|
75
75
|
- spec/spec_helper.rb
|
76
|
-
homepage:
|
76
|
+
homepage: https://github.com/sethdeckard/m3u8
|
77
77
|
licenses:
|
78
78
|
- MIT
|
79
79
|
metadata: {}
|