ニジカ投稿局 https://tv.nizika.tv
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

13 lines
552 B

  1. import { FfprobeData } from 'fluent-ffmpeg'
  2. import { CONFIG } from '@server/initializers/config.js'
  3. import { canDoQuickAudioTranscode, canDoQuickVideoTranscode, ffprobePromise } from '@peertube/peertube-ffmpeg'
  4. export async function canDoQuickTranscode (path: string, existingProbe?: FfprobeData): Promise<boolean> {
  5. if (CONFIG.TRANSCODING.PROFILE !== 'default') return false
  6. const probe = existingProbe || await ffprobePromise(path)
  7. return await canDoQuickVideoTranscode(path, probe) &&
  8. await canDoQuickAudioTranscode(path, probe)
  9. }