Documentation
¶
Index ¶
Constants ¶
View Source
const ( MP4 = "video/mp4" MKV = "video/x-matroska" WebM = "video/webm" AVI = "video/x-msvideo" MOV = "video/quicktime" HLS = "application/x-mpegURL" )
Variables ¶
View Source
var HLSInputArgs = []string{
"-allowed_extensions", "ALL",
"-allowed_segment_extensions", "ALL",
"-extension_picky", "0",
"-seg_format_options", "extension_picky=0",
}
HLSInputArgs contains ffmpeg/ffprobe flags that relax extension checks for HLS playlists and DASH manifests.
Functions ¶
func DetectFromExtension ¶
DetectFromExtension returns a content type based on the URL's file extension, or empty string if unrecognized.
func DetectFromMIME ¶
DetectFromMIME returns a content type based on a confirmed MIME type, or empty string if unrecognized.
func FormatHTTPHeaders ¶
FormatHTTPHeaders formats a map of headers into the ffmpeg/ffprobe -headers flag value: "Key: Value\r\nKey2: Value2\r\n".
func FormatToContentType ¶
FormatToContentType maps an ffprobe format_name to a content type.
Types ¶
type FormatInfo ¶
FormatInfo describes an output format.
func LookupFormat ¶
func LookupFormat(name string) (FormatInfo, bool)
LookupFormat returns format info for an ffmpeg output format name.
type StreamInfo ¶
StreamInfo holds metadata returned by ffprobe for a stream.
Click to show internal directories.
Click to hide internal directories.