on-demand transcoding with concurrency limit

This commit is contained in:
Carl Pearson
2024-10-18 15:21:33 -06:00
parent da720508b1
commit 459e899efe
9 changed files with 241 additions and 134 deletions

26
transcodes/transcode.go Normal file
View File

@@ -0,0 +1,26 @@
package transcodes
import (
"time"
"gorm.io/gorm"
)
type Transcode struct {
gorm.Model
Status string // "pending", "running", "failed"
SrcID uint // Video.ID or Audio.ID of the source file
OriginalID uint // Original.ID
SrcKind string // "video", "audio"
DstKind string // "video", "audio"
TimeSubmit time.Time
TimeStart time.Time
// video fields
Height uint // target height
Width uint // target width
FPS float64 // target FPS
// audio & video fields
Kbps uint
}