Skip to content

Commit

Permalink
fixes for cutting
Browse files Browse the repository at this point in the history
  • Loading branch information
aza547 committed Feb 20, 2025
1 parent 531f428 commit a40cc00
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/VideoProcessQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ export default class VideoProcessQueue {
console.info('[VideoProcessQueue] Cut algorithm data', diags);

console.time('[VideoProcessQueue] Re-encode initial keyframe took:');
await VideoProcessQueue.processInitialKeyframe(srcFile, start, first);
await this.processInitialKeyframe(srcFile, start, first);
console.timeEnd('[VideoProcessQueue] Re-encode initial keyframe took:');

const bufferDir = this.cfg.get<string>('bufferStoragePath');
Expand Down Expand Up @@ -756,7 +756,7 @@ export default class VideoProcessQueue {
* @param startTime the time to cut from, should align with a keyframe
* @param duration the duration to cut, should be a few seconds max
*/
private static async processInitialKeyframe(
private async processInitialKeyframe(
srcFile: string,
startTime: number,
duration: number,
Expand All @@ -768,8 +768,8 @@ export default class VideoProcessQueue {
duration,
);

const srcDir = path.dirname(srcFile);
const out = path.join(srcDir, VideoProcessQueue.firstKeyframeFile);
const bufferDir = this.cfg.get<string>('bufferStoragePath');
const out = path.join(bufferDir, VideoProcessQueue.firstKeyframeFile);

const fn = ffmpeg(srcFile)
.setStartTime(startTime)
Expand Down

0 comments on commit a40cc00

Please sign in to comment.