import { ContextType } from '../activitypub/context'
+import { VideoEditorTaskCut } from '../videos/editor'
import { VideoResolution } from '../videos/file/video-resolution.enum'
import { SendEmailOptions } from './emailer.model'
| 'video-live-ending'
| 'actor-keys'
| 'move-to-object-storage'
+ | 'video-edition'
export interface Job {
id: number
export interface HLSTranscodingPayload extends BaseTranscodingPayload {
type: 'new-resolution-to-hls'
- isPortraitMode?: boolean
resolution: VideoResolution
copyCodecs: boolean
+ hasAudio: boolean
+ isPortraitMode?: boolean
+
autoDeleteWebTorrentIfNeeded: boolean
isMaxQuality: boolean
}
-export interface NewResolutionTranscodingPayload extends BaseTranscodingPayload {
+export interface NewWebTorrentResolutionTranscodingPayload extends BaseTranscodingPayload {
type: 'new-resolution-to-webtorrent'
- isPortraitMode?: boolean
resolution: VideoResolution
+
+ hasAudio: boolean
+ createHLSIfNeeded: boolean
+
+ isPortraitMode?: boolean
}
export interface MergeAudioTranscodingPayload extends BaseTranscodingPayload {
type: 'merge-audio-to-webtorrent'
resolution: VideoResolution
+ createHLSIfNeeded: true
}
export interface OptimizeTranscodingPayload extends BaseTranscodingPayload {
export type VideoTranscodingPayload =
HLSTranscodingPayload
- | NewResolutionTranscodingPayload
+ | NewWebTorrentResolutionTranscodingPayload
| OptimizeTranscodingPayload
| MergeAudioTranscodingPayload
videoUUID: string
isNewVideo: boolean
}
+
+export type VideoEditorTaskCutPayload = VideoEditorTaskCut
+
+export type VideoEditorTaskIntroPayload = {
+ name: 'add-intro'
+
+ options: {
+ file: string
+ }
+}
+
+export type VideoEditorTaskOutroPayload = {
+ name: 'add-outro'
+
+ options: {
+ file: string
+ }
+}
+
+export type VideoEditorTaskWatermarkPayload = {
+ name: 'add-watermark'
+
+ options: {
+ file: string
+ }
+}
+
+export type VideoEditionTaskPayload =
+ VideoEditorTaskCutPayload |
+ VideoEditorTaskIntroPayload |
+ VideoEditorTaskOutroPayload |
+ VideoEditorTaskWatermarkPayload
+
+export interface VideoEditionPayload {
+ videoUUID: string
+ tasks: VideoEditionTaskPayload[]
+}