68ba289d6c
Replaces "photoprism config", which could only display current configuration values. Codecs and file formats have been refactored along the way. Signed-off-by: Michael Mayer <michael@liquidbytes.net>
58 lines
811 B
Go
58 lines
811 B
Go
package video
|
|
|
|
import (
|
|
"github.com/photoprism/photoprism/pkg/fs"
|
|
)
|
|
|
|
// Format represents a video format standard.
|
|
type Format struct {
|
|
File fs.Format
|
|
Codec Codec
|
|
Width int
|
|
Height int
|
|
Public bool
|
|
}
|
|
|
|
// FormatNames maps names to video format standards.
|
|
type FormatNames map[string]Format
|
|
|
|
var MP4 = Format{
|
|
File: fs.FormatMp4,
|
|
Codec: CodecAVC,
|
|
Width: 0,
|
|
Height: 0,
|
|
Public: true,
|
|
}
|
|
|
|
var AVC = Format{
|
|
File: fs.FormatAVC,
|
|
Codec: CodecAVC,
|
|
Width: 0,
|
|
Height: 0,
|
|
Public: true,
|
|
}
|
|
|
|
var AV1 = Format{
|
|
File: fs.FormatAV1,
|
|
Codec: CodecAV1,
|
|
Width: 0,
|
|
Height: 0,
|
|
Public: false,
|
|
}
|
|
|
|
var HEVC = Format{
|
|
File: fs.FormatHEVC,
|
|
Codec: CodecHEVC,
|
|
Width: 0,
|
|
Height: 0,
|
|
Public: false,
|
|
}
|
|
|
|
var Formats = FormatNames{
|
|
"": AVC,
|
|
"mp4": MP4,
|
|
"avc": AVC,
|
|
"av1": AV1,
|
|
"hevc": HEVC,
|
|
}
|