Documentation ¶
Index ¶
- Constants
- func ExtractThumb(moviePath, thumbPath string, seconds int) error
- func GetVTTFileName(srtFileName string) string
- func Identify(basePath string, file os.FileInfo) ([]MovieDirInfo, []SubDirInfo, error)
- func IsTextSrt(path string) bool
- func ProcessSrt(db *gorm.DB, movie *models.Movie, appDir string) error
- func ScanDir(path string) ([]MovieDirInfo, []SubDirInfo, error)
- type MovieDirInfo
- type SubDirInfo
- type TranscodingError
Constants ¶
View Source
const (
// ExtractionDirName store directory name of extracted HLS files
ExtractionDirName = "generated_hls"
)
Variables ¶
This section is empty.
Functions ¶
func ExtractThumb ¶
ExtractThumb will extract thumbnail image from video file
func GetVTTFileName ¶ added in v1.2.0
GetVTTFileName will return .vtt file based on given file name with ext
func Identify ¶
func Identify(basePath string, file os.FileInfo) ([]MovieDirInfo, []SubDirInfo, error)
Identify single directory of movie
func ProcessSrt ¶ added in v1.2.0
ProcessSrt will detect .srt files on DB and convert it into .vtt to extracted movie dir
func ScanDir ¶
func ScanDir(path string) ([]MovieDirInfo, []SubDirInfo, error)
ScanDir will return flat list of Movie directory information
Types ¶
type MovieDirInfo ¶
type MovieDirInfo struct { Dir string MovieFile string MovieSize float64 Info os.FileInfo MimeType string }
MovieDirInfo is a holder to keep movie directory information
type SubDirInfo ¶ added in v1.2.0
SubDirInfo is a holder to subtitle information
type TranscodingError ¶ added in v1.2.0
TranscodingError will hold the error information after transcoding process finished
func DoExtraction ¶
func DoExtraction(movie *models.Movie, cfg *config.ServerConfig) (bool, []TranscodingError)
DoExtraction will do extract HLS files
func ExtractMovHLS ¶
func ExtractMovHLS(movieFilePath, destDir, ffmpegPathBin string, reso []string) (bool, []TranscodingError)
ExtractMovHLS will generate HLS files
Click to show internal directories.
Click to hide internal directories.