Documentation
¶
Index ¶
- Constants
- Variables
- func DistributeByHash(dirs []string, hash string) (string, error)
- func GetDir(location string, hash string) (string, error)
- func NewBufferedResponseWrtier(w http.ResponseWriter) *bufferedResponseWriter
- func RegisterCommonFlags(f []cli.Flag) []cli.Flag
- func RegisterContentProberFlags(f []cli.Flag) []cli.Flag
- func RegisterHLSFlags(f []cli.Flag) []cli.Flag
- func RegisterWebFlags(f []cli.Flag) []cli.Flag
- type ContentProbe
- type HLS
- type HLSBuilder
- type HLSConfig
- type HLSStream
- func (h *HLSStream) GetCodecParams() []string
- func (h *HLSStream) GetFFmpegParams(out string) []string
- func (h *HLSStream) GetLanguage() string
- func (h *HLSStream) GetName() string
- func (h *HLSStream) GetPlaylistName() string
- func (h *HLSStream) GetPlaylistPath(out string) string
- func (h *HLSStream) GetSegmentExtension() string
- func (h *HLSStream) GetSegmentFormat() string
- func (h *HLSStream) MakeMasterPlaylist() string
- type PlayerData
- type Rendition
- type StreamMode
- type StreamType
- type TouchMap
- type TranscodePool
- type Transcoder
- type Web
Constants ¶
View Source
const ( OutputDirContext contextKey = iota SourceURLContext )
View Source
const (
HLSAACCodecFlag = "hls-aac-codec"
)
View Source
const (
OutputFlag = "output"
)
Variables ¶
View Source
var DefaultRenditions = []Rendition{ { Height: 240, DefRate: 500, Required: true, }, { Height: 360, DefRate: 1000, Required: true, }, { Height: 480, DefRate: 2500, }, { Height: 720, DefRate: 5000, }, { Height: 1080, DefRate: 8000, }, }
https://support.google.com/youtube/answer/1722171?hl=en#zippy=%2Cbitrate
Functions ¶
func NewBufferedResponseWrtier ¶
func NewBufferedResponseWrtier(w http.ResponseWriter) *bufferedResponseWriter
Types ¶
type ContentProbe ¶
type ContentProbe struct {
lazymap.LazyMap[*cp.ProbeReply]
// contains filtered or unexported fields
}
func NewContentProbe ¶
func NewContentProbe(c *cli.Context) *ContentProbe
func (*ContentProbe) Get ¶
func (s *ContentProbe) Get(input string, out string) (*cp.ProbeReply, error)
type HLS ¶
type HLS struct {
// contains filtered or unexported fields
}
func (*HLS) MakeMasterPlaylist ¶
type HLSBuilder ¶
type HLSBuilder struct {
// contains filtered or unexported fields
}
func NewHLSBuilder ¶
func NewHLSBuilder(c *cli.Context) *HLSBuilder
func (*HLSBuilder) Build ¶
func (s *HLSBuilder) Build(in string, probe *cp.ProbeReply) *HLS
type HLSStream ¶
type HLSStream struct {
// contains filtered or unexported fields
}
func NewHLSStream ¶
func (*HLSStream) GetCodecParams ¶
func (*HLSStream) GetFFmpegParams ¶
func (*HLSStream) GetLanguage ¶
func (*HLSStream) GetPlaylistName ¶
func (*HLSStream) GetPlaylistPath ¶
func (*HLSStream) GetSegmentExtension ¶
func (*HLSStream) GetSegmentFormat ¶
func (*HLSStream) MakeMasterPlaylist ¶
type PlayerData ¶
type PlayerData struct {
SourceURL string
}
type StreamType ¶
type StreamType string
const ( Audio StreamType = "a" Video StreamType = "v" Subtitle StreamType = "s" )
type TouchMap ¶
func NewTouchMap ¶
func NewTouchMap() *TouchMap
type TranscodePool ¶
func NewTranscodePool ¶
func NewTranscodePool() *TranscodePool
func (*TranscodePool) IsDone ¶
func (s *TranscodePool) IsDone(out string) bool
func (*TranscodePool) IsTranscoding ¶
func (s *TranscodePool) IsTranscoding(out string) bool
type Transcoder ¶
type Transcoder struct {
// contains filtered or unexported fields
}
func NewTranscoder ¶
func NewTranscoder(out string, h *HLS) *Transcoder
func (*Transcoder) Run ¶
func (s *Transcoder) Run() (err error)
func (*Transcoder) Stop ¶
func (s *Transcoder) Stop() error
type Web ¶
type Web struct {
// contains filtered or unexported fields
}
func NewWeb ¶
func NewWeb(c *cli.Context, contentProbe *ContentProbe, hlsBuilder *HLSBuilder, transcodePool *TranscodePool, touchMap *TouchMap) *Web
Click to show internal directories.
Click to hide internal directories.