feat(video): add video upload with remux/transcode playback
Add video as a media kind in photos: streaming upload with per-kind limits, ffprobe metadata, poster frame reusing the image variant pipeline, and a playback object (remux when web-compatible, else h264/yuv420p/aac transcode). Video jobs run on a separate pool with a long lease. Frontend gains a video viewer, grid badge/duration and video upload.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package photos
|
||||
|
||||
// Media kinds. A photo row may describe either a still image or a video.
|
||||
const (
|
||||
KindImage = "image"
|
||||
KindVideo = "video"
|
||||
)
|
||||
|
||||
// mediaKind normalizes a photo kind, defaulting to image. It is used before
|
||||
// persisting so the column and the variant job always carry a valid value.
|
||||
func mediaKind(kind string) string {
|
||||
if kind == KindVideo {
|
||||
return KindVideo
|
||||
}
|
||||
return KindImage
|
||||
}
|
||||
Reference in New Issue
Block a user