Skip to content

Commit

Permalink
Use utils.ExtensionByMimeType for video encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
vas3k authored Jul 27, 2022
1 parent 0cd6f89 commit bb4d0f6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pepic/processing/video.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/xfrr/goffmpeg/transcoder"
"io/ioutil"
"log"
"mime"
"os"
"path"
)
Expand Down Expand Up @@ -105,7 +104,7 @@ func (v *videoBackend) Convert(file *entity.ProcessingFile, newMimeType string)
}

// create temp file output
ext, _ := mime.ExtensionsByType(newMimeType)
ext, _ := utils.ExtensionByMimeType(newMimeType)
newExt := ext[0]
convFilename := utils.ReplaceExt(file.Filename, newExt)
tempTransFile := path.Join(config.App.Videos.FFmpeg.TempDir, fmt.Sprintf("conv_%s", convFilename))
Expand Down

0 comments on commit bb4d0f6

Please sign in to comment.