mirror of
https://github.com/IllusionMan1212/ffui.git
synced 2026-10-24 02:12:35 +00:00
WIP: querying ffmpeg for available encoders
This commit is contained in:
@@ -1,2 +1,5 @@
|
||||
## TODO: calculate total progress based on file sizes instead of counts of files for a more accurate progress percentage.
|
||||
## TODO: when passing in a directory, list all video files in that directory and have the user choose which ones they want encoded
|
||||
- [ ] query ffmpeg binary for available encoders and list the ones we know
|
||||
- [ ] 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.
|
||||
|
||||
@@ -55,6 +55,14 @@ func initialModel(fileInfo os.FileInfo, absolutePath string) *model {
|
||||
s.Spinner = spinner.Dot
|
||||
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{
|
||||
IsDirectory: fileInfo.IsDir(),
|
||||
CurrentFileName: fileInfo.Name(),
|
||||
|
||||
Reference in New Issue
Block a user