export abstract class UserEdit extends FormReactive {
videoQuotaOptions: { value: string, label: string }[] = []
videoQuotaDailyOptions: { value: string, label: string }[] = []
- roles = Object.keys(USER_ROLE_LABELS).map(key => ({ value: key.toString(), label: USER_ROLE_LABELS[key] }))
+ roles = Object.keys(USER_ROLE_LABELS)
+ .map(key => ({ value: key.toString(), label: USER_ROLE_LABELS[key] }))
username: string
userId: number
const transcodingConfig = this.serverService.getConfig().transcoding
const resolutions = transcodingConfig.enabledResolutions
- const higherResolution = VideoResolution.H_1080P
+ const higherResolution = VideoResolution.H_4K
let multiplier = 0
for (const resolution of resolutions) {
480p: false
720p: false
1080p: false
+ 2160p: false
# /!\ EXPERIMENTAL /!\
# /!\ Requires ffmpeg >= 4
# Generate HLS playlists and fragmented MP4 files. Better playback than with WebTorrent:
480p: false
720p: false
1080p: false
+ 2160p: false
# /!\ EXPERIMENTAL /!\
# /!\ Requires ffmpeg >= 4
# Generate HLS playlists and fragmented MP4 files. Better playback than with WebTorrent:
480p: true
720p: true
1080p: true
+ 2160p: true
hls:
enabled: true
}
const videoFile = new VideoFileModel(videoFileData)
- if (!videoFile.isAudio()) {
+ if (videoFile.isAudio()) {
+ videoFile.resolution = DEFAULT_AUDIO_RESOLUTION
+ } else {
videoFile.fps = await getVideoFileFPS(videoPhysicalFile.path)
videoFile.resolution = (await getVideoFileResolution(videoPhysicalFile.path)).videoFileResolution
- } else {
- videoFile.resolution = DEFAULT_AUDIO_RESOLUTION
}
// Move physical file
VideoResolution.H_360P,
VideoResolution.H_720P,
VideoResolution.H_240P,
- VideoResolution.H_1080P
+ VideoResolution.H_1080P,
+ VideoResolution.H_4K
]
for (const resolution of resolutions) {
import * as request from 'supertest'
import { ServerInfo } from './servers'
import { waitJobs } from './jobs'
-import { makeGetRequest, makePostBodyRequest } from '..'
+import { makePostBodyRequest } from '../requests/requests'
function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) {
const path = '/api/v1/server/followers'
H_360P = 360,
H_480P = 480,
H_720P = 720,
- H_1080P = 1080
+ H_1080P = 1080,
+ H_4K = 2160
}
/**
// quality according to Google Live Encoder: 1,500 - 4,000 Kbps
// Quality according to YouTube Video Info: 1752 Kbps
return 1750 * 1000
- case VideoResolution.H_1080P: // fallthrough
- default:
+ case VideoResolution.H_1080P:
// quality according to Google Live Encoder: 3000 - 6000 Kbps
// Quality according to YouTube Video Info: 3277 Kbps
return 3300 * 1000
+ case VideoResolution.H_4K: // fallthrough
+ default:
+ // quality according to Google Live Encoder: 13000 - 34000 Kbps
+ return 15000 * 1000
}
}
1080:
__name: "PEERTUBE_TRANSCODING_1080P"
__format: "json"
+ 2160:
+ __name: "PEERTUBE_TRANSCODING_2160P"
+ __format: "json"
instance:
name: "PEERTUBE_INSTANCE_NAME"