label: $localize`Audio-only`,
description: $localize`A <code>.mp4</code> that keeps the original audio track, with no video`
},
+ {
+ id: '144p',
+ label: $localize`144p`
+ },
{
id: '240p',
label: $localize`240p`
resolutions: # Only created if the original video has a higher resolution, uses more storage!
0p: false # audio-only (creates mp4 without video stream, always created when enabled)
+ 144p: false
240p: false
360p: false
480p: false
profile: 'default'
resolutions:
+ 144p: false
240p: false
360p: false
480p: false
resolutions: # Only created if the original video has a higher resolution, uses more storage!
0p: false # audio-only (creates mp4 without video stream, always created when enabled)
+ 144p: false
240p: false
360p: false
480p: false
profile: 'default'
resolutions:
+ 144p: false
240p: false
360p: false
480p: false
concurrency: 2
resolutions:
0p: false
+ 144p: false
240p: true
360p: true
480p: true
threads: 2
resolutions:
+ 144p: false
240p: false
360p: false
480p: false
profile: CONFIG.TRANSCODING.PROFILE,
resolutions: {
'0p': CONFIG.TRANSCODING.RESOLUTIONS['0p'],
+ '144p': CONFIG.TRANSCODING.RESOLUTIONS['144p'],
'240p': CONFIG.TRANSCODING.RESOLUTIONS['240p'],
'360p': CONFIG.TRANSCODING.RESOLUTIONS['360p'],
'480p': CONFIG.TRANSCODING.RESOLUTIONS['480p'],
threads: CONFIG.LIVE.TRANSCODING.THREADS,
profile: CONFIG.LIVE.TRANSCODING.PROFILE,
resolutions: {
+ '144p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['144p'],
'240p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['240p'],
'360p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['360p'],
'480p': CONFIG.LIVE.TRANSCODING.RESOLUTIONS['480p'],
VideoResolution.H_360P,
VideoResolution.H_720P,
VideoResolution.H_240P,
+ VideoResolution.H_144P,
VideoResolution.H_1080P,
VideoResolution.H_1440P,
VideoResolution.H_4K
'redundancy.videos.strategies', 'redundancy.videos.check_interval',
'transcoding.enabled', 'transcoding.threads', 'transcoding.allow_additional_extensions', 'transcoding.hls.enabled',
'transcoding.profile', 'transcoding.concurrency',
- 'transcoding.resolutions.0p', 'transcoding.resolutions.240p', 'transcoding.resolutions.360p', 'transcoding.resolutions.480p',
- 'transcoding.resolutions.720p', 'transcoding.resolutions.1080p', 'transcoding.resolutions.1440p', 'transcoding.resolutions.2160p',
+ 'transcoding.resolutions.0p', 'transcoding.resolutions.144p', 'transcoding.resolutions.240p', 'transcoding.resolutions.360p',
+ 'transcoding.resolutions.480p', 'transcoding.resolutions.720p', 'transcoding.resolutions.1080p', 'transcoding.resolutions.1440p',
+ 'transcoding.resolutions.2160p',
'import.videos.http.enabled', 'import.videos.torrent.enabled', 'import.videos.concurrency', 'auto_blacklist.videos.of_users.enabled',
'trending.videos.interval_days',
'instance.name', 'instance.short_description', 'instance.description', 'instance.terms', 'instance.default_client_route',
'search.search_index.disable_local_search', 'search.search_index.is_default_search',
'live.enabled', 'live.allow_replay', 'live.max_duration', 'live.max_user_lives', 'live.max_instance_lives',
'live.transcoding.enabled', 'live.transcoding.threads', 'live.transcoding.profile',
- 'live.transcoding.resolutions.240p', 'live.transcoding.resolutions.360p', 'live.transcoding.resolutions.480p',
- 'live.transcoding.resolutions.720p', 'live.transcoding.resolutions.1080p', 'live.transcoding.resolutions.1440p',
- 'live.transcoding.resolutions.2160p'
+ 'live.transcoding.resolutions.144p', 'live.transcoding.resolutions.240p', 'live.transcoding.resolutions.360p',
+ 'live.transcoding.resolutions.480p', 'live.transcoding.resolutions.720p', 'live.transcoding.resolutions.1080p',
+ 'live.transcoding.resolutions.1440p', 'live.transcoding.resolutions.2160p'
]
const requiredAlternatives = [
get PROFILE () { return config.get<string>('transcoding.profile') },
RESOLUTIONS: {
get '0p' () { return config.get<boolean>('transcoding.resolutions.0p') },
+ get '144p' () { return config.get<boolean>('transcoding.resolutions.144p') },
get '240p' () { return config.get<boolean>('transcoding.resolutions.240p') },
get '360p' () { return config.get<boolean>('transcoding.resolutions.360p') },
get '480p' () { return config.get<boolean>('transcoding.resolutions.480p') },
get PROFILE () { return config.get<string>('live.transcoding.profile') },
RESOLUTIONS: {
+ get '144p' () { return config.get<boolean>('live.transcoding.resolutions.144p') },
get '240p' () { return config.get<boolean>('live.transcoding.resolutions.240p') },
get '360p' () { return config.get<boolean>('live.transcoding.resolutions.360p') },
get '480p' () { return config.get<boolean>('live.transcoding.resolutions.480p') },
body('transcoding.threads').isInt().withMessage('Should have a valid transcoding threads number'),
body('transcoding.concurrency').isInt({ min: 1 }).withMessage('Should have a valid transcoding concurrency number'),
body('transcoding.resolutions.0p').isBoolean().withMessage('Should have a valid transcoding 0p resolution enabled boolean'),
+ body('transcoding.resolutions.144p').isBoolean().withMessage('Should have a valid transcoding 144p resolution enabled boolean'),
body('transcoding.resolutions.240p').isBoolean().withMessage('Should have a valid transcoding 240p resolution enabled boolean'),
body('transcoding.resolutions.360p').isBoolean().withMessage('Should have a valid transcoding 360p resolution enabled boolean'),
body('transcoding.resolutions.480p').isBoolean().withMessage('Should have a valid transcoding 480p resolution enabled boolean'),
body('live.maxUserLives').custom(isIntOrNull).withMessage('Should have a valid max user lives'),
body('live.transcoding.enabled').isBoolean().withMessage('Should have a valid live transcoding enabled boolean'),
body('live.transcoding.threads').isInt().withMessage('Should have a valid live transcoding threads'),
+ body('live.transcoding.resolutions.144p').isBoolean().withMessage('Should have a valid transcoding 144p resolution enabled boolean'),
body('live.transcoding.resolutions.240p').isBoolean().withMessage('Should have a valid transcoding 240p resolution enabled boolean'),
body('live.transcoding.resolutions.360p').isBoolean().withMessage('Should have a valid transcoding 360p resolution enabled boolean'),
body('live.transcoding.resolutions.480p').isBoolean().withMessage('Should have a valid transcoding 480p resolution enabled boolean'),
profile: 'vod_profile',
resolutions: {
'0p': false,
+ '144p': false,
'240p': false,
'360p': true,
'480p': true,
threads: 4,
profile: 'live_profile',
resolutions: {
+ '144p': true,
'240p': true,
'360p': true,
'480p': true,
await waitUntilLivePublishedOnAllServers(userVideoLiveoId)
await waitJobs(servers)
- await checkSaveReplay(userVideoLiveoId, [ 720, 480, 360, 240 ])
+ await checkSaveReplay(userVideoLiveoId, [ 720, 480, 360, 240, 144 ])
})
after(async function () {
transcoding: {
enabled: true,
resolutions: {
+ '144p': resolutions.includes(144),
'240p': resolutions.includes(240),
'360p': resolutions.includes(360),
'480p': resolutions.includes(480),
expect(video.streamingPlaylists).to.have.lengthOf(1)
const files = video.streamingPlaylists[0].files
- expect(files).to.have.lengthOf(4)
+ expect(files).to.have.lengthOf(5)
await checkFiles(files)
}
const video = await server.videos.get({ id: uuid })
- expect(video.files).to.have.lengthOf(4)
+ expect(video.files).to.have.lengthOf(5)
expect(video.streamingPlaylists).to.have.lengthOf(1)
- expect(video.streamingPlaylists[0].files).to.have.lengthOf(4)
+ expect(video.streamingPlaylists[0].files).to.have.lengthOf(5)
for (const file of video.files) {
expectStartWith(file.fileUrl, ObjectStorageCommand.getWebTorrentBaseUrl())
expect(data.transcoding.threads).to.equal(2)
expect(data.transcoding.concurrency).to.equal(2)
expect(data.transcoding.profile).to.equal('default')
+ expect(data.transcoding.resolutions['144p']).to.be.false
expect(data.transcoding.resolutions['240p']).to.be.true
expect(data.transcoding.resolutions['360p']).to.be.true
expect(data.transcoding.resolutions['480p']).to.be.true
expect(data.live.transcoding.enabled).to.be.false
expect(data.live.transcoding.threads).to.equal(2)
expect(data.live.transcoding.profile).to.equal('default')
+ expect(data.live.transcoding.resolutions['144p']).to.be.false
expect(data.live.transcoding.resolutions['240p']).to.be.false
expect(data.live.transcoding.resolutions['360p']).to.be.false
expect(data.live.transcoding.resolutions['480p']).to.be.false
expect(data.transcoding.allowAdditionalExtensions).to.be.true
expect(data.transcoding.allowAudioFiles).to.be.true
expect(data.transcoding.profile).to.equal('vod_profile')
+ expect(data.transcoding.resolutions['144p']).to.be.false
expect(data.transcoding.resolutions['240p']).to.be.false
expect(data.transcoding.resolutions['360p']).to.be.true
expect(data.transcoding.resolutions['480p']).to.be.true
expect(data.live.transcoding.enabled).to.be.true
expect(data.live.transcoding.threads).to.equal(4)
expect(data.live.transcoding.profile).to.equal('live_profile')
+ expect(data.live.transcoding.resolutions['144p']).to.be.true
expect(data.live.transcoding.resolutions['240p']).to.be.true
expect(data.live.transcoding.resolutions['360p']).to.be.true
expect(data.live.transcoding.resolutions['480p']).to.be.true
profile: 'vod_profile',
resolutions: {
'0p': false,
+ '144p': false,
'240p': false,
'360p': true,
'480p': true,
threads: 4,
profile: 'live_profile',
resolutions: {
+ '144p': true,
'240p': true,
'360p': true,
'480p': true,
},
resolutions: {
'0p': false,
+ '144p': false,
'240p': false,
'360p': false,
'480p': false,
enabled: true,
resolutions: {
'0p': true,
+ '144p': false,
'240p': true,
'360p': false,
'480p': false,
enabled: true,
allowAudioFiles: true,
resolutions: {
+ '144p': false,
'240p': true,
'360p': true,
'480p': true,
transcoding: {
enabled: true,
resolutions: {
+ '144p': true,
'240p': true,
'360p': false,
'480p': false,
webtorrent: { enabled: true },
resolutions: {
'0p': false,
+ '144p': true,
'240p': true,
'360p': true,
'480p': true,
const video = data.find(v => v.name === attributes.name)
const videoDetails = await server.videos.get({ id: video.id })
- expect(videoDetails.files).to.have.lengthOf(4)
+ expect(videoDetails.files).to.have.lengthOf(5)
const magnetUri = videoDetails.files[0].magnetUri
expect(magnetUri).to.match(/\.mp4/)
const video = data.find(v => v.name === attributes.name)
const videoDetails = await server.videos.get({ id: video.id })
- expect(videoDetails.files).to.have.lengthOf(4)
+ expect(videoDetails.files).to.have.lengthOf(5)
const magnetUri = videoDetails.files[0].magnetUri
expect(magnetUri).to.contain('.mp4')
await waitJobs(servers)
- const resolutions = [ 240, 360, 480, 720, 1080, 1440, 2160 ]
+ const resolutions = [ 144, 240, 360, 480, 720, 1080, 1440, 2160 ]
for (const server of servers) {
const videoDetails = await server.videos.get({ id: video4k })
const video = data.find(v => v.name === attributes.name)
const videoDetails = await server.videos.get({ id: video.id })
- expect(videoDetails.files).to.have.lengthOf(4)
+ expect(videoDetails.files).to.have.lengthOf(5)
const file = videoDetails.files.find(f => f.resolution.id === 240)
const path = servers[1].servers.buildWebTorrentFilePath(file.fileUrl)
const video = data.find(v => v.name === attributes.name)
const videoDetails = await server.videos.get({ id: video.id })
- expect(videoDetails.files).to.have.lengthOf(4)
+ expect(videoDetails.files).to.have.lengthOf(5)
const fixturePath = buildAbsoluteFixturePath(attributes.fixture)
const fixtureVideoProbe = await getAudioStream(fixturePath)
webtorrent: { enabled: true },
resolutions: {
'0p': false,
+ '144p': false,
'240p': false,
'360p': false,
'480p': false,
webtorrent: { enabled: true },
resolutions: {
'0p': true,
+ '144p': false,
'240p': false,
'360p': false
}
const video = data.find(v => v.name === attributes.name)
const videoDetails = await server.videos.get({ id: video.id })
- expect(videoDetails.files).to.have.lengthOf(4)
+ expect(videoDetails.files).to.have.lengthOf(5)
expect(videoDetails.files[0].fps).to.be.above(58).and.below(62)
expect(videoDetails.files[1].fps).to.be.below(31)
expect(videoDetails.files[2].fps).to.be.below(31)
expect(videoDetails.files[3].fps).to.be.below(31)
+ expect(videoDetails.files[4].fps).to.be.below(31)
- for (const resolution of [ 240, 360, 480 ]) {
+ for (const resolution of [ 144, 240, 360, 480 ]) {
const file = videoDetails.files.find(f => f.resolution.id === resolution)
const path = servers[1].servers.buildWebTorrentFilePath(file.fileUrl)
const fps = await getVideoFileFPS(path)
transcoding: {
enabled: true,
resolutions: {
+ '144p': true,
'240p': true,
'360p': true,
'480p': true,
const videoFiles = videoDetails.files
.concat(videoDetails.streamingPlaylists[0].files)
- expect(videoFiles).to.have.lengthOf(8)
+ expect(videoFiles).to.have.lengthOf(10)
for (const file of videoFiles) {
expect(file.metadata).to.be.undefined
const body = await servers[1].jobs.list({
start: 0,
count: 100,
- sort: '-createdAt',
+ sort: 'createdAt',
jobType: 'video-transcoding'
})
const jobs = body.data
const transcodingJobs = jobs.filter(j => j.data.videoUUID === video4k)
- expect(transcodingJobs).to.have.lengthOf(14)
+ expect(transcodingJobs).to.have.lengthOf(16)
const hlsJobs = transcodingJobs.filter(j => j.data.type === 'new-resolution-to-hls')
const webtorrentJobs = transcodingJobs.filter(j => j.data.type === 'new-resolution-to-webtorrent')
const optimizeJobs = transcodingJobs.filter(j => j.data.type === 'optimize-to-webtorrent')
- expect(hlsJobs).to.have.lengthOf(7)
- expect(webtorrentJobs).to.have.lengthOf(6)
+ expect(hlsJobs).to.have.lengthOf(8)
+ expect(webtorrentJobs).to.have.lengthOf(7)
expect(optimizeJobs).to.have.lengthOf(1)
for (const j of optimizeJobs.concat(hlsJobs.concat(webtorrentJobs))) {
for (const server of servers) {
const videoDetails = await server.videos.get({ id: videosUUID[4] })
- expect(videoDetails.files).to.have.lengthOf(4)
+ expect(videoDetails.files).to.have.lengthOf(5)
expect(videoDetails.streamingPlaylists).to.have.lengthOf(1)
- expect(videoDetails.streamingPlaylists[0].files).to.have.lengthOf(4)
+ expect(videoDetails.streamingPlaylists[0].files).to.have.lengthOf(5)
if (objectStorage) {
await checkFilesInObjectStorage(videoDetails.files, 'webtorrent')
it('Should get appropriate max bitrate', function () {
const tests = [
+ { resolution: VideoResolution.H_144P, ratio: 16 / 9, fps: 24, min: 200, max: 400 },
{ resolution: VideoResolution.H_240P, ratio: 16 / 9, fps: 24, min: 600, max: 800 },
{ resolution: VideoResolution.H_360P, ratio: 16 / 9, fps: 24, min: 1200, max: 1600 },
{ resolution: VideoResolution.H_480P, ratio: 16 / 9, fps: 24, min: 2000, max: 2300 },
it('Should get appropriate average bitrate', function () {
const tests = [
+ { resolution: VideoResolution.H_144P, ratio: 16 / 9, fps: 24, min: 50, max: 300 },
{ resolution: VideoResolution.H_240P, ratio: 16 / 9, fps: 24, min: 350, max: 450 },
{ resolution: VideoResolution.H_360P, ratio: 16 / 9, fps: 24, min: 700, max: 900 },
{ resolution: VideoResolution.H_480P, ratio: 16 / 9, fps: 24, min: 1100, max: 1300 },
const averageBitPerPixel: BitPerPixel = {
[VideoResolution.H_NOVIDEO]: 0,
+ [VideoResolution.H_144P]: 0.19,
[VideoResolution.H_240P]: 0.17,
[VideoResolution.H_360P]: 0.15,
[VideoResolution.H_480P]: 0.12,
const maxBitPerPixel: BitPerPixel = {
[VideoResolution.H_NOVIDEO]: 0,
+ [VideoResolution.H_144P]: 0.32,
[VideoResolution.H_240P]: 0.29,
[VideoResolution.H_360P]: 0.26,
[VideoResolution.H_480P]: 0.22,
VideoResolution.H_480P,
VideoResolution.H_360P,
VideoResolution.H_240P,
+ VideoResolution.H_144P,
VideoResolution.H_NOVIDEO
]
static getCustomConfigResolutions (enabled: boolean) {
return {
+ '144p': enabled,
'240p': enabled,
'360p': enabled,
'480p': enabled,
profile: 'default',
resolutions: {
'0p': false,
+ '144p': false,
'240p': false,
'360p': true,
'480p': true,
threads: 4,
profile: 'default',
resolutions: {
+ '144p': true,
'240p': true,
'360p': true,
'480p': true,
import { BroadcastMessageLevel } from './broadcast-message-level.type'
export type ConfigResolutions = {
+ '144p': boolean
'240p': boolean
'360p': boolean
'480p': boolean
export const enum VideoResolution {
H_NOVIDEO = 0,
+ H_144P = 144,
H_240P = 240,
H_360P = 360,
H_480P = 480,
properties:
0p:
type: boolean
+ 144p:
+ type: boolean
240p:
type: boolean
360p:
__name: "PEERTUBE_TRANSCODING_THREADS"
__format: "json"
resolutions:
+ 144p:
+ __name: "PEERTUBE_TRANSCODING_144P"
+ __format: "json"
240p:
__name: "PEERTUBE_TRANSCODING_240P"
__format: "json"