Remove custom paths and add constants (#216)
This commit is contained in:
@@ -39,8 +39,8 @@ func StartThumbnailGenerator(chunkPath string, variantIndex int) {
|
||||
|
||||
func fireThumbnailGenerator(chunkPath string, variantIndex int) error {
|
||||
// JPG takes less time to encode than PNG
|
||||
outputFile := path.Join("webroot", "thumbnail.jpg")
|
||||
previewGifFile := path.Join("webroot", "preview.gif")
|
||||
outputFile := path.Join(config.WebRoot, "thumbnail.jpg")
|
||||
previewGifFile := path.Join(config.WebRoot, "preview.gif")
|
||||
|
||||
framePath := path.Join(chunkPath, strconv.Itoa(variantIndex))
|
||||
files, err := ioutil.ReadDir(framePath)
|
||||
|
||||
@@ -188,15 +188,15 @@ func NewTranscoder() Transcoder {
|
||||
var outputPath string
|
||||
if config.Config.S3.Enabled {
|
||||
// Segments are not available via the local HTTP server
|
||||
outputPath = config.Config.GetPrivateHLSSavePath()
|
||||
outputPath = config.PrivateHLSStoragePath
|
||||
} else {
|
||||
// Segments are available via the local HTTP server
|
||||
outputPath = config.Config.GetPublicHLSSavePath()
|
||||
outputPath = config.PublicHLSStoragePath
|
||||
}
|
||||
|
||||
transcoder.segmentOutputPath = outputPath
|
||||
// Playlists are available via the local HTTP server
|
||||
transcoder.playlistOutputPath = config.Config.GetPublicHLSSavePath()
|
||||
transcoder.playlistOutputPath = config.PublicHLSStoragePath
|
||||
|
||||
transcoder.input = utils.GetTemporaryPipePath()
|
||||
transcoder.segmentLengthSeconds = config.Config.GetVideoSegmentSecondsLength()
|
||||
|
||||
Reference in New Issue
Block a user