added input options to enable vaapi, override default bf value, add video filter
This commit is contained in:
parent
7d60dc2120
commit
f77c42ebde
21
main.js
21
main.js
@ -7,23 +7,30 @@ async function register ({
|
||||
const builder = (options) => {
|
||||
const { input, resolution, fps, streamNum } = options
|
||||
|
||||
const streamString = streamNum ? ':' + streamNum : ''
|
||||
|
||||
console.log(options);
|
||||
// You can also return a promise
|
||||
return {
|
||||
videoFilters: [
|
||||
'hwupload'
|
||||
],
|
||||
inputOptions: [
|
||||
// enable hardware acceleration
|
||||
'-hwaccel vaapi',
|
||||
'-hwaccel_output_format vaapi',
|
||||
'-vaapi_device /dev/dri/renderD128'
|
||||
],
|
||||
outputOptions: [
|
||||
// enable hardware acceleration
|
||||
'-hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128'
|
||||
'-bf 8', // override hardcoded bf value which cause memory error
|
||||
'-pix_fmt vaapi_vld'
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
const encoder = 'libx264'
|
||||
const profileName = 'foobarbaz'
|
||||
const encoder = 'h264_vaapi'
|
||||
const profileName = 'vaapi'
|
||||
|
||||
// Support this profile for VOD transcoding
|
||||
transcodingManager.addVODProfile(encoder, profileName, builder)
|
||||
transcodingManager.addVODEncoderPriority('video', encoder, 1000)
|
||||
|
||||
// And/Or support this profile for live transcoding
|
||||
transcodingManager.addLiveProfile(encoder, profileName, builder)
|
||||
|
Loading…
Reference in New Issue
Block a user