X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=scripts%2Fcreate-transcoding-job.ts;h=59fc84ad59e6723ea4ca056d9590c307d1415b31;hb=1810c5e1e523b1e9834556c3ffc3b5615a2b7cfe;hp=d462fbf33471b73ec9fb32394ae73c60f28662b3;hpb=f8360396ffabd2f95e9ece9c5755173bae0114b6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/scripts/create-transcoding-job.ts b/scripts/create-transcoding-job.ts index d462fbf33..59fc84ad5 100755 --- a/scripts/create-transcoding-job.ts +++ b/scripts/create-transcoding-job.ts @@ -1,6 +1,6 @@ import { program } from 'commander' import { isUUIDValid, toCompleteUUID } from '@server/helpers/custom-validators/misc' -import { computeLowerResolutionsToTranscode } from '@server/helpers/ffprobe-utils' +import { computeLowerResolutionsToTranscode } from '@server/helpers/ffmpeg' import { CONFIG } from '@server/initializers/config' import { addTranscodingJob } from '@server/lib/video' import { VideoState, VideoTranscodingPayload } from '@shared/models' @@ -60,7 +60,11 @@ async function run () { type: 'new-resolution-to-hls', videoUUID: video.uuid, resolution, + + // FIXME: check the file has audio and is not in portrait mode isPortraitMode: false, + hasAudio: true, + copyCodecs: false, isNewVideo: false, isMaxQuality: maxResolution === resolution, @@ -72,6 +76,12 @@ async function run () { dataInput.push({ type: 'new-resolution-to-webtorrent', videoUUID: video.uuid, + + createHLSIfNeeded: true, + + // FIXME: check the file has audio + hasAudio: true, + isNewVideo: false, resolution: parseInt(options.resolution) })