Improve interlude
This commit is contained in:
parent
92cd5ecf8e
commit
66804fe26c
@ -6,9 +6,11 @@ module.exports = {
|
||||
TOO_FREQUENT: 1000,
|
||||
|
||||
// Duration of things like the loading screen and the interlude (the black
|
||||
// frame that appears between videos). The theory is that we don't need
|
||||
// it to last longer than one frame, but I am not so sure.
|
||||
GAP_DURATION: 83,
|
||||
// frame that appears between videos). The goal of these things is to
|
||||
// prevent the video from getting stuck on the last second, which looks bad
|
||||
// for some reason ~750 works well. I raised the fps to 60 and now 420 works
|
||||
// but I wish it was lower.
|
||||
GAP_DURATION: 10*42,
|
||||
|
||||
//when a channel is forcibly stopped due to an update, let's mark it as active
|
||||
// for a while during the transaction just in case.
|
||||
|
||||
@ -217,7 +217,11 @@ class FFMPEG extends events.EventEmitter {
|
||||
}
|
||||
|
||||
if (pic != null) {
|
||||
ffmpegArgs.push("-r" , "24");
|
||||
if (this.opts.noRealTime === true) {
|
||||
ffmpegArgs.push("-r" , "60");
|
||||
} else {
|
||||
ffmpegArgs.push("-r" , "24");
|
||||
}
|
||||
ffmpegArgs.push(
|
||||
'-i', pic,
|
||||
);
|
||||
@ -232,8 +236,12 @@ class FFMPEG extends events.EventEmitter {
|
||||
videoComplex = `;[${inputFiles++}:0]format=yuv420p[formatted]`;
|
||||
videoComplex +=`;[formatted]scale=w=${iW}:h=${iH}:force_original_aspect_ratio=1[scaled]`;
|
||||
videoComplex += `;[scaled]pad=${iW}:${iH}:(ow-iw)/2:(oh-ih)/2[padded]`;
|
||||
videoComplex += `;[padded]loop=loop=-1:size=1:start=0[looped]`;
|
||||
videoComplex +=`;[looped]realtime[videox]`;
|
||||
videoComplex += `;[padded]loop=loop=-1:size=1:start=0`;
|
||||
if (this.opts.noRealTime !== true) {
|
||||
videoComplex +=`[looped];[looped]realtime[videox]`;
|
||||
} else {
|
||||
videoComplex +=`[videox]`
|
||||
}
|
||||
//this tune apparently makes the video compress better
|
||||
// when it is the same image
|
||||
stillImage = true;
|
||||
|
||||
@ -34,6 +34,7 @@ class ProgramPlayer {
|
||||
// people might want the codec normalization to stay because of player support
|
||||
context.ffmpegSettings.normalizeResolution = false;
|
||||
}
|
||||
context.ffmpegSettings.noRealTime = program.noRealTime;
|
||||
if ( typeof(program.err) !== 'undefined') {
|
||||
console.log("About to play error stream");
|
||||
this.delegate = new OfflinePlayer(true, context);
|
||||
|
||||
@ -198,6 +198,7 @@ function video( channelService, fillerDB, db, programmingService, activeChannelS
|
||||
lineupItem = {
|
||||
type: 'loading',
|
||||
title: "Loading Screen",
|
||||
noRealTime: true,
|
||||
streamDuration: GAP_DURATION,
|
||||
duration: GAP_DURATION,
|
||||
redirectChannels: [channel],
|
||||
@ -207,6 +208,7 @@ function video( channelService, fillerDB, db, programmingService, activeChannelS
|
||||
lineupItem = {
|
||||
type: 'interlude',
|
||||
title: "Interlude Screen",
|
||||
noRealTime: true,
|
||||
streamDuration: GAP_DURATION,
|
||||
duration: GAP_DURATION,
|
||||
redirectChannels: [channel],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user