Added the ability to get the FFmpeg version.

This commit is contained in:
2025-06-09 23:19:48 +05:00
parent c49957e583
commit c8619cdc7f
2 changed files with 27 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ type UtilitiesContract interface {
UtilityCheck() bool
GetFFmpeg() (FFmpegContract, error)
GetFFmpegVersion() string
GetFFmpegPath() string
ChangeFFmpeg(path string) error
@@ -82,6 +83,19 @@ func (u *utilities) GetFFmpeg() (FFmpegContract, error) {
return u.ffmpeg, nil
}
func (u *utilities) GetFFmpegVersion() string {
ffmpegService, err := u.GetFFmpeg()
if err != nil {
return lang.L("errorFFmpegVersion")
}
version, err := ffmpegService.GetFFmpegVersion()
if err != nil {
return lang.L("errorFFmpegVersion")
}
return version
}
func (u *utilities) GetFFmpegPath() string {
ffmpegService, err := u.GetFFmpeg()
if err != nil {