fix: reorder FFmpeg args to fix input option error
This commit is contained in:
@@ -118,16 +118,15 @@ func (e *Encoder) encodeVideo(input string, opusFiles []string, job *types.Job,
|
|||||||
|
|
||||||
args := []string{
|
args := []string{
|
||||||
"-y",
|
"-y",
|
||||||
"-i", input,
|
|
||||||
"-c:v", "libsvtav1",
|
|
||||||
"-crf", strconv.Itoa(job.CRF),
|
|
||||||
"-svtav1-params", svtParams,
|
|
||||||
"-pix_fmt", "yuv420p10le",
|
|
||||||
"-vf", vf,
|
|
||||||
"-c:a", "copy",
|
|
||||||
"-c:s", "copy",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
args = append(args, "-i", input)
|
||||||
|
args = append(args, "-c:v", "libsvtav1")
|
||||||
|
args = append(args, "-crf", strconv.Itoa(job.CRF))
|
||||||
|
args = append(args, "-svtav1-params", svtParams)
|
||||||
|
args = append(args, "-pix_fmt", "yuv420p10le")
|
||||||
|
args = append(args, "-filter:v:0", vf)
|
||||||
|
|
||||||
for _, opus := range opusFiles {
|
for _, opus := range opusFiles {
|
||||||
args = append(args, "-i", opus)
|
args = append(args, "-i", opus)
|
||||||
}
|
}
|
||||||
@@ -139,6 +138,10 @@ func (e *Encoder) encodeVideo(input string, opusFiles []string, job *types.Job,
|
|||||||
args = append(args, "-map", fmt.Sprintf("%d:a", i+1))
|
args = append(args, "-map", fmt.Sprintf("%d:a", i+1))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
args = append(args, "-c:a", "copy")
|
||||||
|
args = append(args, "-c:s", "copy")
|
||||||
|
args = append(args, "-map_metadata", "0")
|
||||||
|
|
||||||
args = append(args, "-metadata", fmt.Sprintf("TITLE=%s", metadata.Title))
|
args = append(args, "-metadata", fmt.Sprintf("TITLE=%s", metadata.Title))
|
||||||
args = append(args, "-metadata", fmt.Sprintf("DATE_RELEASED=%s", metadata.DateReleased))
|
args = append(args, "-metadata", fmt.Sprintf("DATE_RELEASED=%s", metadata.DateReleased))
|
||||||
args = append(args, "-metadata", fmt.Sprintf("IMDBID=%s", metadata.IMDBID))
|
args = append(args, "-metadata", fmt.Sprintf("IMDBID=%s", metadata.IMDBID))
|
||||||
|
|||||||
Reference in New Issue
Block a user