Reverted Unneeded Changes

This commit is contained in:
tim000x3 2025-05-04 03:38:49 -04:00
parent 6ba07d151a
commit 8edee648cc

View File

@ -126,19 +126,8 @@ class FFMPEG extends events.EventEmitter {
}
// Ensure startTime is a number (seconds), convert if needed
if (typeof startTime !== 'undefined') {
let ss = startTime;
if (typeof ss === 'string' && ss.endsWith('ms')) {
ss = parseInt(ss) / 1000;
}
if (typeof ss === 'number' && ss > 10000) {
// probably ms, convert to seconds
ss = ss / 1000;
}
ffmpegArgs.push(`-ss`, `${ss}`);
console.log(`[FFMPEG] Using custom start position: -ss ${ss}`);
}
if (typeof startTime !== 'undefined')
ffmpegArgs.push(`-ss`, startTime)
if (isConcatPlaylist == true)
ffmpegArgs.push(`-f`, `concat`,
@ -569,18 +558,9 @@ class FFMPEG extends events.EventEmitter {
`service_name="${this.channel.name}"`,
);
// Ensure duration is a number (seconds), convert if needed
//t should be before -f
if (typeof duration !== 'undefined') {
let t = duration;
if (typeof t === 'string' && t.endsWith('ms')) {
t = parseInt(t) / 1000;
}
if (typeof t === 'number' && t > 10000) {
// probably ms, convert to seconds
t = t / 1000;
}
ffmpegArgs.push(`-t`, `${t}`);
console.log(`[FFMPEG] Using custom duration: -t ${t}`);
ffmpegArgs.push(`-t`, `${duration}`);
}
ffmpegArgs.push(`-f`, `mpegts`, `pipe:1`)