2021-01-28 15:52:44 +01:00
|
|
|
async function register ({ transcodingManager }) {
|
|
|
|
|
2021-04-09 10:36:21 +02:00
|
|
|
// Output options
|
2021-01-28 15:52:44 +01:00
|
|
|
{
|
2021-04-09 10:36:21 +02:00
|
|
|
{
|
|
|
|
const builder = () => {
|
|
|
|
return {
|
|
|
|
outputOptions: [
|
|
|
|
'-r 10'
|
|
|
|
]
|
|
|
|
}
|
2021-01-28 15:52:44 +01:00
|
|
|
}
|
|
|
|
|
2021-04-09 10:36:21 +02:00
|
|
|
transcodingManager.addVODProfile('libx264', 'low-vod', builder)
|
|
|
|
}
|
2021-01-28 15:52:44 +01:00
|
|
|
|
2021-04-09 10:36:21 +02:00
|
|
|
{
|
|
|
|
const builder = (options) => {
|
|
|
|
return {
|
|
|
|
outputOptions: [
|
2021-07-22 08:46:55 +02:00
|
|
|
'-r:' + options.streamNum + ' 50'
|
2021-04-09 10:36:21 +02:00
|
|
|
]
|
|
|
|
}
|
2021-04-06 15:12:38 +02:00
|
|
|
}
|
|
|
|
|
2021-07-22 08:46:55 +02:00
|
|
|
transcodingManager.addLiveProfile('libx264', 'high-live', builder)
|
2021-04-09 10:36:21 +02:00
|
|
|
}
|
2021-04-06 15:12:38 +02:00
|
|
|
}
|
|
|
|
|
2021-04-09 10:36:21 +02:00
|
|
|
// Input options
|
2021-04-06 15:12:38 +02:00
|
|
|
{
|
2021-04-09 10:36:21 +02:00
|
|
|
{
|
|
|
|
const builder = () => {
|
|
|
|
return {
|
|
|
|
inputOptions: [
|
|
|
|
'-r 5'
|
|
|
|
]
|
|
|
|
}
|
2021-04-06 15:12:38 +02:00
|
|
|
}
|
|
|
|
|
2021-04-09 10:36:21 +02:00
|
|
|
transcodingManager.addVODProfile('libx264', 'input-options-vod', builder)
|
|
|
|
}
|
2021-04-06 15:12:38 +02:00
|
|
|
|
2021-04-09 10:36:21 +02:00
|
|
|
{
|
|
|
|
const builder = () => {
|
|
|
|
return {
|
|
|
|
inputOptions: [
|
2021-07-22 08:46:55 +02:00
|
|
|
'-r 50'
|
2021-04-09 10:36:21 +02:00
|
|
|
]
|
|
|
|
}
|
2021-01-28 15:52:44 +01:00
|
|
|
}
|
|
|
|
|
2021-04-09 10:36:21 +02:00
|
|
|
transcodingManager.addLiveProfile('libx264', 'input-options-live', builder)
|
|
|
|
}
|
2021-01-28 15:52:44 +01:00
|
|
|
}
|
2021-04-06 15:12:38 +02:00
|
|
|
|
2021-04-09 10:36:21 +02:00
|
|
|
// Scale filters
|
2021-04-06 15:12:38 +02:00
|
|
|
{
|
2021-04-09 10:36:21 +02:00
|
|
|
{
|
|
|
|
const builder = () => {
|
|
|
|
return {
|
|
|
|
scaleFilter: {
|
|
|
|
name: 'Glomgold'
|
|
|
|
}
|
|
|
|
}
|
2021-04-06 15:12:38 +02:00
|
|
|
}
|
2021-04-09 10:36:21 +02:00
|
|
|
|
|
|
|
transcodingManager.addVODProfile('libx264', 'bad-scale-vod', builder)
|
2021-04-06 15:12:38 +02:00
|
|
|
}
|
|
|
|
|
2021-04-09 10:36:21 +02:00
|
|
|
{
|
|
|
|
const builder = () => {
|
|
|
|
return {
|
|
|
|
scaleFilter: {
|
|
|
|
name: 'Flintheart'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
transcodingManager.addLiveProfile('libx264', 'bad-scale-live', builder)
|
|
|
|
}
|
2021-04-06 15:12:38 +02:00
|
|
|
}
|
2021-01-28 15:52:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
async function unregister () {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
register,
|
|
|
|
unregister
|
|
|
|
}
|