Move transcoding files in their own directory
This commit is contained in:
parent
1bcb03a100
commit
c07902b908
|
@ -5,7 +5,7 @@ import { VIDEO_TRANSCODING_FPS } from '../server/initializers/constants'
|
||||||
import { getDurationFromVideoFile, getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution } from '../server/helpers/ffprobe-utils'
|
import { getDurationFromVideoFile, getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution } from '../server/helpers/ffprobe-utils'
|
||||||
import { getMaxBitrate } from '../shared/models/videos'
|
import { getMaxBitrate } from '../shared/models/videos'
|
||||||
import { VideoModel } from '../server/models/video/video'
|
import { VideoModel } from '../server/models/video/video'
|
||||||
import { optimizeOriginalVideofile } from '../server/lib/video-transcoding'
|
import { optimizeOriginalVideofile } from '../server/lib/transcoding/video-transcoding'
|
||||||
import { initDatabaseModels } from '../server/initializers/database'
|
import { initDatabaseModels } from '../server/initializers/database'
|
||||||
import { basename, dirname } from 'path'
|
import { basename, dirname } from 'path'
|
||||||
import { copy, move, remove } from 'fs-extra'
|
import { copy, move, remove } from 'fs-extra'
|
||||||
|
|
|
@ -5,7 +5,7 @@ import * as program from 'commander'
|
||||||
import * as ffmpeg from 'fluent-ffmpeg'
|
import * as ffmpeg from 'fluent-ffmpeg'
|
||||||
import { buildx264VODCommand, runCommand, TranscodeOptions } from '@server/helpers/ffmpeg-utils'
|
import { buildx264VODCommand, runCommand, TranscodeOptions } from '@server/helpers/ffmpeg-utils'
|
||||||
import { exit } from 'process'
|
import { exit } from 'process'
|
||||||
import { VideoTranscodingProfilesManager } from '@server/lib/video-transcoding-profiles'
|
import { VideoTranscodingProfilesManager } from '@server/lib/transcoding/video-transcoding-profiles'
|
||||||
|
|
||||||
program
|
program
|
||||||
.arguments('<path>')
|
.arguments('<path>')
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { RegisteredExternalAuthConfig, RegisteredIdAndPassAuthConfig, ServerConf
|
||||||
import { Hooks } from './plugins/hooks'
|
import { Hooks } from './plugins/hooks'
|
||||||
import { PluginManager } from './plugins/plugin-manager'
|
import { PluginManager } from './plugins/plugin-manager'
|
||||||
import { getThemeOrDefault } from './plugins/theme-utils'
|
import { getThemeOrDefault } from './plugins/theme-utils'
|
||||||
import { VideoTranscodingProfilesManager } from './video-transcoding-profiles'
|
import { VideoTranscodingProfilesManager } from './transcoding/video-transcoding-profiles'
|
||||||
|
|
||||||
let serverCommit: string
|
let serverCommit: string
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,9 @@ import { ffprobePromise, getAudioStream, getDurationFromVideoFile, getVideoFileR
|
||||||
import { VIDEO_LIVE } from '@server/initializers/constants'
|
import { VIDEO_LIVE } from '@server/initializers/constants'
|
||||||
import { LiveManager } from '@server/lib/live-manager'
|
import { LiveManager } from '@server/lib/live-manager'
|
||||||
import { generateVideoMiniature } from '@server/lib/thumbnail'
|
import { generateVideoMiniature } from '@server/lib/thumbnail'
|
||||||
|
import { generateHlsPlaylistResolutionFromTS } from '@server/lib/transcoding/video-transcoding'
|
||||||
import { publishAndFederateIfNeeded } from '@server/lib/video'
|
import { publishAndFederateIfNeeded } from '@server/lib/video'
|
||||||
import { getHLSDirectory } from '@server/lib/video-paths'
|
import { getHLSDirectory } from '@server/lib/video-paths'
|
||||||
import { generateHlsPlaylistResolutionFromTS } from '@server/lib/video-transcoding'
|
|
||||||
import { VideoModel } from '@server/models/video/video'
|
import { VideoModel } from '@server/models/video/video'
|
||||||
import { VideoFileModel } from '@server/models/video/video-file'
|
import { VideoFileModel } from '@server/models/video/video-file'
|
||||||
import { VideoLiveModel } from '@server/models/video/video-live'
|
import { VideoLiveModel } from '@server/models/video/video-live'
|
||||||
|
|
|
@ -24,7 +24,7 @@ import {
|
||||||
mergeAudioVideofile,
|
mergeAudioVideofile,
|
||||||
optimizeOriginalVideofile,
|
optimizeOriginalVideofile,
|
||||||
transcodeNewWebTorrentResolution
|
transcodeNewWebTorrentResolution
|
||||||
} from '../../video-transcoding'
|
} from '../../transcoding/video-transcoding'
|
||||||
import { JobQueue } from '../job-queue'
|
import { JobQueue } from '../job-queue'
|
||||||
|
|
||||||
type HandlerFunction = (job: Bull.Job, payload: VideoTranscodingPayload, video: MVideoFullLight, user: MUser) => Promise<any>
|
type HandlerFunction = (job: Bull.Job, payload: VideoTranscodingPayload, video: MVideoFullLight, user: MUser) => Promise<any>
|
||||||
|
|
|
@ -23,9 +23,9 @@ import { buildSha256Segment } from './hls'
|
||||||
import { JobQueue } from './job-queue'
|
import { JobQueue } from './job-queue'
|
||||||
import { cleanupLive } from './job-queue/handlers/video-live-ending'
|
import { cleanupLive } from './job-queue/handlers/video-live-ending'
|
||||||
import { PeerTubeSocket } from './peertube-socket'
|
import { PeerTubeSocket } from './peertube-socket'
|
||||||
|
import { VideoTranscodingProfilesManager } from './transcoding/video-transcoding-profiles'
|
||||||
import { isAbleToUploadVideo } from './user'
|
import { isAbleToUploadVideo } from './user'
|
||||||
import { getHLSDirectory } from './video-paths'
|
import { getHLSDirectory } from './video-paths'
|
||||||
import { VideoTranscodingProfilesManager } from './video-transcoding-profiles'
|
|
||||||
|
|
||||||
import memoizee = require('memoizee')
|
import memoizee = require('memoizee')
|
||||||
const NodeRtmpSession = require('node-media-server/node_rtmp_session')
|
const NodeRtmpSession = require('node-media-server/node_rtmp_session')
|
||||||
|
|
|
@ -29,7 +29,7 @@ import {
|
||||||
RegisterServerSettingOptions
|
RegisterServerSettingOptions
|
||||||
} from '@shared/models'
|
} from '@shared/models'
|
||||||
import { serverHookObject } from '@shared/models/plugins/server-hook.model'
|
import { serverHookObject } from '@shared/models/plugins/server-hook.model'
|
||||||
import { VideoTranscodingProfilesManager } from '../video-transcoding-profiles'
|
import { VideoTranscodingProfilesManager } from '../transcoding/video-transcoding-profiles'
|
||||||
import { buildPluginHelpers } from './plugin-helpers-builder'
|
import { buildPluginHelpers } from './plugin-helpers-builder'
|
||||||
|
|
||||||
type AlterableVideoConstant = 'language' | 'licence' | 'category' | 'privacy' | 'playlistPrivacy'
|
type AlterableVideoConstant = 'language' | 'licence' | 'category' | 'privacy' | 'playlistPrivacy'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { logger } from '@server/helpers/logger'
|
import { logger } from '@server/helpers/logger'
|
||||||
import { AvailableEncoders, EncoderOptionsBuilder, getTargetBitrate, VideoResolution } from '../../shared/models/videos'
|
import { AvailableEncoders, EncoderOptionsBuilder, getTargetBitrate, VideoResolution } from '../../../shared/models/videos'
|
||||||
import { buildStreamSuffix, resetSupportedEncoders } from '../helpers/ffmpeg-utils'
|
import { buildStreamSuffix, resetSupportedEncoders } from '../../helpers/ffmpeg-utils'
|
||||||
import {
|
import {
|
||||||
canDoQuickAudioTranscode,
|
canDoQuickAudioTranscode,
|
||||||
ffprobePromise,
|
ffprobePromise,
|
||||||
|
@ -8,8 +8,8 @@ import {
|
||||||
getMaxAudioBitrate,
|
getMaxAudioBitrate,
|
||||||
getVideoFileBitrate,
|
getVideoFileBitrate,
|
||||||
getVideoStreamFromFile
|
getVideoStreamFromFile
|
||||||
} from '../helpers/ffprobe-utils'
|
} from '../../helpers/ffprobe-utils'
|
||||||
import { VIDEO_TRANSCODING_FPS } from '../initializers/constants'
|
import { VIDEO_TRANSCODING_FPS } from '../../initializers/constants'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
|
@ -3,17 +3,17 @@ import { copyFile, ensureDir, move, remove, stat } from 'fs-extra'
|
||||||
import { basename, extname as extnameUtil, join } from 'path'
|
import { basename, extname as extnameUtil, join } from 'path'
|
||||||
import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent'
|
import { createTorrentAndSetInfoHash } from '@server/helpers/webtorrent'
|
||||||
import { MStreamingPlaylistFilesVideo, MVideoFile, MVideoFullLight } from '@server/types/models'
|
import { MStreamingPlaylistFilesVideo, MVideoFile, MVideoFullLight } from '@server/types/models'
|
||||||
import { VideoResolution } from '../../shared/models/videos'
|
import { VideoResolution } from '../../../shared/models/videos'
|
||||||
import { VideoStreamingPlaylistType } from '../../shared/models/videos/video-streaming-playlist.type'
|
import { VideoStreamingPlaylistType } from '../../../shared/models/videos/video-streaming-playlist.type'
|
||||||
import { transcode, TranscodeOptions, TranscodeOptionsType } from '../helpers/ffmpeg-utils'
|
import { transcode, TranscodeOptions, TranscodeOptionsType } from '../../helpers/ffmpeg-utils'
|
||||||
import { canDoQuickTranscode, getDurationFromVideoFile, getMetadataFromFile, getVideoFileFPS } from '../helpers/ffprobe-utils'
|
import { canDoQuickTranscode, getDurationFromVideoFile, getMetadataFromFile, getVideoFileFPS } from '../../helpers/ffprobe-utils'
|
||||||
import { logger } from '../helpers/logger'
|
import { logger } from '../../helpers/logger'
|
||||||
import { CONFIG } from '../initializers/config'
|
import { CONFIG } from '../../initializers/config'
|
||||||
import { HLS_STREAMING_PLAYLIST_DIRECTORY, P2P_MEDIA_LOADER_PEER_VERSION, WEBSERVER } from '../initializers/constants'
|
import { HLS_STREAMING_PLAYLIST_DIRECTORY, P2P_MEDIA_LOADER_PEER_VERSION, WEBSERVER } from '../../initializers/constants'
|
||||||
import { VideoFileModel } from '../models/video/video-file'
|
import { VideoFileModel } from '../../models/video/video-file'
|
||||||
import { VideoStreamingPlaylistModel } from '../models/video/video-streaming-playlist'
|
import { VideoStreamingPlaylistModel } from '../../models/video/video-streaming-playlist'
|
||||||
import { updateMasterHLSPlaylist, updateSha256VODSegments } from './hls'
|
import { updateMasterHLSPlaylist, updateSha256VODSegments } from '../hls'
|
||||||
import { generateVideoFilename, generateVideoStreamingPlaylistName, getVideoFilePath } from './video-paths'
|
import { generateVideoFilename, generateVideoStreamingPlaylistName, getVideoFilePath } from '../video-paths'
|
||||||
import { VideoTranscodingProfilesManager } from './video-transcoding-profiles'
|
import { VideoTranscodingProfilesManager } from './video-transcoding-profiles'
|
||||||
|
|
||||||
/**
|
/**
|
Loading…
Reference in New Issue