diff --git a/packages/api/src/controllers/transcode.ts b/packages/api/src/controllers/transcode.ts index aa6381d92b..6bcec24722 100644 --- a/packages/api/src/controllers/transcode.ts +++ b/packages/api/src/controllers/transcode.ts @@ -45,6 +45,9 @@ app.post( if (outputs.mp4?.path != null && !outputs.mp4.path.startsWith("/")) { outputs.mp4.path = "/" + outputs.mp4.path; } + if (outputs.fmp4?.path != null && !outputs.fmp4.path.startsWith("/")) { + outputs.fmp4.path = "/" + outputs.fmp4.path; + } const task = await req.taskScheduler.createAndScheduleTask( "transcode-file", diff --git a/packages/api/src/schema/api-schema.yaml b/packages/api/src/schema/api-schema.yaml index bff489e577..3ce56d94ee 100644 --- a/packages/api/src/schema/api-schema.yaml +++ b/packages/api/src/schema/api-schema.yaml @@ -57,6 +57,49 @@ components: - hevc - vp8 - vp9 + transcode-profile: + type: object + description: Transcode API profile + additionalProperties: false + required: + - bitrate + properties: + width: + type: integer + minimum: 128 + name: + type: string + minLength: 1 + maxLength: 500 + example: 720p + height: + type: integer + minimum: 128 + bitrate: + type: integer + minimum: 400 + fps: + type: integer + minimum: 0 + fpsDen: + type: integer + minimum: 1 + gop: + type: string + profile: + type: string + enum: + - H264Baseline + - H264Main + - H264High + - H264ConstrainedHigh + encoder: + type: string + enum: + - h264 + - hevc + - vp8 + - vp9 webhook: type: object required: @@ -1299,10 +1342,21 @@ components: type: string description: Path for the MP4 output example: /samplevideo/mp4 + fmp4: + type: object + additionalProperties: false + required: + - path + description: FMP4 output format + properties: + path: + type: string + description: Path for the FMP4 output + example: /samplevideo/fmp4 profiles: type: array items: - $ref: "#/components/schemas/ffmpeg-profile" + $ref: "#/components/schemas/transcode-profile" targetSegmentSizeSecs: type: number description: @@ -1451,7 +1505,7 @@ components: profiles: type: array items: - $ref: "#/components/schemas/ffmpeg-profile" + $ref: "#/components/schemas/transcode-profile" targetSegmentSizeSecs: type: number description: |