PeerTube/packages/tests/fixtures/peertube-plugin-test-transc.../main.js

93 lines
1.5 KiB
JavaScript
Raw Normal View History

async function register ({ transcodingManager }) {
// Output options
{
{
const builder = () => {
return {
outputOptions: [
'-r 10'
]
}
}
transcodingManager.addVODProfile('libx264', 'low-vod', builder)
}
{
const builder = (options) => {
return {
outputOptions: [
2021-07-22 01:46:55 -05:00
'-r:' + options.streamNum + ' 50'
]
}
}
2021-07-22 01:46:55 -05:00
transcodingManager.addLiveProfile('libx264', 'high-live', builder)
}
}
// Input options
{
{
const builder = () => {
return {
inputOptions: [
'-r 5'
]
}
}
transcodingManager.addVODProfile('libx264', 'input-options-vod', builder)
}
{
const builder = () => {
return {
inputOptions: [
2021-07-22 01:46:55 -05:00
'-r 50'
]
}
}
transcodingManager.addLiveProfile('libx264', 'input-options-live', builder)
}
}
// Scale filters
{
{
const builder = () => {
return {
scaleFilter: {
name: 'Glomgold'
}
}
}
transcodingManager.addVODProfile('libx264', 'bad-scale-vod', builder)
}
{
const builder = () => {
return {
scaleFilter: {
name: 'Flintheart'
}
}
}
transcodingManager.addLiveProfile('libx264', 'bad-scale-live', builder)
}
}
}
async function unregister () {
return
}
module.exports = {
register,
unregister
}