Added stream host exclude config.
This commit is contained in:
@@ -672,6 +672,12 @@ async function fetchHttpSource(source, tempFileTarget, hashStream) {
|
||||
streamQueue.define('fetchStreamSource', async ({ source, tempFileTarget, hashStream }) => {
|
||||
const meta = { mimetype: 'video/mp4' };
|
||||
|
||||
const { hostname } = new URL(source.stream);
|
||||
|
||||
if (config.media.excludeStreamHostnames.includes(hostname)) {
|
||||
throw new Error(`Stream source hostname ${hostname} is excluded by config`);
|
||||
}
|
||||
|
||||
const command = ffmpeg(source.stream)
|
||||
.format('mp4')
|
||||
.outputOptions(['-movflags frag_keyframe+empty_moov'])
|
||||
|
||||
Reference in New Issue
Block a user