diff --git a/internal/logic/sync-7.1.2.go b/internal/logic/sync-7.1.2.go new file mode 100644 index 0000000..5b852d7 --- /dev/null +++ b/internal/logic/sync-7.1.2.go @@ -0,0 +1,8 @@ +package logic + +func get7_1_2Arguments() []string { + return []string{ + "-filter_complex", + "[1:a]apad[a2];[0:a][a2]amerge=inputs=2,pan=7.1.2|FL=c0+c10|FR=c1+c11|FC=c2|LFE=c3|BL=c6|BR=c7|SL=c4|SR=c5|TFL=c8|TFR=c9[out]", + } +} diff --git a/internal/logic/sync.go b/internal/logic/sync.go index 99b7692..327c932 100644 --- a/internal/logic/sync.go +++ b/internal/logic/sync.go @@ -87,7 +87,9 @@ func CombineFiles(folder1 string, folder2 string, outputFolder string, progress } arguments = append(arguments, channelArguments...) arguments = append(arguments, getBaseArguments()...) - arguments = append(arguments, getCoverArtArguments(file, files2[index])...) + if ext == ".mp3" || ext == ".flac" { + arguments = append(arguments, getCoverArtArguments(file, files2[index])...) + } arguments = append(arguments, newFileName) cmd := exec.CommandContext(ctx, ffmpeg, arguments...) cmd.SysProcAttr = getSysProcAttr() @@ -169,10 +171,12 @@ func getChannelArguments(channels int) ([]string, error) { return getStereoArguments(), nil case 6: return get5_1Arguments(), nil + case 10: + return get7_1_2Arguments(), nil case 12: return get7_1_4Arguments(), nil } - return nil, fmt.Errorf("Currently only stereo, 5.1 and 7.1.4 Soundscapes are supported") + return nil, fmt.Errorf("Currently only stereo, 5.1, 7.1.2 and 7.1.4 Soundscapes are supported") } func getCoverArtArguments(file1 string, file2 string) []string {