diff options
Diffstat (limited to 'server/tools/peertube-import-videos.ts')
-rw-r--r-- | server/tools/peertube-import-videos.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/tools/peertube-import-videos.ts b/server/tools/peertube-import-videos.ts index 5fc5a867c..3a82b3832 100644 --- a/server/tools/peertube-import-videos.ts +++ b/server/tools/peertube-import-videos.ts | |||
@@ -11,7 +11,7 @@ import * as prompt from 'prompt' | |||
11 | import { accessSync, constants } from 'fs' | 11 | import { accessSync, constants } from 'fs' |
12 | import { remove } from 'fs-extra' | 12 | import { remove } from 'fs-extra' |
13 | import { sha256 } from '../helpers/core-utils' | 13 | import { sha256 } from '../helpers/core-utils' |
14 | import { buildOriginallyPublishedAt, safeGetYoutubeDL } from '../helpers/youtube-dl' | 14 | import { buildOriginallyPublishedAt, getYoutubeDLVideoFormat, safeGetYoutubeDL } from '../helpers/youtube-dl' |
15 | import { buildCommonVideoOptions, buildVideoAttributesFromCommander, getLogger, getServerCredentials } from './cli' | 15 | import { buildCommonVideoOptions, buildVideoAttributesFromCommander, getLogger, getServerCredentials } from './cli' |
16 | 16 | ||
17 | type UserInfo = { | 17 | type UserInfo = { |
@@ -156,7 +156,7 @@ function processVideo (parameters: { | |||
156 | 156 | ||
157 | log.info('Downloading video "%s"...', videoInfo.title) | 157 | log.info('Downloading video "%s"...', videoInfo.title) |
158 | 158 | ||
159 | const options = [ '-f', 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best', ...command.args, '-o', path ] | 159 | const options = [ '-f', getYoutubeDLVideoFormat(), ...command.args, '-o', path ] |
160 | try { | 160 | try { |
161 | const youtubeDL = await safeGetYoutubeDL() | 161 | const youtubeDL = await safeGetYoutubeDL() |
162 | youtubeDL.exec(videoInfo.url, options, processOptions, async (err, output) => { | 162 | youtubeDL.exec(videoInfo.url, options, processOptions, async (err, output) => { |