]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/lib/video-transcoding.ts
Add pixel size to tooltip and gif support with FFmpeg for avatar upload (#3329)
[github/Chocobozzz/PeerTube.git] / server / lib / video-transcoding.ts
index c62b3c1ceed9be66f12ae0162befcda5a5f455d8..9882a14db2c9b0fee03d6101230bb42e58a32dba 100644 (file)
@@ -1,5 +1,9 @@
-import { HLS_STREAMING_PLAYLIST_DIRECTORY, P2P_MEDIA_LOADER_PEER_VERSION, WEBSERVER } from '../initializers/constants'
+import { copyFile, ensureDir, move, remove, stat } from 'fs-extra'
 import { basename, extname as extnameUtil, join } from 'path'
+import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent'
+import { MStreamingPlaylistFilesVideo, MVideoFile, MVideoWithAllFiles, MVideoWithFile } from '@server/types/models'
+import { VideoResolution } from '../../shared/models/videos'
+import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type'
 import {
   canDoQuickTranscode,
   getDurationFromVideoFile,
@@ -9,18 +13,13 @@ import {
   TranscodeOptions,
   TranscodeOptionsType
 } from '../helpers/ffmpeg-utils'
-import { copyFile, ensureDir, move, remove, stat } from 'fs-extra'
 import { logger } from '../helpers/logger'
-import { VideoResolution } from '../../shared/models/videos'
+import { CONFIG } from '../initializers/config'
+import { HLS_STREAMING_PLAYLIST_DIRECTORY, P2P_MEDIA_LOADER_PEER_VERSION, WEBSERVER } from '../initializers/constants'
 import { VideoFileModel } from '../models/video/video-file'
-import { updateMasterHLSPlaylist, updateSha256VODSegments } from './hls'
 import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist'
-import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type'
-import { CONFIG } from '../initializers/config'
-import { MStreamingPlaylistFilesVideo, MVideoFile, MVideoWithAllFiles, MVideoWithFile } from '@server/types/models'
-import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent'
+import { updateMasterHLSPlaylist, updateSha256VODSegments } from './hls'
 import { generateVideoStreamingPlaylistName, getVideoFilename, getVideoFilePath } from './video-paths'
-import { spawn } from 'child_process'
 
 /**
  * Optimize the original video file and replace it. The resolution is not changed.
@@ -175,8 +174,6 @@ async function generateHlsPlaylist (options: {
     }
   }
 
-  logger.debug('Will run transcode.', { transcodeOptions })
-
   await transcode(transcodeOptions)
 
   const playlistUrl = WEBSERVER.URL + VideoStreamingPlaylistModel.getHlsMasterPlaylistStaticPath(video.uuid)