diff options
author | Chocobozzz <me@florianbigard.com> | 2023-04-21 14:55:10 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2023-05-09 08:57:34 +0200 |
commit | 0c9668f77901e7540e2c7045eb0f2974a4842a69 (patch) | |
tree | 226d3dd1565b0bb56588897af3b8530e6216e96b /server/helpers/ffmpeg/ffmpeg-image.ts | |
parent | 6bcb854cdea8688a32240bc5719c7d139806e00b (diff) | |
download | PeerTube-0c9668f77901e7540e2c7045eb0f2974a4842a69.tar.gz PeerTube-0c9668f77901e7540e2c7045eb0f2974a4842a69.tar.zst PeerTube-0c9668f77901e7540e2c7045eb0f2974a4842a69.zip |
Implement remote runner jobs in server
Move ffmpeg functions to @shared
Diffstat (limited to 'server/helpers/ffmpeg/ffmpeg-image.ts')
-rw-r--r-- | server/helpers/ffmpeg/ffmpeg-image.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/server/helpers/ffmpeg/ffmpeg-image.ts b/server/helpers/ffmpeg/ffmpeg-image.ts new file mode 100644 index 000000000..0bb0ff2c0 --- /dev/null +++ b/server/helpers/ffmpeg/ffmpeg-image.ts | |||
@@ -0,0 +1,14 @@ | |||
1 | import { FFmpegImage } from '@shared/ffmpeg' | ||
2 | import { getFFmpegCommandWrapperOptions } from './ffmpeg-options' | ||
3 | |||
4 | export function processGIF (options: Parameters<FFmpegImage['processGIF']>[0]) { | ||
5 | return new FFmpegImage(getFFmpegCommandWrapperOptions('thumbnail')).processGIF(options) | ||
6 | } | ||
7 | |||
8 | export function generateThumbnailFromVideo (options: Parameters<FFmpegImage['generateThumbnailFromVideo']>[0]) { | ||
9 | return new FFmpegImage(getFFmpegCommandWrapperOptions('thumbnail')).generateThumbnailFromVideo(options) | ||
10 | } | ||
11 | |||
12 | export function convertWebPToJPG (options: Parameters<FFmpegImage['convertWebPToJPG']>[0]) { | ||
13 | return new FFmpegImage(getFFmpegCommandWrapperOptions('thumbnail')).convertWebPToJPG(options) | ||
14 | } | ||