Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16 make 712 possible #17

Merged
merged 2 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions internal/logic/sync-7.1.2.go
Original file line number Diff line number Diff line change
@@ -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]",
}
}
8 changes: 6 additions & 2 deletions internal/logic/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 {
Expand Down