running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
| // | |
| // DebugDevice.swift | |
| // | |
| // Copyright 2022 • Sidetrack Tech Limited | |
| // | |
| import Foundation | |
| // This must be called on the main-thread. | |
| var isDebugProfileInstalled: Bool { |
| import UIKit | |
| extension UIView { | |
| var allSubviews: [UIView] { | |
| subviews + subviews.flatMap { $0.allSubviews } | |
| } | |
| func firstSubview<T: UIView>(of type: T.Type) -> T? { | |
| allSubviews.first { $0 is T } as? T |
| /** | |
| * MacEditorTextView | |
| * Copyright (c) Thiago Holanda 2020-2025 | |
| * https://bsky.app/profile/tholanda.com | |
| * | |
| * (the twitter account is now deleted, please, do not try to reach me there) | |
| * https://twitter.com/tholanda | |
| * | |
| * MIT license |
running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
Direct copy of pre-encoded file:
$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8
| let API_HEADER_FIELD_NONE_MATCH : String = "If-None-Match" | |
| let API_HEADER_FIELD_ETAG : String = "Etag" | |
| let API_REQUEST_SUCCESS : Int = 200 | |
| func ETagForURL(urlString: String) -> String? { | |
| // return the saved ETag value for the given URL | |
| return NSUserDefaults.standardUserDefaults().objectForKey(urlString) as String? | |
| } | |