Documentation
¶
Index ¶
Constants ¶
View Source
const ( TypeHLS = "hls" TypeDASH = "dash" TypeRange = "range" FPS30 = 30 FPS60 = 60 )
Variables ¶
View Source
var ( UHD4K = Resolution{Height: 2160} QHD2K = Resolution{Height: 1440} HD1080 = Resolution{Height: 1080} HD720 = Resolution{Height: 720} SD480 = Resolution{Height: 480} SD360 = Resolution{Height: 360} SD240 = Resolution{Height: 240} )
Commonly defined resolutions
View Source
var H264 = Codec{ Format{UHD4K, Bitrate{FPS30: 18000, FPS60: 28000}}, Format{QHD2K, Bitrate{FPS30: 10000, FPS60: 16000}}, Format{HD1080, Bitrate{FPS30: 2000, FPS60: 3200}}, Format{HD720, Bitrate{FPS30: 1200, FPS60: 2000}}, Format{SD360, Bitrate{FPS30: 400, FPS60: 640}}, }
H264 codec with its suggested bitrates
View Source
var Resolutions = []Resolution{ UHD4K, QHD2K, HD1080, HD720, SD480, SD360, SD240, }
Functions ¶
func GetVideoStream ¶ added in v0.4.3
func GetVideoStream(meta *ffmpeg.Metadata) transcoder.Streams
func SetLogger ¶
func SetLogger(l *zap.SugaredLogger)
Types ¶
type Codec ¶
type Codec []Format
func (Codec) CustomFormat ¶ added in v0.4.2
func (c Codec) CustomFormat(r Resolution) Format
CustomFormat generates a Format for non-standard resolutions, calculating optimal bitrates (note: it should be calculated better).
type Format ¶
type Format struct { Resolution Resolution Bitrate Bitrate }
func (Format) GetBitrateForFPS ¶
type Resolution ¶
type Resolution struct {
Width, Height int
}
Click to show internal directories.
Click to hide internal directories.