api.go cli.go dash.go downloader.go drm.go hls.go orchestrator.go resume.go
var StopKey = true
StopKey enables the interactive stop: press q (plus Enter on a normal terminal) to cleanly stop the download. Set to false when stdin is not a keyboard — tests, daemons, or programs that read stdin themselves. One download per process is assumed. Read once at download start.
func DashBitrate(streamId string, manifestData *Manifest) error
DashBitrate logs the actual average bitrate of a DASH stream, measured by dividing the total content length of each representation's media file by the total presentation duration. Only representations with a BaseURL and a server that reports content length are supported.
func DashDownload(streamId string, manifestData *Manifest, optionsData *Options) error
func HlsDownload(streamId int, manifestData *Manifest, optionsData *Options) error
type Cache string
func (c Cache) Decode(values ...CacheValue) error
func (c Cache) Encode(values ...CacheValue) error
func (c *Cache) Setup() error
type CacheValue interface { CachePath() string }
type DrmSystem int
const (
DrmNone DrmSystem = iota
DrmPlayReady
DrmWidevine
)
type Flag struct { Name string Usage string Value FlagValue Needs string // contains filtered or unexported fields }
type FlagBool bool
func (b FlagBool) Default() string
func (FlagBool) Example() string
func (b *FlagBool) Parse(value string) error
func (FlagBool) Type() string
type FlagInt int
func (i FlagInt) Default() string
func (FlagInt) Example() string
func (i *FlagInt) Parse(value string) error
func (FlagInt) Type() string
type FlagSet []*Flag
func (set FlagSet) IsSet(value FlagValue) bool
func (set FlagSet) Parse(args []string) error
func (set FlagSet) Usage(w io.Writer, name string) error
type FlagString string
func (s FlagString) Default() string
func (FlagString) Example() string
func (s *FlagString) Parse(value string) error
func (FlagString) Type() string
type FlagValue interface { Parse(string) error Type() string Default() string Example() string }
type Manifest struct { Url *url.URL Body []byte }
func DashList(baseUrl *url.URL) (*Manifest, error)
func HlsList(baseUrl *url.URL) (*Manifest, error)
func (*Manifest) CachePath() string
type Options struct { Drm DrmSystem Device string License func([]byte) ([]byte, error) }