Add eac3 to list of supported codecs

This commit is contained in:
Zoe Roux 2024-05-12 17:47:21 +02:00
parent cd46050c94
commit 83b1c6b398
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package src
import (
"cmp"
"fmt"
"log"
"strings"
"github.com/zoriya/go-mediainfo"
@ -118,11 +119,16 @@ func GetMimeCodec(mi *mediainfo.File, kind mediainfo.StreamKind, i int) *string
ret := "mp4a.a5"
return &ret
case "audio/eac3", "E-AC-3":
ret := "mp4a.a6"
return &ret
case "audio/x-flac", "FLAC":
ret := "fLaC"
return &ret
default:
log.Printf("No known mime format for: %s", codec)
return nil
}
}

View File

@ -19,7 +19,7 @@ var safe_path = src.GetEnvOr("GOCODER_SAFE_PATH", "/video")
// Encode the version in the hash path to update cached values.
// Older versions won't be deleted (needed to allow multiples versions of the transcoder to run at the same time)
// If the version changes a lot, we might want to automatically delete older versions.
var version = "v1."
var version = "v2-"
func GetPath(c echo.Context) (string, string, error) {
key := c.Param("path")