Simplify a bit ffmpeg's transcoder

- Remove the useless "format" parameter
- createTranscodeCommand now returns a list of string, instead of (string, string[])
This commit is contained in:
jvoisin
2020-04-10 18:00:25 +02:00
committed by Deluan Quintão
parent b34523e196
commit 1ef4fa970f
4 changed files with 11 additions and 12 deletions
+2 -3
View File
@@ -18,8 +18,7 @@ func TestTranscoder(t *testing.T) {
var _ = Describe("createTranscodeCommand", func() {
It("creates a valid command line", func() {
cmd, args := createTranscodeCommand("ffmpeg -i %s -b:a %bk mp3 -", "/music library/file.mp3", 123, "")
Expect(cmd).To(Equal("ffmpeg"))
Expect(args).To(Equal([]string{"-i", "/music library/file.mp3", "-b:a", "123k", "mp3", "-"}))
args := createTranscodeCommand("ffmpeg -i %s -b:a %bk mp3 -", "/music library/file.mp3", 123)
Expect(args).To(Equal([]string{"ffmpeg", "-i", "/music library/file.mp3", "-b:a", "123k", "mp3", "-"}))
})
})