WIP: querying ffmpeg for available encoders

This commit is contained in:
2024-12-20 19:36:11 +02:00
parent 96389610ed
commit 206a62ee76
2 changed files with 13 additions and 2 deletions
+5 -2
View File
@@ -1,2 +1,5 @@
## TODO: calculate total progress based on file sizes instead of counts of files for a more accurate progress percentage. - [ ] query ffmpeg binary for available encoders and list the ones we know
## TODO: when passing in a directory, list all video files in that directory and have the user choose which ones they want encoded - [ ] when passing in a directory, list all video files in that directory and have the user choose which ones they want encoded
- This will of course have a select all checkbox for quickly encoding all the files in a dir.
- [ ] calculate total progress based on file sizes instead of counts of files for a more accurate progress percentage.
might not do this.
+8
View File
@@ -55,6 +55,14 @@ func initialModel(fileInfo os.FileInfo, absolutePath string) *model {
s.Spinner = spinner.Dot s.Spinner = spinner.Dot
s.Style = lipgloss.NewStyle().Foreground(lipgloss.Color("205")) s.Style = lipgloss.NewStyle().Foreground(lipgloss.Color("205"))
codecs, err := exec.Command("ffmpeg", "-encoders").Output()
if err != nil {
log.Println(err)
}
// TODO: parse the codecs and get the one we care about.
log.Println(strings.Split(strings.Split(string(codecs), " ------\n")[1], "\n"))
return &model{ return &model{
IsDirectory: fileInfo.IsDir(), IsDirectory: fileInfo.IsDir(),
CurrentFileName: fileInfo.Name(), CurrentFileName: fileInfo.Name(),