Add in-memory screenshot generation for sprites and phash (#1316)

This commit is contained in:
InfiniteTF
2021-05-05 05:22:05 +02:00
committed by GitHub
parent 08c294414d
commit 31981d4116
6 changed files with 82 additions and 56 deletions

View File

@@ -64,7 +64,7 @@ func (e *Encoder) Transcode(probeResult VideoFile, options TranscodeOptions) {
"-strict", "-2",
options.OutputPath,
}
_, _ = e.run(probeResult, args)
_, _ = e.runTranscode(probeResult, args)
}
//transcode the video, remove the audio
@@ -84,7 +84,7 @@ func (e *Encoder) TranscodeVideo(probeResult VideoFile, options TranscodeOptions
"-vf", "scale=" + scale,
options.OutputPath,
}
_, _ = e.run(probeResult, args)
_, _ = e.runTranscode(probeResult, args)
}
//copy the video stream as is, transcode audio
@@ -96,7 +96,7 @@ func (e *Encoder) TranscodeAudio(probeResult VideoFile, options TranscodeOptions
"-strict", "-2",
options.OutputPath,
}
_, _ = e.run(probeResult, args)
_, _ = e.runTranscode(probeResult, args)
}
//copy the video stream as is, drop audio
@@ -107,5 +107,5 @@ func (e *Encoder) CopyVideo(probeResult VideoFile, options TranscodeOptions) {
"-c:v", "copy",
options.OutputPath,
}
_, _ = e.run(probeResult, args)
_, _ = e.runTranscode(probeResult, args)
}