Fix edge case preview generation, tweak preview generation preset (#528)

This commit is contained in:
bnkai
2020-05-11 10:24:52 +03:00
committed by GitHub
parent bd45daacf3
commit 4829b4b214

View File

@@ -16,8 +16,8 @@ type ScenePreviewChunkOptions struct {
func (e *Encoder) ScenePreviewVideoChunk(probeResult VideoFile, options ScenePreviewChunkOptions) { func (e *Encoder) ScenePreviewVideoChunk(probeResult VideoFile, options ScenePreviewChunkOptions) {
args := []string{ args := []string{
"-v", "error", "-v", "error",
"-ss", strconv.Itoa(options.Time),
"-i", probeResult.Path, "-i", probeResult.Path,
"-ss", strconv.Itoa(options.Time),
"-t", "0.75", "-t", "0.75",
"-max_muxing_queue_size", "1024", // https://trac.ffmpeg.org/ticket/6375 "-max_muxing_queue_size", "1024", // https://trac.ffmpeg.org/ticket/6375
"-y", "-y",
@@ -25,7 +25,7 @@ func (e *Encoder) ScenePreviewVideoChunk(probeResult VideoFile, options ScenePre
"-pix_fmt", "yuv420p", "-pix_fmt", "yuv420p",
"-profile:v", "high", "-profile:v", "high",
"-level", "4.2", "-level", "4.2",
"-preset", "veryslow", "-preset", "slow",
"-crf", "21", "-crf", "21",
"-threads", "4", "-threads", "4",
"-vf", fmt.Sprintf("scale=%v:-2", options.Width), "-vf", fmt.Sprintf("scale=%v:-2", options.Width),