Версия 0.5.0 #6
@ -7,7 +7,9 @@ import (
|
|||||||
"fyne.io/fyne/v2/container"
|
"fyne.io/fyne/v2/container"
|
||||||
"fyne.io/fyne/v2/storage"
|
"fyne.io/fyne/v2/storage"
|
||||||
"fyne.io/fyne/v2/widget"
|
"fyne.io/fyne/v2/widget"
|
||||||
|
encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/kernel"
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/kernel"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/kernel/encoder"
|
||||||
"github.com/nicksnyder/go-i18n/v2/i18n"
|
"github.com/nicksnyder/go-i18n/v2/i18n"
|
||||||
"image/color"
|
"image/color"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -16,6 +18,7 @@ import (
|
|||||||
type ViewContract interface {
|
type ViewContract interface {
|
||||||
Main(
|
Main(
|
||||||
runConvert func(setting HandleConvertSetting),
|
runConvert func(setting HandleConvertSetting),
|
||||||
|
formats encoder.ConvertorFormatsContract,
|
||||||
)
|
)
|
||||||
SelectFFPath(
|
SelectFFPath(
|
||||||
ffmpegPath string,
|
ffmpegPath string,
|
||||||
@ -34,6 +37,8 @@ type HandleConvertSetting struct {
|
|||||||
VideoFileInput kernel.File
|
VideoFileInput kernel.File
|
||||||
DirectoryForSave string
|
DirectoryForSave string
|
||||||
OverwriteOutputFiles bool
|
OverwriteOutputFiles bool
|
||||||
|
Format string
|
||||||
|
Encoder encoder2.EncoderContract
|
||||||
}
|
}
|
||||||
|
|
||||||
type enableFormConversionStruct struct {
|
type enableFormConversionStruct struct {
|
||||||
@ -50,6 +55,7 @@ func NewView(app kernel.AppContract) *View {
|
|||||||
|
|
||||||
func (v View) Main(
|
func (v View) Main(
|
||||||
runConvert func(setting HandleConvertSetting),
|
runConvert func(setting HandleConvertSetting),
|
||||||
|
formats encoder.ConvertorFormatsContract,
|
||||||
) {
|
) {
|
||||||
form := &widget.Form{}
|
form := &widget.Form{}
|
||||||
|
|
||||||
@ -68,9 +74,11 @@ func (v View) Main(
|
|||||||
isOverwriteOutputFiles = b
|
isOverwriteOutputFiles = b
|
||||||
})
|
})
|
||||||
|
|
||||||
|
selectEncoder := v.getSelectFormat(formats)
|
||||||
|
|
||||||
form.Items = []*widget.FormItem{
|
form.Items = []*widget.FormItem{
|
||||||
{
|
{
|
||||||
Text: v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{MessageID: "fileVideoForConversionTitle"}),
|
Text: v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{MessageID: "fileForConversionTitle"}),
|
||||||
Widget: fileVideoForConversion,
|
Widget: fileVideoForConversion,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -86,6 +94,17 @@ func (v View) Main(
|
|||||||
{
|
{
|
||||||
Widget: checkboxOverwriteOutputFiles,
|
Widget: checkboxOverwriteOutputFiles,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Widget: selectEncoder.SelectFileType,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Text: v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{MessageID: "selectFormat"}),
|
||||||
|
Widget: selectEncoder.SelectFormat,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Text: v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{MessageID: "selectEncoder"}),
|
||||||
|
Widget: selectEncoder.SelectEncoder,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
form.SubmitText = v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
form.SubmitText = v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
MessageID: "converterVideoFilesSubmitTitle",
|
MessageID: "converterVideoFilesSubmitTitle",
|
||||||
@ -105,6 +124,18 @@ func (v View) Main(
|
|||||||
enableFormConversion(enableFormConversionStruct)
|
enableFormConversion(enableFormConversionStruct)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if len(selectEncoder.SelectFormat.Selected) == 0 {
|
||||||
|
showConversionMessage(conversionMessage, errors.New(v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "errorSelectedFormat",
|
||||||
|
})))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if selectEncoder.Encoder == nil {
|
||||||
|
showConversionMessage(conversionMessage, errors.New(v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
|
MessageID: "errorSelectedEncoder",
|
||||||
|
})))
|
||||||
|
return
|
||||||
|
}
|
||||||
conversionMessage.Text = ""
|
conversionMessage.Text = ""
|
||||||
|
|
||||||
fileVideoForConversion.Disable()
|
fileVideoForConversion.Disable()
|
||||||
@ -115,6 +146,8 @@ func (v View) Main(
|
|||||||
VideoFileInput: *fileInput,
|
VideoFileInput: *fileInput,
|
||||||
DirectoryForSave: *pathToSaveDirectory,
|
DirectoryForSave: *pathToSaveDirectory,
|
||||||
OverwriteOutputFiles: isOverwriteOutputFiles,
|
OverwriteOutputFiles: isOverwriteOutputFiles,
|
||||||
|
Format: selectEncoder.SelectFormat.Selected,
|
||||||
|
Encoder: selectEncoder.Encoder,
|
||||||
}
|
}
|
||||||
runConvert(setting)
|
runConvert(setting)
|
||||||
enableFormConversion(enableFormConversionStruct)
|
enableFormConversion(enableFormConversionStruct)
|
||||||
@ -209,6 +242,68 @@ func (v View) getButtonForSelectingDirectoryForSaving() (button *widget.Button,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type selectEncoder struct {
|
||||||
|
SelectFileType *widget.RadioGroup
|
||||||
|
SelectFormat *widget.Select
|
||||||
|
SelectEncoder *widget.Select
|
||||||
|
Encoder encoder2.EncoderContract
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v View) getSelectFormat(formats encoder.ConvertorFormatsContract) *selectEncoder {
|
||||||
|
selectEncoder := &selectEncoder{}
|
||||||
|
|
||||||
|
encoders := map[int]encoder2.EncoderDataContract{}
|
||||||
|
selectEncoder.SelectEncoder = widget.NewSelect([]string{}, func(s string) {
|
||||||
|
if encoders[selectEncoder.SelectEncoder.SelectedIndex()] == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
selectEncoder.Encoder = encoders[selectEncoder.SelectEncoder.SelectedIndex()].NewEncoder()
|
||||||
|
})
|
||||||
|
|
||||||
|
formatSelected := ""
|
||||||
|
selectEncoder.SelectFormat = widget.NewSelect([]string{}, func(s string) {
|
||||||
|
if formatSelected == s {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
formatSelected = s
|
||||||
|
format, err := formats.GetFormat(s)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
encoderOptions := []string{}
|
||||||
|
encoders = format.GetEncoders()
|
||||||
|
for _, e := range encoders {
|
||||||
|
encoderOptions = append(encoderOptions, v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{MessageID: "encoder_" + e.GetTitle()}))
|
||||||
|
}
|
||||||
|
selectEncoder.SelectEncoder.SetOptions(encoderOptions)
|
||||||
|
selectEncoder.SelectEncoder.SetSelectedIndex(0)
|
||||||
|
})
|
||||||
|
|
||||||
|
fileTypeOptions := []string{}
|
||||||
|
for _, fileType := range encoder2.GetListFileType() {
|
||||||
|
fileTypeOptions = append(fileTypeOptions, fileType.Name())
|
||||||
|
}
|
||||||
|
selectEncoder.SelectFileType = widget.NewRadioGroup([]string{"video", "audio", "image"}, func(s string) {
|
||||||
|
formatOptions := []string{}
|
||||||
|
for _, f := range formats.GetFormats() {
|
||||||
|
if s != f.GetFileType().Name() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
formatOptions = append(formatOptions, f.GetTitle())
|
||||||
|
}
|
||||||
|
selectEncoder.SelectFormat.SetOptions(formatOptions)
|
||||||
|
if s == encoder2.FileType(encoder2.Video).Name() {
|
||||||
|
selectEncoder.SelectFormat.SetSelected("mp4")
|
||||||
|
} else {
|
||||||
|
selectEncoder.SelectFormat.SetSelectedIndex(0)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
selectEncoder.SelectFileType.Horizontal = true
|
||||||
|
selectEncoder.SelectFileType.SetSelected("video")
|
||||||
|
|
||||||
|
return selectEncoder
|
||||||
|
}
|
||||||
|
|
||||||
func setStringErrorStyle(text *canvas.Text) {
|
func setStringErrorStyle(text *canvas.Text) {
|
||||||
text.Color = color.RGBA{R: 255, G: 0, B: 0, A: 255}
|
text.Color = color.RGBA{R: 255, G: 0, B: 0, A: 255}
|
||||||
text.Refresh()
|
text.Refresh()
|
||||||
|
21
encoder/apng/encoder.go
Normal file
21
encoder/apng/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package apng
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "apng"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "apng"
|
||||||
|
formats := []string{"apng"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Image)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/bmp/encoder.go
Normal file
21
encoder/bmp/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package bmp
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "bmp"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "bmp"
|
||||||
|
formats := []string{"bmp"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Image)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
79
encoder/encoder.go
Normal file
79
encoder/encoder.go
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
package encoder
|
||||||
|
|
||||||
|
type EncoderContract interface {
|
||||||
|
GetParams() []string
|
||||||
|
}
|
||||||
|
|
||||||
|
type EncoderDataContract interface {
|
||||||
|
GetTitle() string
|
||||||
|
GetFormats() []string
|
||||||
|
GetFileType() FileTypeContract
|
||||||
|
NewEncoder() EncoderContract
|
||||||
|
}
|
||||||
|
|
||||||
|
type Data struct {
|
||||||
|
title string
|
||||||
|
formats []string
|
||||||
|
fileType FileTypeContract
|
||||||
|
encoder func() EncoderContract
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData(title string, formats []string, fileType FileTypeContract, encoder func() EncoderContract) *Data {
|
||||||
|
return &Data{
|
||||||
|
title: title,
|
||||||
|
formats: formats,
|
||||||
|
fileType: fileType,
|
||||||
|
encoder: encoder,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (data Data) GetTitle() string {
|
||||||
|
return data.title
|
||||||
|
}
|
||||||
|
|
||||||
|
func (data Data) GetFormats() []string {
|
||||||
|
return data.formats
|
||||||
|
}
|
||||||
|
|
||||||
|
func (data Data) NewEncoder() EncoderContract {
|
||||||
|
return data.encoder()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (data Data) GetFileType() FileTypeContract {
|
||||||
|
return data.fileType
|
||||||
|
}
|
||||||
|
|
||||||
|
type FileTypeContract interface {
|
||||||
|
Name() string
|
||||||
|
Ordinal() int
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
Video = iota
|
||||||
|
Audio
|
||||||
|
Image
|
||||||
|
)
|
||||||
|
|
||||||
|
type FileType uint
|
||||||
|
|
||||||
|
var fileTypeStrings = []string{
|
||||||
|
"video",
|
||||||
|
"audio",
|
||||||
|
"image",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (fileType FileType) Name() string {
|
||||||
|
return fileTypeStrings[fileType]
|
||||||
|
}
|
||||||
|
|
||||||
|
func (fileType FileType) Ordinal() int {
|
||||||
|
return int(fileType)
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetListFileType() []FileTypeContract {
|
||||||
|
return []FileTypeContract{
|
||||||
|
FileType(Video),
|
||||||
|
FileType(Audio),
|
||||||
|
FileType(Image),
|
||||||
|
}
|
||||||
|
}
|
21
encoder/flv/encoder.go
Normal file
21
encoder/flv/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package flv
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "flv"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "flv"
|
||||||
|
formats := []string{"flv"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Video)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/gif/encoder.go
Normal file
21
encoder/gif/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package gif
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "gif"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "gif"
|
||||||
|
formats := []string{"gif"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Image)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
23
encoder/h264_nvenc/encoder.go
Normal file
23
encoder/h264_nvenc/encoder.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package h264_nvenc
|
||||||
|
|
||||||
|
import (
|
||||||
|
encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
)
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "h264_nvenc"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "h264_nvenc"
|
||||||
|
formats := []string{"mp4"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Video)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/libmp3lame/encoder.go
Normal file
21
encoder/libmp3lame/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package libmp3lame
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:a", "libmp3lame"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "libmp3lame"
|
||||||
|
formats := []string{"mp3"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Audio)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/libshine/encoder.go
Normal file
21
encoder/libshine/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package libshine
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:a", "libshine"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "libshine"
|
||||||
|
formats := []string{"mp3"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Audio)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/libtwolame/encoder.go
Normal file
21
encoder/libtwolame/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package libtwolame
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:a", "libtwolame"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "libtwolame"
|
||||||
|
formats := []string{"mp2"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Audio)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/libvpx/encoder.go
Normal file
21
encoder/libvpx/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package libvpx
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "libvpx"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "libvpx"
|
||||||
|
formats := []string{"webm", "mkv"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Video)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/libvpx_vp9/encoder.go
Normal file
21
encoder/libvpx_vp9/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package libvpx_vp9
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "libvpx-vp9"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "libvpx-vp9"
|
||||||
|
formats := []string{"webm", "mkv"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Video)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/libwebp/encoder.go
Normal file
21
encoder/libwebp/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package libwebp
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "libwebp"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "libwebp"
|
||||||
|
formats := []string{"webp"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Image)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/libwebp_anim/encoder.go
Normal file
21
encoder/libwebp_anim/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package libwebp_anim
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "libwebp_anim"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "libwebp_anim"
|
||||||
|
formats := []string{"webp"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Image)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/libx264/encoder.go
Normal file
21
encoder/libx264/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package libx264
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "libx264"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "libx264"
|
||||||
|
formats := []string{"mp4"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Video)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/libx265/encoder.go
Normal file
21
encoder/libx265/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package libx265
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "libx265"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "libx265"
|
||||||
|
formats := []string{"mp4"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Video)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/libxvid/encoder.go
Normal file
21
encoder/libxvid/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package libxvid
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "libxvid"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "libxvid"
|
||||||
|
formats := []string{"avi"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Video)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/mjpeg/encoder.go
Normal file
21
encoder/mjpeg/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package mjpeg
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "mjpeg"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "mjpeg"
|
||||||
|
formats := []string{"jpg"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Image)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/mp2/encoder.go
Normal file
21
encoder/mp2/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package mp2
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:a", "mp2"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "mp2"
|
||||||
|
formats := []string{"mp2"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Audio)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/mp2fixed/encoder.go
Normal file
21
encoder/mp2fixed/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package mp2fixed
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:a", "mp2fixed"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "mp2fixed"
|
||||||
|
formats := []string{"mp2"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Audio)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/mpeg1video/encoder.go
Normal file
21
encoder/mpeg1video/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package mpeg1video
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "mpeg1video"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "mpeg1video"
|
||||||
|
formats := []string{"mpg", "mpeg"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Video)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/mpeg2video/encoder.go
Normal file
21
encoder/mpeg2video/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package mpeg2video
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "mpeg2video"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "mpeg2video"
|
||||||
|
formats := []string{"mpg", "mpeg"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Video)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/mpeg4/encoder.go
Normal file
21
encoder/mpeg4/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package mpeg4
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "mpeg4"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "mpeg4"
|
||||||
|
formats := []string{"avi"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Video)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/msmpeg4/encoder.go
Normal file
21
encoder/msmpeg4/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package msmpeg4
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "msmpeg4"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "msmpeg4"
|
||||||
|
formats := []string{"avi"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Video)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/msmpeg4v2/encoder.go
Normal file
21
encoder/msmpeg4v2/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package msmpeg4v2
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "msmpeg4v2"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "msmpeg4v2"
|
||||||
|
formats := []string{"avi"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Video)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/msvideo1/encoder.go
Normal file
21
encoder/msvideo1/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package msvideo1
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "msvideo1"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "msvideo1"
|
||||||
|
formats := []string{"avi"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Video)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/png/encoder.go
Normal file
21
encoder/png/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package png
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "png"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "png"
|
||||||
|
formats := []string{"png"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Image)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/qtrle/encoder.go
Normal file
21
encoder/qtrle/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package qtrle
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "qtrle"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "qtrle"
|
||||||
|
formats := []string{"mov"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Video)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/sgi/encoder.go
Normal file
21
encoder/sgi/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package sgi
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "sgi"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "sgi"
|
||||||
|
formats := []string{"sgi"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Image)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/tiff/encoder.go
Normal file
21
encoder/tiff/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package tiff
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "tiff"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "tiff"
|
||||||
|
formats := []string{"tiff"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Image)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/wmav1/encoder.go
Normal file
21
encoder/wmav1/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package wmav1
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:a", "wmav1"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "wmav1"
|
||||||
|
formats := []string{"wma"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Audio)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/wmav2/encoder.go
Normal file
21
encoder/wmav2/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package wmav2
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:a", "wmav2"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "wmav2"
|
||||||
|
formats := []string{"wma"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Audio)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/wmv1/encoder.go
Normal file
21
encoder/wmv1/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package wmv1
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "wmv1"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "wmv1"
|
||||||
|
formats := []string{"wmv"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Video)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/wmv2/encoder.go
Normal file
21
encoder/wmv2/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package wmv2
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "wmv2"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "wmv2"
|
||||||
|
formats := []string{"wmv"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Video)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
21
encoder/xbm/encoder.go
Normal file
21
encoder/xbm/encoder.go
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package xbm
|
||||||
|
|
||||||
|
import encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
|
||||||
|
type encoder struct {
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewEncoder() encoder2.EncoderContract {
|
||||||
|
return &encoder{}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (e encoder) GetParams() []string {
|
||||||
|
return []string{"-c:v", "xbm"}
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewData() encoder2.EncoderDataContract {
|
||||||
|
title := "xbm"
|
||||||
|
formats := []string{"xbm"}
|
||||||
|
fileType := encoder2.FileType(encoder2.Image)
|
||||||
|
return encoder2.NewData(title, formats, fileType, NewEncoder)
|
||||||
|
}
|
@ -3,6 +3,7 @@ package handler
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/convertor"
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/convertor"
|
||||||
|
error2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/error"
|
||||||
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/helper"
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/helper"
|
||||||
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/kernel"
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/kernel"
|
||||||
"github.com/nicksnyder/go-i18n/v2/i18n"
|
"github.com/nicksnyder/go-i18n/v2/i18n"
|
||||||
@ -18,24 +19,32 @@ type ConvertorHandlerContract interface {
|
|||||||
type ConvertorHandler struct {
|
type ConvertorHandler struct {
|
||||||
app kernel.AppContract
|
app kernel.AppContract
|
||||||
convertorView convertor.ViewContract
|
convertorView convertor.ViewContract
|
||||||
|
errorView error2.ViewContract
|
||||||
convertorRepository convertor.RepositoryContract
|
convertorRepository convertor.RepositoryContract
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewConvertorHandler(
|
func NewConvertorHandler(
|
||||||
app kernel.AppContract,
|
app kernel.AppContract,
|
||||||
convertorView convertor.ViewContract,
|
convertorView convertor.ViewContract,
|
||||||
|
errorView error2.ViewContract,
|
||||||
convertorRepository convertor.RepositoryContract,
|
convertorRepository convertor.RepositoryContract,
|
||||||
) *ConvertorHandler {
|
) *ConvertorHandler {
|
||||||
return &ConvertorHandler{
|
return &ConvertorHandler{
|
||||||
app: app,
|
app: app,
|
||||||
convertorView: convertorView,
|
convertorView: convertorView,
|
||||||
|
errorView: errorView,
|
||||||
convertorRepository: convertorRepository,
|
convertorRepository: convertorRepository,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h ConvertorHandler) MainConvertor() {
|
func (h ConvertorHandler) MainConvertor() {
|
||||||
if h.checkingFFPathUtilities() == true {
|
if h.checkingFFPathUtilities() == true {
|
||||||
h.convertorView.Main(h.runConvert)
|
formats, err := h.app.GetConvertorService().GetSupportFormats()
|
||||||
|
if err != nil {
|
||||||
|
h.errorView.PanicError(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
h.convertorView.Main(h.runConvert, formats)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
h.convertorView.SelectFFPath("", "", h.saveSettingFFPath, nil, h.downloadFFmpeg)
|
h.convertorView.SelectFFPath("", "", h.saveSettingFFPath, nil, h.downloadFFmpeg)
|
||||||
@ -59,11 +68,12 @@ func (h ConvertorHandler) runConvert(setting convertor.HandleConvertSetting) {
|
|||||||
h.app.GetQueue().Add(&kernel.ConvertSetting{
|
h.app.GetQueue().Add(&kernel.ConvertSetting{
|
||||||
VideoFileInput: setting.VideoFileInput,
|
VideoFileInput: setting.VideoFileInput,
|
||||||
VideoFileOut: kernel.File{
|
VideoFileOut: kernel.File{
|
||||||
Path: setting.DirectoryForSave + helper.PathSeparator() + setting.VideoFileInput.Name + ".mp4",
|
Path: setting.DirectoryForSave + helper.PathSeparator() + setting.VideoFileInput.Name + "." + setting.Format,
|
||||||
Name: setting.VideoFileInput.Name,
|
Name: setting.VideoFileInput.Name,
|
||||||
Ext: ".mp4",
|
Ext: "." + setting.Format,
|
||||||
},
|
},
|
||||||
OverwriteOutputFiles: setting.OverwriteOutputFiles,
|
OverwriteOutputFiles: setting.OverwriteOutputFiles,
|
||||||
|
Encoder: setting.Encoder,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ type MenuHandler struct {
|
|||||||
menuView menu.ViewContract
|
menuView menu.ViewContract
|
||||||
localizerView localizer.ViewContract
|
localizerView localizer.ViewContract
|
||||||
localizerRepository localizer.RepositoryContract
|
localizerRepository localizer.RepositoryContract
|
||||||
localizerListener localizerListenerContract
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewMenuHandler(
|
func NewMenuHandler(
|
||||||
@ -28,7 +27,6 @@ func NewMenuHandler(
|
|||||||
menuView menu.ViewContract,
|
menuView menu.ViewContract,
|
||||||
localizerView localizer.ViewContract,
|
localizerView localizer.ViewContract,
|
||||||
localizerRepository localizer.RepositoryContract,
|
localizerRepository localizer.RepositoryContract,
|
||||||
localizerListener localizerListenerContract,
|
|
||||||
) *MenuHandler {
|
) *MenuHandler {
|
||||||
return &MenuHandler{
|
return &MenuHandler{
|
||||||
app: app,
|
app: app,
|
||||||
@ -36,7 +34,6 @@ func NewMenuHandler(
|
|||||||
menuView: menuView,
|
menuView: menuView,
|
||||||
localizerView: localizerView,
|
localizerView: localizerView,
|
||||||
localizerRepository: localizerRepository,
|
localizerRepository: localizerRepository,
|
||||||
localizerListener: localizerListener,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,22 +49,31 @@ func (h MenuHandler) getMenuSettings() *fyne.Menu {
|
|||||||
MessageID: "exit",
|
MessageID: "exit",
|
||||||
}), nil)
|
}), nil)
|
||||||
quit.IsQuit = true
|
quit.IsQuit = true
|
||||||
h.localizerListener.AddMenuItem("exit", quit)
|
h.app.GetLocalizerService().AddChangeCallback("exit", func(text string) {
|
||||||
|
quit.Label = text
|
||||||
|
})
|
||||||
|
|
||||||
languageSelection := fyne.NewMenuItem(h.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
languageSelection := fyne.NewMenuItem(h.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
MessageID: "changeLanguage",
|
MessageID: "changeLanguage",
|
||||||
}), h.LanguageSelection)
|
}), h.LanguageSelection)
|
||||||
h.localizerListener.AddMenuItem("changeLanguage", languageSelection)
|
h.app.GetLocalizerService().AddChangeCallback("changeLanguage", func(text string) {
|
||||||
|
languageSelection.Label = text
|
||||||
|
})
|
||||||
|
|
||||||
ffPathSelection := fyne.NewMenuItem(h.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
ffPathSelection := fyne.NewMenuItem(h.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
MessageID: "changeFFPath",
|
MessageID: "changeFFPath",
|
||||||
}), h.convertorHandler.FfPathSelection)
|
}), h.convertorHandler.FfPathSelection)
|
||||||
h.localizerListener.AddMenuItem("changeFFPath", ffPathSelection)
|
h.app.GetLocalizerService().AddChangeCallback("changeFFPath", func(text string) {
|
||||||
|
ffPathSelection.Label = text
|
||||||
|
})
|
||||||
|
|
||||||
settings := fyne.NewMenu(h.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
settings := fyne.NewMenu(h.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
MessageID: "settings",
|
MessageID: "settings",
|
||||||
}), languageSelection, ffPathSelection, quit)
|
}), languageSelection, ffPathSelection, quit)
|
||||||
h.localizerListener.AddMenu("settings", settings)
|
h.app.GetLocalizerService().AddChangeCallback("settings", func(text string) {
|
||||||
|
settings.Label = text
|
||||||
|
settings.Refresh()
|
||||||
|
})
|
||||||
|
|
||||||
return settings
|
return settings
|
||||||
}
|
}
|
||||||
@ -76,12 +82,17 @@ func (h MenuHandler) getMenuHelp() *fyne.Menu {
|
|||||||
about := fyne.NewMenuItem(h.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
about := fyne.NewMenuItem(h.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
MessageID: "about",
|
MessageID: "about",
|
||||||
}), h.openAbout)
|
}), h.openAbout)
|
||||||
h.localizerListener.AddMenuItem("about", about)
|
h.app.GetLocalizerService().AddChangeCallback("about", func(text string) {
|
||||||
|
about.Label = text
|
||||||
|
})
|
||||||
|
|
||||||
help := fyne.NewMenu(h.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
help := fyne.NewMenu(h.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
|
||||||
MessageID: "help",
|
MessageID: "help",
|
||||||
}), about)
|
}), about)
|
||||||
h.localizerListener.AddMenu("help", help)
|
h.app.GetLocalizerService().AddChangeCallback("help", func(text string) {
|
||||||
|
help.Label = text
|
||||||
|
help.Refresh()
|
||||||
|
})
|
||||||
|
|
||||||
return help
|
return help
|
||||||
}
|
}
|
||||||
@ -109,41 +120,3 @@ func (h MenuHandler) LanguageSelection() {
|
|||||||
h.convertorHandler.MainConvertor()
|
h.convertorHandler.MainConvertor()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
type menuItems struct {
|
|
||||||
menuItem map[string]*fyne.MenuItem
|
|
||||||
menu map[string]*fyne.Menu
|
|
||||||
}
|
|
||||||
|
|
||||||
type LocalizerListener struct {
|
|
||||||
menuItems *menuItems
|
|
||||||
}
|
|
||||||
|
|
||||||
type localizerListenerContract interface {
|
|
||||||
AddMenu(messageID string, menu *fyne.Menu)
|
|
||||||
AddMenuItem(messageID string, menuItem *fyne.MenuItem)
|
|
||||||
}
|
|
||||||
|
|
||||||
func NewLocalizerListener() *LocalizerListener {
|
|
||||||
return &LocalizerListener{
|
|
||||||
&menuItems{menuItem: map[string]*fyne.MenuItem{}, menu: map[string]*fyne.Menu{}},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l LocalizerListener) AddMenu(messageID string, menu *fyne.Menu) {
|
|
||||||
l.menuItems.menu[messageID] = menu
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l LocalizerListener) AddMenuItem(messageID string, menuItem *fyne.MenuItem) {
|
|
||||||
l.menuItems.menuItem[messageID] = menuItem
|
|
||||||
}
|
|
||||||
|
|
||||||
func (l LocalizerListener) Change(localizerService kernel.LocalizerContract) {
|
|
||||||
for messageID, menu := range l.menuItems.menuItem {
|
|
||||||
menu.Label = localizerService.GetMessage(&i18n.LocalizeConfig{MessageID: messageID})
|
|
||||||
}
|
|
||||||
for messageID, menu := range l.menuItems.menu {
|
|
||||||
menu.Label = localizerService.GetMessage(&i18n.LocalizeConfig{MessageID: messageID})
|
|
||||||
menu.Refresh()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 64 KiB |
@ -1,8 +1,11 @@
|
|||||||
package kernel
|
package kernel
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bufio"
|
||||||
"errors"
|
"errors"
|
||||||
|
encoder2 "git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/helper"
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/helper"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/kernel/encoder"
|
||||||
"io"
|
"io"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"regexp"
|
"regexp"
|
||||||
@ -10,6 +13,19 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
type File struct {
|
||||||
|
Path string
|
||||||
|
Name string
|
||||||
|
Ext string
|
||||||
|
}
|
||||||
|
|
||||||
|
type ConvertSetting struct {
|
||||||
|
VideoFileInput File
|
||||||
|
VideoFileOut File
|
||||||
|
OverwriteOutputFiles bool
|
||||||
|
Encoder encoder2.EncoderContract
|
||||||
|
}
|
||||||
|
|
||||||
type ConvertorContract interface {
|
type ConvertorContract interface {
|
||||||
RunConvert(setting ConvertSetting, progress ProgressContract) error
|
RunConvert(setting ConvertSetting, progress ProgressContract) error
|
||||||
GetTotalDuration(file *File) (float64, error)
|
GetTotalDuration(file *File) (float64, error)
|
||||||
@ -18,6 +34,7 @@ type ConvertorContract interface {
|
|||||||
ChangeFFmpegPath(path string) (bool, error)
|
ChangeFFmpegPath(path string) (bool, error)
|
||||||
ChangeFFprobePath(path string) (bool, error)
|
ChangeFFprobePath(path string) (bool, error)
|
||||||
GetRunningProcesses() map[int]*exec.Cmd
|
GetRunningProcesses() map[int]*exec.Cmd
|
||||||
|
GetSupportFormats() (encoder.ConvertorFormatsContract, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type ProgressContract interface {
|
type ProgressContract interface {
|
||||||
@ -56,7 +73,9 @@ func (s Convertor) RunConvert(setting ConvertSetting, progress ProgressContract)
|
|||||||
if setting.OverwriteOutputFiles == true {
|
if setting.OverwriteOutputFiles == true {
|
||||||
overwriteOutputFiles = "-y"
|
overwriteOutputFiles = "-y"
|
||||||
}
|
}
|
||||||
args := []string{overwriteOutputFiles, "-i", setting.VideoFileInput.Path, "-c:v", "libx264", "-progress", progress.GetProtocole(), setting.VideoFileOut.Path}
|
args := []string{overwriteOutputFiles, "-i", setting.VideoFileInput.Path}
|
||||||
|
args = append(args, setting.Encoder.GetParams()...)
|
||||||
|
args = append(args, "-progress", progress.GetProtocole(), setting.VideoFileOut.Path)
|
||||||
cmd := exec.Command(s.ffPathUtilities.FFmpeg, args...)
|
cmd := exec.Command(s.ffPathUtilities.FFmpeg, args...)
|
||||||
helper.PrepareBackgroundCommand(cmd)
|
helper.PrepareBackgroundCommand(cmd)
|
||||||
|
|
||||||
@ -103,7 +122,30 @@ func (s Convertor) GetTotalDuration(file *File) (duration float64, err error) {
|
|||||||
}
|
}
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
return strconv.ParseFloat(strings.TrimSpace(string(out)), 64)
|
frames := strings.TrimSpace(string(out))
|
||||||
|
if len(frames) == 0 {
|
||||||
|
return s.getAlternativeTotalDuration(file)
|
||||||
|
}
|
||||||
|
return strconv.ParseFloat(frames, 64)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s Convertor) getAlternativeTotalDuration(file *File) (duration float64, err error) {
|
||||||
|
args := []string{"-v", "error", "-select_streams", "a:0", "-count_packets", "-show_entries", "stream=nb_read_packets", "-of", "csv=p=0", file.Path}
|
||||||
|
cmd := exec.Command(s.ffPathUtilities.FFprobe, args...)
|
||||||
|
helper.PrepareBackgroundCommand(cmd)
|
||||||
|
out, err := cmd.CombinedOutput()
|
||||||
|
if err != nil {
|
||||||
|
errString := strings.TrimSpace(string(out))
|
||||||
|
if len(errString) > 1 {
|
||||||
|
return 0, errors.New(errString)
|
||||||
|
}
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
frames := strings.TrimSpace(string(out))
|
||||||
|
if len(frames) == 0 {
|
||||||
|
return 0, errors.New("error getting number of frames")
|
||||||
|
}
|
||||||
|
return strconv.ParseFloat(frames, 64)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s Convertor) GetFFmpegVesrion() (string, error) {
|
func (s Convertor) GetFFmpegVesrion() (string, error) {
|
||||||
@ -156,6 +198,46 @@ func (s Convertor) ChangeFFprobePath(path string) (bool, error) {
|
|||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s Convertor) GetSupportFormats() (encoder.ConvertorFormatsContract, error) {
|
||||||
|
formats := encoder.NewConvertorFormats()
|
||||||
|
cmd := exec.Command(s.ffPathUtilities.FFmpeg, "-encoders")
|
||||||
|
helper.PrepareBackgroundCommand(cmd)
|
||||||
|
|
||||||
|
stdOut, err := cmd.StdoutPipe()
|
||||||
|
if err != nil {
|
||||||
|
return formats, err
|
||||||
|
}
|
||||||
|
|
||||||
|
err = cmd.Start()
|
||||||
|
if err != nil {
|
||||||
|
return formats, err
|
||||||
|
}
|
||||||
|
|
||||||
|
scannerErr := bufio.NewReader(stdOut)
|
||||||
|
for {
|
||||||
|
line, _, err := scannerErr.ReadLine()
|
||||||
|
if err != nil {
|
||||||
|
if err == io.EOF {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
text := strings.Split(strings.TrimSpace(string(line)), " ")
|
||||||
|
encoderType := string(text[0][0])
|
||||||
|
if len(text) < 2 || (encoderType != "V" && encoderType != "A") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
formats.NewEncoder(text[1])
|
||||||
|
}
|
||||||
|
|
||||||
|
err = cmd.Wait()
|
||||||
|
if err != nil {
|
||||||
|
return formats, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return formats, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (s Convertor) GetRunningProcesses() map[int]*exec.Cmd {
|
func (s Convertor) GetRunningProcesses() map[int]*exec.Cmd {
|
||||||
return s.runningProcesses.items
|
return s.runningProcesses.items
|
||||||
}
|
}
|
||||||
|
84
kernel/encoder/encoder.go
Normal file
84
kernel/encoder/encoder.go
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
package encoder
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ConvertorFormatContract interface {
|
||||||
|
GetTitle() string
|
||||||
|
AddEncoder(encoder encoder.EncoderDataContract)
|
||||||
|
GetFileType() encoder.FileTypeContract
|
||||||
|
GetEncoders() map[int]encoder.EncoderDataContract
|
||||||
|
}
|
||||||
|
|
||||||
|
type ConvertorFormat struct {
|
||||||
|
title string
|
||||||
|
fileType encoder.FileTypeContract
|
||||||
|
encoders map[int]encoder.EncoderDataContract
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewConvertorFormat(title string, fileType encoder.FileTypeContract) *ConvertorFormat {
|
||||||
|
return &ConvertorFormat{
|
||||||
|
title: title,
|
||||||
|
fileType: fileType,
|
||||||
|
encoders: map[int]encoder.EncoderDataContract{},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f ConvertorFormat) GetTitle() string {
|
||||||
|
return f.title
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f ConvertorFormat) AddEncoder(encoder encoder.EncoderDataContract) {
|
||||||
|
f.encoders[len(f.encoders)] = encoder
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f ConvertorFormat) GetEncoders() map[int]encoder.EncoderDataContract {
|
||||||
|
return f.encoders
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f ConvertorFormat) GetFileType() encoder.FileTypeContract {
|
||||||
|
return f.fileType
|
||||||
|
}
|
||||||
|
|
||||||
|
type ConvertorFormatsContract interface {
|
||||||
|
NewEncoder(encoderName string) bool
|
||||||
|
GetFormats() map[string]ConvertorFormatContract
|
||||||
|
GetFormat(format string) (ConvertorFormatContract, error)
|
||||||
|
}
|
||||||
|
|
||||||
|
type ConvertorFormats struct {
|
||||||
|
formats map[string]ConvertorFormatContract
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewConvertorFormats() *ConvertorFormats {
|
||||||
|
return &ConvertorFormats{
|
||||||
|
formats: map[string]ConvertorFormatContract{},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f ConvertorFormats) NewEncoder(encoderName string) bool {
|
||||||
|
if supportEncoders[encoderName] == nil {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
data := supportEncoders[encoderName]()
|
||||||
|
for _, format := range data.GetFormats() {
|
||||||
|
if f.formats[format] == nil {
|
||||||
|
f.formats[format] = NewConvertorFormat(format, data.GetFileType())
|
||||||
|
}
|
||||||
|
f.formats[format].AddEncoder(data)
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f ConvertorFormats) GetFormats() map[string]ConvertorFormatContract {
|
||||||
|
return f.formats
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f ConvertorFormats) GetFormat(format string) (ConvertorFormatContract, error) {
|
||||||
|
if f.formats[format] == nil {
|
||||||
|
return ConvertorFormat{}, errors.New("not found ConvertorFormat")
|
||||||
|
}
|
||||||
|
return f.formats[format], nil
|
||||||
|
}
|
74
kernel/encoder/encoders.go
Normal file
74
kernel/encoder/encoders.go
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
package encoder
|
||||||
|
|
||||||
|
import (
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/apng"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/bmp"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/flv"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/gif"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/h264_nvenc"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/libmp3lame"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/libshine"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/libtwolame"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/libvpx"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/libvpx_vp9"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/libwebp"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/libwebp_anim"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/libx264"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/libx265"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/libxvid"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/mjpeg"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/mp2"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/mp2fixed"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/mpeg1video"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/mpeg2video"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/mpeg4"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/msmpeg4"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/msmpeg4v2"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/msvideo1"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/png"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/qtrle"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/sgi"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/tiff"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/wmav1"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/wmav2"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/wmv1"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/wmv2"
|
||||||
|
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/encoder/xbm"
|
||||||
|
)
|
||||||
|
|
||||||
|
var supportEncoders = map[string]func() encoder.EncoderDataContract{
|
||||||
|
"libx264": libx264.NewData,
|
||||||
|
"h264_nvenc": h264_nvenc.NewData,
|
||||||
|
"libx265": libx265.NewData,
|
||||||
|
"png": png.NewData,
|
||||||
|
"gif": gif.NewData,
|
||||||
|
"flv": flv.NewData,
|
||||||
|
"apng": apng.NewData,
|
||||||
|
"bmp": bmp.NewData,
|
||||||
|
"mjpeg": mjpeg.NewData,
|
||||||
|
"mpeg1video": mpeg1video.NewData,
|
||||||
|
"mpeg2video": mpeg2video.NewData,
|
||||||
|
"mpeg4": mpeg4.NewData,
|
||||||
|
"libxvid": libxvid.NewData,
|
||||||
|
"msmpeg4v2": msmpeg4v2.NewData,
|
||||||
|
"msmpeg4": msmpeg4.NewData,
|
||||||
|
"msvideo1": msvideo1.NewData,
|
||||||
|
"qtrle": qtrle.NewData,
|
||||||
|
"tiff": tiff.NewData,
|
||||||
|
"sgi": sgi.NewData,
|
||||||
|
"libvpx": libvpx.NewData,
|
||||||
|
"libvpx-vp9": libvpx_vp9.NewData,
|
||||||
|
"libwebp_anim": libwebp_anim.NewData,
|
||||||
|
"libwebp": libwebp.NewData,
|
||||||
|
"wmv1": wmv1.NewData,
|
||||||
|
"wmv2": wmv2.NewData,
|
||||||
|
"xbm": xbm.NewData,
|
||||||
|
"mp2": mp2.NewData,
|
||||||
|
"mp2fixed": mp2fixed.NewData,
|
||||||
|
"libtwolame": libtwolame.NewData,
|
||||||
|
"libmp3lame": libmp3lame.NewData,
|
||||||
|
"libshine": libshine.NewData,
|
||||||
|
"wmav1": wmav1.NewData,
|
||||||
|
"wmav2": wmav2.NewData,
|
||||||
|
}
|
300
kernel/layout.go
300
kernel/layout.go
@ -65,7 +65,7 @@ type QueueLayoutObject struct {
|
|||||||
container *fyne.Container
|
container *fyne.Container
|
||||||
items map[int]QueueLayoutItem
|
items map[int]QueueLayoutItem
|
||||||
localizerService LocalizerContract
|
localizerService LocalizerContract
|
||||||
layoutLocalizerListener LayoutLocalizerListenerContract
|
queueStatisticsFormat *queueStatisticsFormat
|
||||||
}
|
}
|
||||||
|
|
||||||
type QueueLayoutItem struct {
|
type QueueLayoutItem struct {
|
||||||
@ -73,20 +73,31 @@ type QueueLayoutItem struct {
|
|||||||
ProgressBar *widget.ProgressBar
|
ProgressBar *widget.ProgressBar
|
||||||
StatusMessage *canvas.Text
|
StatusMessage *canvas.Text
|
||||||
MessageError *canvas.Text
|
MessageError *canvas.Text
|
||||||
|
|
||||||
|
status *StatusContract
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewQueueLayoutObject(queue QueueListContract, localizerService LocalizerContract, layoutLocalizerListener LayoutLocalizerListenerContract) *QueueLayoutObject {
|
func NewQueueLayoutObject(queue QueueListContract, localizerService LocalizerContract) *QueueLayoutObject {
|
||||||
title := widget.NewLabel(localizerService.GetMessage(&i18n.LocalizeConfig{MessageID: "queue"}) + ":")
|
title := widget.NewLabel(localizerService.GetMessage(&i18n.LocalizeConfig{MessageID: "queue"}))
|
||||||
title.TextStyle.Bold = true
|
title.TextStyle.Bold = true
|
||||||
|
|
||||||
layoutLocalizerListener.AddItem("queue", title)
|
localizerService.AddChangeCallback("queue", func(text string) {
|
||||||
|
title.Text = text
|
||||||
|
title.Refresh()
|
||||||
|
})
|
||||||
|
|
||||||
|
items := map[int]QueueLayoutItem{}
|
||||||
|
queueStatisticsFormat := newQueueStatisticsFormat(localizerService, &items)
|
||||||
|
|
||||||
queueLayoutObject := &QueueLayoutObject{
|
queueLayoutObject := &QueueLayoutObject{
|
||||||
queue: queue,
|
queue: queue,
|
||||||
container: container.NewVBox(title),
|
container: container.NewVBox(
|
||||||
items: map[int]QueueLayoutItem{},
|
container.NewHBox(title, queueStatisticsFormat.completed.widget, queueStatisticsFormat.error.widget),
|
||||||
|
container.NewHBox(queueStatisticsFormat.inProgress.widget, queueStatisticsFormat.waiting.widget, queueStatisticsFormat.total.widget),
|
||||||
|
),
|
||||||
|
items: items,
|
||||||
localizerService: localizerService,
|
localizerService: localizerService,
|
||||||
layoutLocalizerListener: layoutLocalizerListener,
|
queueStatisticsFormat: queueStatisticsFormat,
|
||||||
}
|
}
|
||||||
|
|
||||||
queue.AddListener(queueLayoutObject)
|
queue.AddListener(queueLayoutObject)
|
||||||
@ -118,11 +129,18 @@ func (o QueueLayoutObject) Add(id int, queue *Queue) {
|
|||||||
canvas.NewLine(theme.FocusColor()),
|
canvas.NewLine(theme.FocusColor()),
|
||||||
container.NewPadded(),
|
container.NewPadded(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
o.queueStatisticsFormat.addQueue()
|
||||||
|
if o.queueStatisticsFormat.isChecked(queue.Status) == false {
|
||||||
|
content.Hide()
|
||||||
|
}
|
||||||
|
|
||||||
o.items[id] = QueueLayoutItem{
|
o.items[id] = QueueLayoutItem{
|
||||||
CanvasObject: content,
|
CanvasObject: content,
|
||||||
ProgressBar: progressBar,
|
ProgressBar: progressBar,
|
||||||
StatusMessage: statusMessage,
|
StatusMessage: statusMessage,
|
||||||
MessageError: messageError,
|
MessageError: messageError,
|
||||||
|
status: &queue.Status,
|
||||||
}
|
}
|
||||||
o.container.Add(content)
|
o.container.Add(content)
|
||||||
}
|
}
|
||||||
@ -130,6 +148,7 @@ func (o QueueLayoutObject) Add(id int, queue *Queue) {
|
|||||||
func (o QueueLayoutObject) Remove(id int) {
|
func (o QueueLayoutObject) Remove(id int) {
|
||||||
if item, ok := o.items[id]; ok {
|
if item, ok := o.items[id]; ok {
|
||||||
o.container.Remove(item.CanvasObject)
|
o.container.Remove(item.CanvasObject)
|
||||||
|
o.queueStatisticsFormat.removeQueue(*item.status)
|
||||||
o.items[id] = QueueLayoutItem{}
|
o.items[id] = QueueLayoutItem{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -145,6 +164,12 @@ func (o QueueLayoutObject) ChangeQueueStatus(queueId int, queue *Queue) {
|
|||||||
item.MessageError.Color = statusColor
|
item.MessageError.Color = statusColor
|
||||||
item.MessageError.Refresh()
|
item.MessageError.Refresh()
|
||||||
}
|
}
|
||||||
|
if o.queueStatisticsFormat.isChecked(queue.Status) == false && item.CanvasObject.Visible() == true {
|
||||||
|
item.CanvasObject.Hide()
|
||||||
|
} else if item.CanvasObject.Visible() == false {
|
||||||
|
item.CanvasObject.Show()
|
||||||
|
}
|
||||||
|
o.queueStatisticsFormat.changeQueue(queue.Status)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -161,7 +186,7 @@ func (o QueueLayoutObject) getStatusColor(status StatusContract) color.Color {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (o QueueLayoutObject) getStatusTitle(status StatusContract) string {
|
func (o QueueLayoutObject) getStatusTitle(status StatusContract) string {
|
||||||
return o.localizerService.GetMessage(&i18n.LocalizeConfig{MessageID: status.name()})
|
return o.localizerService.GetMessage(&i18n.LocalizeConfig{MessageID: status.Name() + "Queue"})
|
||||||
}
|
}
|
||||||
|
|
||||||
type Progress struct {
|
type Progress struct {
|
||||||
@ -254,35 +279,256 @@ func (p Progress) Run(stdOut io.ReadCloser, stdErr io.ReadCloser) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type LayoutLocalizerItem struct {
|
type queueStatistics struct {
|
||||||
messageID string
|
widget *widget.Check
|
||||||
object *widget.Label
|
title string
|
||||||
|
count *int64
|
||||||
|
}
|
||||||
|
type queueStatisticsFormat struct {
|
||||||
|
waiting *queueStatistics
|
||||||
|
inProgress *queueStatistics
|
||||||
|
completed *queueStatistics
|
||||||
|
error *queueStatistics
|
||||||
|
total *queueStatistics
|
||||||
}
|
}
|
||||||
|
|
||||||
type LayoutLocalizerListener struct {
|
func newQueueStatisticsFormat(localizerService LocalizerContract, queueItems *map[int]QueueLayoutItem) *queueStatisticsFormat {
|
||||||
itemCurrentId int
|
checkWaiting := newQueueStatistics("waitingQueue", localizerService)
|
||||||
items map[int]*LayoutLocalizerItem
|
checkInProgress := newQueueStatistics("inProgressQueue", localizerService)
|
||||||
|
checkCompleted := newQueueStatistics("completedQueue", localizerService)
|
||||||
|
checkError := newQueueStatistics("errorQueue", localizerService)
|
||||||
|
checkTotal := newQueueStatistics("total", localizerService)
|
||||||
|
|
||||||
|
queueStatisticsFormat := &queueStatisticsFormat{
|
||||||
|
waiting: checkWaiting,
|
||||||
|
inProgress: checkInProgress,
|
||||||
|
completed: checkCompleted,
|
||||||
|
error: checkError,
|
||||||
|
total: checkTotal,
|
||||||
}
|
}
|
||||||
|
|
||||||
type LayoutLocalizerListenerContract interface {
|
checkTotal.widget.OnChanged = func(b bool) {
|
||||||
AddItem(messageID string, object *widget.Label)
|
if b == true {
|
||||||
|
queueStatisticsFormat.allCheckboxChecked()
|
||||||
|
} else {
|
||||||
|
queueStatisticsFormat.allUnCheckboxChecked()
|
||||||
|
}
|
||||||
|
queueStatisticsFormat.redrawingQueueItems(queueItems)
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewLayoutLocalizerListener() *LayoutLocalizerListener {
|
queueStatisticsFormat.waiting.widget.OnChanged = func(b bool) {
|
||||||
return &LayoutLocalizerListener{
|
if b == true {
|
||||||
itemCurrentId: 0,
|
queueStatisticsFormat.checkboxChecked()
|
||||||
items: map[int]*LayoutLocalizerItem{},
|
} else {
|
||||||
|
queueStatisticsFormat.unCheckboxChecked()
|
||||||
|
}
|
||||||
|
queueStatisticsFormat.redrawingQueueItems(queueItems)
|
||||||
|
}
|
||||||
|
|
||||||
|
queueStatisticsFormat.inProgress.widget.OnChanged = func(b bool) {
|
||||||
|
if b == true {
|
||||||
|
queueStatisticsFormat.checkboxChecked()
|
||||||
|
} else {
|
||||||
|
queueStatisticsFormat.unCheckboxChecked()
|
||||||
|
}
|
||||||
|
queueStatisticsFormat.redrawingQueueItems(queueItems)
|
||||||
|
}
|
||||||
|
|
||||||
|
queueStatisticsFormat.completed.widget.OnChanged = func(b bool) {
|
||||||
|
if b == true {
|
||||||
|
queueStatisticsFormat.checkboxChecked()
|
||||||
|
} else {
|
||||||
|
queueStatisticsFormat.unCheckboxChecked()
|
||||||
|
}
|
||||||
|
queueStatisticsFormat.redrawingQueueItems(queueItems)
|
||||||
|
}
|
||||||
|
|
||||||
|
queueStatisticsFormat.error.widget.OnChanged = func(b bool) {
|
||||||
|
if b == true {
|
||||||
|
queueStatisticsFormat.checkboxChecked()
|
||||||
|
} else {
|
||||||
|
queueStatisticsFormat.unCheckboxChecked()
|
||||||
|
}
|
||||||
|
queueStatisticsFormat.redrawingQueueItems(queueItems)
|
||||||
|
}
|
||||||
|
|
||||||
|
return queueStatisticsFormat
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f queueStatisticsFormat) redrawingQueueItems(queueItems *map[int]QueueLayoutItem) {
|
||||||
|
for _, item := range *queueItems {
|
||||||
|
if f.isChecked(*item.status) == true && item.CanvasObject.Visible() == false {
|
||||||
|
item.CanvasObject.Show()
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if f.isChecked(*item.status) == false && item.CanvasObject.Visible() == true {
|
||||||
|
item.CanvasObject.Hide()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l LayoutLocalizerListener) AddItem(messageID string, object *widget.Label) {
|
func (f queueStatisticsFormat) isChecked(status StatusContract) bool {
|
||||||
l.itemCurrentId += 1
|
if status == StatusType(InProgress) {
|
||||||
l.items[l.itemCurrentId] = &LayoutLocalizerItem{messageID: messageID, object: object}
|
return f.inProgress.widget.Checked
|
||||||
|
}
|
||||||
|
if status == StatusType(Completed) {
|
||||||
|
return f.completed.widget.Checked
|
||||||
|
}
|
||||||
|
if status == StatusType(Error) {
|
||||||
|
return f.error.widget.Checked
|
||||||
|
}
|
||||||
|
if status == StatusType(Waiting) {
|
||||||
|
return f.waiting.widget.Checked
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l LayoutLocalizerListener) Change(localizerService LocalizerContract) {
|
return true
|
||||||
for _, item := range l.items {
|
}
|
||||||
item.object.Text = localizerService.GetMessage(&i18n.LocalizeConfig{MessageID: item.messageID})
|
|
||||||
item.object.Refresh()
|
func (f queueStatisticsFormat) addQueue() {
|
||||||
|
f.waiting.add()
|
||||||
|
f.total.add()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f queueStatisticsFormat) changeQueue(status StatusContract) {
|
||||||
|
if status == StatusType(InProgress) {
|
||||||
|
f.waiting.remove()
|
||||||
|
f.inProgress.add()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if status == StatusType(Completed) {
|
||||||
|
f.inProgress.remove()
|
||||||
|
f.completed.add()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if status == StatusType(Error) {
|
||||||
|
f.inProgress.remove()
|
||||||
|
f.error.add()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f queueStatisticsFormat) removeQueue(status StatusContract) {
|
||||||
|
f.total.remove()
|
||||||
|
|
||||||
|
if status == StatusType(Completed) {
|
||||||
|
f.completed.remove()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if status == StatusType(Error) {
|
||||||
|
f.error.remove()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if status == StatusType(InProgress) {
|
||||||
|
f.inProgress.remove()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if status == StatusType(Waiting) {
|
||||||
|
f.waiting.remove()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f queueStatisticsFormat) checkboxChecked() {
|
||||||
|
if f.total.widget.Checked == true {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if f.waiting.widget.Checked == false {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if f.inProgress.widget.Checked == false {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if f.completed.widget.Checked == false {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if f.error.widget.Checked == false {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
f.total.widget.Checked = true
|
||||||
|
f.total.widget.Refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f queueStatisticsFormat) unCheckboxChecked() {
|
||||||
|
if f.total.widget.Checked == false {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
f.total.widget.Checked = false
|
||||||
|
f.total.widget.Refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f queueStatisticsFormat) allCheckboxChecked() {
|
||||||
|
f.waiting.widget.Checked = true
|
||||||
|
f.waiting.widget.Refresh()
|
||||||
|
f.inProgress.widget.Checked = true
|
||||||
|
f.inProgress.widget.Refresh()
|
||||||
|
f.completed.widget.Checked = true
|
||||||
|
f.completed.widget.Refresh()
|
||||||
|
f.error.widget.Checked = true
|
||||||
|
f.error.widget.Refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f queueStatisticsFormat) allUnCheckboxChecked() {
|
||||||
|
f.waiting.widget.Checked = false
|
||||||
|
f.waiting.widget.Refresh()
|
||||||
|
f.inProgress.widget.Checked = false
|
||||||
|
f.inProgress.widget.Refresh()
|
||||||
|
f.completed.widget.Checked = false
|
||||||
|
f.completed.widget.Refresh()
|
||||||
|
f.error.widget.Checked = false
|
||||||
|
f.error.widget.Refresh()
|
||||||
|
}
|
||||||
|
|
||||||
|
func newQueueStatistics(messaigeID string, localizerService LocalizerContract) *queueStatistics {
|
||||||
|
checkbox := widget.NewCheck("", nil)
|
||||||
|
checkbox.Checked = true
|
||||||
|
|
||||||
|
count := int64(0)
|
||||||
|
|
||||||
|
title := localizerService.GetMessage(&i18n.LocalizeConfig{MessageID: messaigeID})
|
||||||
|
queueStatistics := &queueStatistics{
|
||||||
|
widget: checkbox,
|
||||||
|
title: strings.ToLower(title),
|
||||||
|
count: &count,
|
||||||
|
}
|
||||||
|
|
||||||
|
queueStatistics.formatText(false)
|
||||||
|
|
||||||
|
localizerService.AddChangeCallback(messaigeID, func(text string) {
|
||||||
|
queueStatistics.title = strings.ToLower(text)
|
||||||
|
queueStatistics.formatText(true)
|
||||||
|
queueStatistics.widget.Refresh()
|
||||||
|
})
|
||||||
|
|
||||||
|
return queueStatistics
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s queueStatistics) add() {
|
||||||
|
*s.count += 1
|
||||||
|
s.formatText(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s queueStatistics) remove() {
|
||||||
|
if *s.count == 0 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
*s.count -= 1
|
||||||
|
s.formatText(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s queueStatistics) formatText(refresh bool) {
|
||||||
|
s.widget.Text = s.title + ": " + strconv.FormatInt(*s.count, 10)
|
||||||
|
if refresh == true {
|
||||||
|
s.widget.Refresh()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,11 +16,7 @@ type LocalizerContract interface {
|
|||||||
SetCurrentLanguage(lang Lang) error
|
SetCurrentLanguage(lang Lang) error
|
||||||
SetCurrentLanguageByCode(code string) error
|
SetCurrentLanguageByCode(code string) error
|
||||||
GetCurrentLanguage() *CurrentLanguage
|
GetCurrentLanguage() *CurrentLanguage
|
||||||
AddListener(listener LocalizerListenerContract)
|
AddChangeCallback(messageID string, callback func(text string))
|
||||||
}
|
|
||||||
|
|
||||||
type LocalizerListenerContract interface {
|
|
||||||
Change(localizerService LocalizerContract)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Lang struct {
|
type Lang struct {
|
||||||
@ -34,11 +30,16 @@ type CurrentLanguage struct {
|
|||||||
localizerDefault *i18n.Localizer
|
localizerDefault *i18n.Localizer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type changeCallback struct {
|
||||||
|
messageID string
|
||||||
|
callback func(text string)
|
||||||
|
}
|
||||||
|
|
||||||
type Localizer struct {
|
type Localizer struct {
|
||||||
bundle *i18n.Bundle
|
bundle *i18n.Bundle
|
||||||
languages []Lang
|
languages []Lang
|
||||||
currentLanguage *CurrentLanguage
|
currentLanguage *CurrentLanguage
|
||||||
localizerListener map[int]LocalizerListenerContract
|
changeCallbacks map[int]*changeCallback
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewLocalizer(directory string, languageDefault language.Tag) (*Localizer, error) {
|
func NewLocalizer(directory string, languageDefault language.Tag) (*Localizer, error) {
|
||||||
@ -63,7 +64,7 @@ func NewLocalizer(directory string, languageDefault language.Tag) (*Localizer, e
|
|||||||
localizer: localizerDefault,
|
localizer: localizerDefault,
|
||||||
localizerDefault: localizerDefault,
|
localizerDefault: localizerDefault,
|
||||||
},
|
},
|
||||||
localizerListener: map[int]LocalizerListenerContract{},
|
changeCallbacks: map[int]*changeCallback{},
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,13 +124,14 @@ func (l Localizer) GetCurrentLanguage() *CurrentLanguage {
|
|||||||
return l.currentLanguage
|
return l.currentLanguage
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l Localizer) AddListener(listener LocalizerListenerContract) {
|
func (l Localizer) AddChangeCallback(messageID string, callback func(text string)) {
|
||||||
l.localizerListener[len(l.localizerListener)] = listener
|
l.changeCallbacks[len(l.changeCallbacks)] = &changeCallback{messageID: messageID, callback: callback}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l Localizer) eventSetCurrentLanguage() {
|
func (l Localizer) eventSetCurrentLanguage() {
|
||||||
for _, listener := range l.localizerListener {
|
for _, changeCallback := range l.changeCallbacks {
|
||||||
listener.Change(l)
|
text := l.GetMessage(&i18n.LocalizeConfig{MessageID: changeCallback.messageID})
|
||||||
|
changeCallback.callback(text)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,21 +10,9 @@ type Queue struct {
|
|||||||
Error error
|
Error error
|
||||||
}
|
}
|
||||||
|
|
||||||
type File struct {
|
|
||||||
Path string
|
|
||||||
Name string
|
|
||||||
Ext string
|
|
||||||
}
|
|
||||||
|
|
||||||
type ConvertSetting struct {
|
|
||||||
VideoFileInput File
|
|
||||||
VideoFileOut File
|
|
||||||
OverwriteOutputFiles bool
|
|
||||||
}
|
|
||||||
|
|
||||||
type StatusContract interface {
|
type StatusContract interface {
|
||||||
name() string
|
Name() string
|
||||||
ordinal() int
|
Ordinal() int
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -43,11 +31,11 @@ var statusTypeStrings = []string{
|
|||||||
"error",
|
"error",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (status StatusType) name() string {
|
func (status StatusType) Name() string {
|
||||||
return statusTypeStrings[status]
|
return statusTypeStrings[status]
|
||||||
}
|
}
|
||||||
|
|
||||||
func (status StatusType) ordinal() int {
|
func (status StatusType) Ordinal() int {
|
||||||
return int(status)
|
return int(status)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ other = "Allow file to be overwritten"
|
|||||||
hash = "sha1-f60bb5f761024d973834b5e9d25ceebce2c85f94"
|
hash = "sha1-f60bb5f761024d973834b5e9d25ceebce2c85f94"
|
||||||
other = "choose"
|
other = "choose"
|
||||||
|
|
||||||
[completed]
|
[completedQueue]
|
||||||
hash = "sha1-398c7d4f7b0d522afb930769c0fbb1a9f4b61fbe"
|
hash = "sha1-398c7d4f7b0d522afb930769c0fbb1a9f4b61fbe"
|
||||||
other = "Completed"
|
other = "Completed"
|
||||||
|
|
||||||
@ -47,8 +47,8 @@ hash = "sha1-7ac460f3c24c9952082f2db6e4d62f752598709c"
|
|||||||
other = "Convert"
|
other = "Convert"
|
||||||
|
|
||||||
[converterVideoFilesTitle]
|
[converterVideoFilesTitle]
|
||||||
hash = "sha1-4d972809e4c7f9c9ff2c110a126bbc183c9429ce"
|
hash = "sha1-1ab29597cc9dfefab08e54ea5442e7ffa15f0394"
|
||||||
other = "Converter video files to mp4"
|
other = "Video, audio and picture converter"
|
||||||
|
|
||||||
[download]
|
[download]
|
||||||
hash = "sha1-fe8f79f29da457de2f6bc9531de6e536e0c426ad"
|
hash = "sha1-fe8f79f29da457de2f6bc9531de6e536e0c426ad"
|
||||||
@ -62,6 +62,138 @@ other = "Will be downloaded from the site:"
|
|||||||
hash = "sha1-55f87f114628fa2d5d8e67d1e1cda22c0e4f9271"
|
hash = "sha1-55f87f114628fa2d5d8e67d1e1cda22c0e4f9271"
|
||||||
other = "Downloading..."
|
other = "Downloading..."
|
||||||
|
|
||||||
|
[encoder_apng]
|
||||||
|
hash = "sha1-1cbd9abfef96d5614a7e569161b41bd6ad87bbaf"
|
||||||
|
other = "APNG image"
|
||||||
|
|
||||||
|
[encoder_bmp]
|
||||||
|
hash = "sha1-e0b9c16b016961a5abdc2217e8ffd1ba7ddebc40"
|
||||||
|
other = "BMP image"
|
||||||
|
|
||||||
|
[encoder_flv]
|
||||||
|
hash = "sha1-3602bbf1cc90e48254f81975c7879b5fc0c4d602"
|
||||||
|
other = "FLV"
|
||||||
|
|
||||||
|
[encoder_gif]
|
||||||
|
hash = "sha1-d092a779172291b5215aa095390a5b11659128a4"
|
||||||
|
other = "GIF image"
|
||||||
|
|
||||||
|
[encoder_h264_nvenc]
|
||||||
|
hash = "sha1-169389f8c4a2518410159c363378ab5c978c32e5"
|
||||||
|
other = "H.264 with NVIDIA support"
|
||||||
|
|
||||||
|
[encoder_libmp3lame]
|
||||||
|
hash = "sha1-cd2c8d6f246c8bc18554b7105cb50b78d3cb2b98"
|
||||||
|
other = "libmp3lame MP3 (MPEG audio layer 3)"
|
||||||
|
|
||||||
|
[encoder_libshine]
|
||||||
|
hash = "sha1-891d56c85857e5d83ef5a1fe077c1f1540788f49"
|
||||||
|
other = "libshine MP3 (MPEG audio layer 3)"
|
||||||
|
|
||||||
|
[encoder_libtwolame]
|
||||||
|
hash = "sha1-b2f53be810b74edc3c454ac75de7ddecfee322ca"
|
||||||
|
other = "libtwolame MP2 (MPEG audio layer 2)"
|
||||||
|
|
||||||
|
[encoder_libvpx]
|
||||||
|
hash = "sha1-b85c923aecfb48de0e87e71b6a21bfc2c547c70e"
|
||||||
|
other = "libvpx VP8 (codec vp8)"
|
||||||
|
|
||||||
|
[encoder_libvpx-vp9]
|
||||||
|
hash = "sha1-3106417bd89bee87daa691e87614caf78cb934fe"
|
||||||
|
other = "libvpx VP9 (codec vp9)"
|
||||||
|
|
||||||
|
[encoder_libwebp]
|
||||||
|
hash = "sha1-1d590d47d46f7880246061fce0e0de6d743db39e"
|
||||||
|
other = "libwebp WebP image"
|
||||||
|
|
||||||
|
[encoder_libwebp_anim]
|
||||||
|
hash = "sha1-f141a9c8f23d79c13d44c30d8f34e05b363771ad"
|
||||||
|
other = "libwebp_anim WebP image"
|
||||||
|
|
||||||
|
[encoder_libx264]
|
||||||
|
hash = "sha1-6d764ac459c0bf3c819d76618418cdfbb7a749eb"
|
||||||
|
other = "H.264 libx264"
|
||||||
|
|
||||||
|
[encoder_libx265]
|
||||||
|
hash = "sha1-55544c166b1e15fd71a58096518e528109599eea"
|
||||||
|
other = "H.265 libx265"
|
||||||
|
|
||||||
|
[encoder_libxvid]
|
||||||
|
hash = "sha1-d4bed46d6cdd2bfa8fd1689801164a83ab10c3f5"
|
||||||
|
other = "libxvidcore MPEG-4 part 2"
|
||||||
|
|
||||||
|
[encoder_mjpeg]
|
||||||
|
hash = "sha1-94ba63a322b493a04da65e566781fe1cf8bb0d50"
|
||||||
|
other = "MJPEG (Motion JPEG)"
|
||||||
|
|
||||||
|
[encoder_mp2]
|
||||||
|
hash = "sha1-a9154b7203349e5d6fbfd67d1ea97715f54b2065"
|
||||||
|
other = "MP2 (MPEG audio layer 2)"
|
||||||
|
|
||||||
|
[encoder_mp2fixed]
|
||||||
|
hash = "sha1-dd2ee670d8bc8a60a96a717ebd26f16b5748cf3f"
|
||||||
|
other = "MP2 fixed point (MPEG audio layer 2)"
|
||||||
|
|
||||||
|
[encoder_mpeg1video]
|
||||||
|
hash = "sha1-30043660719a3cb19dab5c33450665a8a9cc1c01"
|
||||||
|
other = "MPEG-1"
|
||||||
|
|
||||||
|
[encoder_mpeg2video]
|
||||||
|
hash = "sha1-ccb2dcd8510cfdc9d52e5258af1863e5f2c51e77"
|
||||||
|
other = "MPEG-2"
|
||||||
|
|
||||||
|
[encoder_mpeg4]
|
||||||
|
hash = "sha1-67fe42f18421b2f6c90fcdc579f9199bfca4b182"
|
||||||
|
other = "MPEG-4 part 2"
|
||||||
|
|
||||||
|
[encoder_msmpeg4]
|
||||||
|
hash = "sha1-313ee597e4f0d9bd63a2bc6ac1618f028aef76f4"
|
||||||
|
other = "MPEG-4 part 2 Microsoft variant version 3"
|
||||||
|
|
||||||
|
[encoder_msmpeg4v2]
|
||||||
|
hash = "sha1-adc442ce88f2717693b2da3010a1937d77ee522f"
|
||||||
|
other = "MPEG-4 part 2 Microsoft variant version 2"
|
||||||
|
|
||||||
|
[encoder_msvideo1]
|
||||||
|
hash = "sha1-00f43ac0dc162bca10e0d98d6b70c0c6a902f66f"
|
||||||
|
other = "Microsoft Video-1"
|
||||||
|
|
||||||
|
[encoder_png]
|
||||||
|
hash = "sha1-6715d4b82f5d9dfe3e53e30b402ffa1a6fbf30a5"
|
||||||
|
other = "PNG image"
|
||||||
|
|
||||||
|
[encoder_qtrle]
|
||||||
|
hash = "sha1-31bf155cffaf6842ebc54084e4337ca08fdd9848"
|
||||||
|
other = "QuickTime Animation (RLE) video"
|
||||||
|
|
||||||
|
[encoder_sgi]
|
||||||
|
hash = "sha1-f4510e237f7fc3c02caa728f9e500f4b069f9c11"
|
||||||
|
other = "SGI image"
|
||||||
|
|
||||||
|
[encoder_tiff]
|
||||||
|
hash = "sha1-ed09d78c38e0b17ed695f35740c756dd7340eeac"
|
||||||
|
other = "TIFF image"
|
||||||
|
|
||||||
|
[encoder_wmav1]
|
||||||
|
hash = "sha1-cd4a4c5eeac694b6699d55d0f9b477b3b50f18c7"
|
||||||
|
other = "Windows Media Audio 1"
|
||||||
|
|
||||||
|
[encoder_wmav2]
|
||||||
|
hash = "sha1-eb2e5306cb33a702577ecfbdca0461862c66c053"
|
||||||
|
other = "Windows Media Audio 2"
|
||||||
|
|
||||||
|
[encoder_wmv1]
|
||||||
|
hash = "sha1-f9b748554c590c36a56bcba2cd317196b7bdeddb"
|
||||||
|
other = "Windows Media Video 7"
|
||||||
|
|
||||||
|
[encoder_wmv2]
|
||||||
|
hash = "sha1-5b21c87f5c6104797ead60b488b2948428f6b1b7"
|
||||||
|
other = "Windows Media Video 8"
|
||||||
|
|
||||||
|
[encoder_xbm]
|
||||||
|
hash = "sha1-2dfc35881da62e9a1379d8238cf7839b24f79566"
|
||||||
|
other = "XBM (X BitMap) image"
|
||||||
|
|
||||||
[error]
|
[error]
|
||||||
hash = "sha1-a7df8f8b5d754f226ac4cb320577fe692b33e483"
|
hash = "sha1-a7df8f8b5d754f226ac4cb320577fe692b33e483"
|
||||||
other = "An error has occurred!"
|
other = "An error has occurred!"
|
||||||
@ -90,9 +222,21 @@ other = "this is not FFprobe"
|
|||||||
hash = "sha1-da7b37d7df3fafbd153665b13888413d52b24c17"
|
hash = "sha1-da7b37d7df3fafbd153665b13888413d52b24c17"
|
||||||
other = "Failed to determine FFprobe version"
|
other = "Failed to determine FFprobe version"
|
||||||
|
|
||||||
|
[errorQueue]
|
||||||
|
hash = "sha1-72aecd9ad85642d84d62dbbf3cf70953c5f696c7"
|
||||||
|
other = "Error"
|
||||||
|
|
||||||
|
[errorSelectedEncoder]
|
||||||
|
hash = "sha1-33ed1aaf4cb3c2ee9d8f8c325b9b75d16ddf9979"
|
||||||
|
other = "Converter not selected"
|
||||||
|
|
||||||
[errorSelectedFolderSave]
|
[errorSelectedFolderSave]
|
||||||
hash = "sha1-83da899677cdc90e4344e3b94ee03c46b51bee4c"
|
hash = "sha1-16f3ef93ee36813fdd79d8fb9bb7fc02acbb94a8"
|
||||||
other = "You haven't selected a folder to save!"
|
other = "No save folder selected!"
|
||||||
|
|
||||||
|
[errorSelectedFormat]
|
||||||
|
hash = "sha1-cda92c56a1ef1aabc92bbfc405ede8ab13087e66"
|
||||||
|
other = "File extension not selected"
|
||||||
|
|
||||||
[exit]
|
[exit]
|
||||||
hash = "sha1-c42457057d1ab7950cea00719cbe0b078891775f"
|
hash = "sha1-c42457057d1ab7950cea00719cbe0b078891775f"
|
||||||
@ -106,15 +250,15 @@ other = "This software uses libraries from the **FFmpeg** project under the **[L
|
|||||||
hash = "sha1-45f772b2eca5098cd6d31f2d1dc6edec1987a617"
|
hash = "sha1-45f772b2eca5098cd6d31f2d1dc6edec1987a617"
|
||||||
other = "**FFmpeg** is a trademark of **[Fabrice Bellard](http://bellard.org/)**, originator of the **[FFmpeg](https://ffmpeg.org/about.html)** project."
|
other = "**FFmpeg** is a trademark of **[Fabrice Bellard](http://bellard.org/)**, originator of the **[FFmpeg](https://ffmpeg.org/about.html)** project."
|
||||||
|
|
||||||
[fileVideoForConversionTitle]
|
[fileForConversionTitle]
|
||||||
hash = "sha1-5e727d4a2ff3f21080e51e81641595b2e668f3be"
|
hash = "sha1-981bf090072a487e538d00780d337b47ca877372"
|
||||||
other = "File for conversion:"
|
other = "File to convert:"
|
||||||
|
|
||||||
[help]
|
[help]
|
||||||
hash = "sha1-6a45cef900c668effcb2ab10da05855c1fd10f6f"
|
hash = "sha1-6a45cef900c668effcb2ab10da05855c1fd10f6f"
|
||||||
other = "Help"
|
other = "Help"
|
||||||
|
|
||||||
[inProgress]
|
[inProgressQueue]
|
||||||
hash = "sha1-eff79c40e2100ae5fadf3a7d99336025edcca8b5"
|
hash = "sha1-eff79c40e2100ae5fadf3a7d99336025edcca8b5"
|
||||||
other = "In Progress"
|
other = "In Progress"
|
||||||
|
|
||||||
@ -158,10 +302,18 @@ other = "Queue"
|
|||||||
hash = "sha1-4864057d626a868fa60f999bed3191d61d045ddc"
|
hash = "sha1-4864057d626a868fa60f999bed3191d61d045ddc"
|
||||||
other = "Save"
|
other = "Save"
|
||||||
|
|
||||||
|
[selectEncoder]
|
||||||
|
hash = "sha1-07beb734a090830bedf8e038e3b45c73d64b5696"
|
||||||
|
other = "Select a converter"
|
||||||
|
|
||||||
[selectFFPathTitle]
|
[selectFFPathTitle]
|
||||||
hash = "sha1-95581446a28d968ff1a027c623159a7eb08654cf"
|
hash = "sha1-95581446a28d968ff1a027c623159a7eb08654cf"
|
||||||
other = "Specify the path to FFmpeg and FFprobe"
|
other = "Specify the path to FFmpeg and FFprobe"
|
||||||
|
|
||||||
|
[selectFormat]
|
||||||
|
hash = "sha1-5e59b9376d321a49e73063eb7355b555d89bdd55"
|
||||||
|
other = "Select file extension"
|
||||||
|
|
||||||
[settings]
|
[settings]
|
||||||
hash = "sha1-7f17c7c62a7fd8d1a508481f4778688927734c2f"
|
hash = "sha1-7f17c7c62a7fd8d1a508481f4778688927734c2f"
|
||||||
other = "Settings"
|
other = "Settings"
|
||||||
@ -174,10 +326,14 @@ other = "Checking FFmpeg for serviceability..."
|
|||||||
hash = "sha1-92df86371f6c3a06ca1e4754f113142776a32d49"
|
hash = "sha1-92df86371f6c3a06ca1e4754f113142776a32d49"
|
||||||
other = "You can download it from here"
|
other = "You can download it from here"
|
||||||
|
|
||||||
|
[total]
|
||||||
|
hash = "sha1-3b5143902e0c5c84459aedf918e17604d9735b94"
|
||||||
|
other = "Total"
|
||||||
|
|
||||||
[unzipRun]
|
[unzipRun]
|
||||||
hash = "sha1-c554dad13026668a1f6adf3171837c5d51bbac36"
|
hash = "sha1-c554dad13026668a1f6adf3171837c5d51bbac36"
|
||||||
other = "Unpacked..."
|
other = "Unpacked..."
|
||||||
|
|
||||||
[waiting]
|
[waitingQueue]
|
||||||
hash = "sha1-307429dd84150877080c4bbff2b340d1e7dadff2"
|
hash = "sha1-307429dd84150877080c4bbff2b340d1e7dadff2"
|
||||||
other = "Waiting"
|
other = "Waiting"
|
||||||
|
@ -38,7 +38,7 @@ other = "Файлды қайта жазуға рұқсат беріңіз"
|
|||||||
hash = "sha1-f60bb5f761024d973834b5e9d25ceebce2c85f94"
|
hash = "sha1-f60bb5f761024d973834b5e9d25ceebce2c85f94"
|
||||||
other = "таңдау"
|
other = "таңдау"
|
||||||
|
|
||||||
[completed]
|
[completedQueue]
|
||||||
hash = "sha1-398c7d4f7b0d522afb930769c0fbb1a9f4b61fbe"
|
hash = "sha1-398c7d4f7b0d522afb930769c0fbb1a9f4b61fbe"
|
||||||
other = "Дайын"
|
other = "Дайын"
|
||||||
|
|
||||||
@ -47,8 +47,8 @@ hash = "sha1-7ac460f3c24c9952082f2db6e4d62f752598709c"
|
|||||||
other = "Файлды түрлендіру"
|
other = "Файлды түрлендіру"
|
||||||
|
|
||||||
[converterVideoFilesTitle]
|
[converterVideoFilesTitle]
|
||||||
hash = "sha1-4d972809e4c7f9c9ff2c110a126bbc183c9429ce"
|
hash = "sha1-1ab29597cc9dfefab08e54ea5442e7ffa15f0394"
|
||||||
other = "Бейне файлдарын mp4 форматына түрлендіру"
|
other = "Бейне, аудио және суретті түрлендіргіш"
|
||||||
|
|
||||||
[download]
|
[download]
|
||||||
hash = "sha1-fe8f79f29da457de2f6bc9531de6e536e0c426ad"
|
hash = "sha1-fe8f79f29da457de2f6bc9531de6e536e0c426ad"
|
||||||
@ -62,6 +62,138 @@ other = "Сайттан жүктеледі:"
|
|||||||
hash = "sha1-55f87f114628fa2d5d8e67d1e1cda22c0e4f9271"
|
hash = "sha1-55f87f114628fa2d5d8e67d1e1cda22c0e4f9271"
|
||||||
other = "Жүктеп алынуда..."
|
other = "Жүктеп алынуда..."
|
||||||
|
|
||||||
|
[encoder_apng]
|
||||||
|
hash = "sha1-1cbd9abfef96d5614a7e569161b41bd6ad87bbaf"
|
||||||
|
other = "APNG image"
|
||||||
|
|
||||||
|
[encoder_bmp]
|
||||||
|
hash = "sha1-e0b9c16b016961a5abdc2217e8ffd1ba7ddebc40"
|
||||||
|
other = "BMP image"
|
||||||
|
|
||||||
|
[encoder_flv]
|
||||||
|
hash = "sha1-3602bbf1cc90e48254f81975c7879b5fc0c4d602"
|
||||||
|
other = "FLV"
|
||||||
|
|
||||||
|
[encoder_gif]
|
||||||
|
hash = "sha1-d092a779172291b5215aa095390a5b11659128a4"
|
||||||
|
other = "GIF image"
|
||||||
|
|
||||||
|
[encoder_h264_nvenc]
|
||||||
|
hash = "sha1-169389f8c4a2518410159c363378ab5c978c32e5"
|
||||||
|
other = "NVIDIA қолдауымен H.264"
|
||||||
|
|
||||||
|
[encoder_libmp3lame]
|
||||||
|
hash = "sha1-cd2c8d6f246c8bc18554b7105cb50b78d3cb2b98"
|
||||||
|
other = "libmp3lame MP3 (MPEG audio layer 3)"
|
||||||
|
|
||||||
|
[encoder_libshine]
|
||||||
|
hash = "sha1-891d56c85857e5d83ef5a1fe077c1f1540788f49"
|
||||||
|
other = "libshine MP3 (MPEG audio layer 3)"
|
||||||
|
|
||||||
|
[encoder_libtwolame]
|
||||||
|
hash = "sha1-b2f53be810b74edc3c454ac75de7ddecfee322ca"
|
||||||
|
other = "libtwolame MP2 (MPEG audio layer 2)"
|
||||||
|
|
||||||
|
[encoder_libvpx]
|
||||||
|
hash = "sha1-b85c923aecfb48de0e87e71b6a21bfc2c547c70e"
|
||||||
|
other = "libvpx VP8 (codec vp8)"
|
||||||
|
|
||||||
|
[encoder_libvpx-vp9]
|
||||||
|
hash = "sha1-3106417bd89bee87daa691e87614caf78cb934fe"
|
||||||
|
other = "libvpx VP9 (codec vp9)"
|
||||||
|
|
||||||
|
[encoder_libwebp]
|
||||||
|
hash = "sha1-1d590d47d46f7880246061fce0e0de6d743db39e"
|
||||||
|
other = "libwebp WebP image"
|
||||||
|
|
||||||
|
[encoder_libwebp_anim]
|
||||||
|
hash = "sha1-f141a9c8f23d79c13d44c30d8f34e05b363771ad"
|
||||||
|
other = "libwebp_anim WebP image"
|
||||||
|
|
||||||
|
[encoder_libx264]
|
||||||
|
hash = "sha1-6d764ac459c0bf3c819d76618418cdfbb7a749eb"
|
||||||
|
other = "H.264 libx264"
|
||||||
|
|
||||||
|
[encoder_libx265]
|
||||||
|
hash = "sha1-55544c166b1e15fd71a58096518e528109599eea"
|
||||||
|
other = "H.265 libx265"
|
||||||
|
|
||||||
|
[encoder_libxvid]
|
||||||
|
hash = "sha1-d4bed46d6cdd2bfa8fd1689801164a83ab10c3f5"
|
||||||
|
other = "libxvidcore MPEG-4 part 2"
|
||||||
|
|
||||||
|
[encoder_mjpeg]
|
||||||
|
hash = "sha1-94ba63a322b493a04da65e566781fe1cf8bb0d50"
|
||||||
|
other = "MJPEG (Motion JPEG)"
|
||||||
|
|
||||||
|
[encoder_mp2]
|
||||||
|
hash = "sha1-a9154b7203349e5d6fbfd67d1ea97715f54b2065"
|
||||||
|
other = "MP2 (MPEG audio layer 2)"
|
||||||
|
|
||||||
|
[encoder_mp2fixed]
|
||||||
|
hash = "sha1-dd2ee670d8bc8a60a96a717ebd26f16b5748cf3f"
|
||||||
|
other = "MP2 fixed point (MPEG audio layer 2)"
|
||||||
|
|
||||||
|
[encoder_mpeg1video]
|
||||||
|
hash = "sha1-30043660719a3cb19dab5c33450665a8a9cc1c01"
|
||||||
|
other = "MPEG-1"
|
||||||
|
|
||||||
|
[encoder_mpeg2video]
|
||||||
|
hash = "sha1-ccb2dcd8510cfdc9d52e5258af1863e5f2c51e77"
|
||||||
|
other = "MPEG-2"
|
||||||
|
|
||||||
|
[encoder_mpeg4]
|
||||||
|
hash = "sha1-67fe42f18421b2f6c90fcdc579f9199bfca4b182"
|
||||||
|
other = "MPEG-4 part 2"
|
||||||
|
|
||||||
|
[encoder_msmpeg4]
|
||||||
|
hash = "sha1-313ee597e4f0d9bd63a2bc6ac1618f028aef76f4"
|
||||||
|
other = "MPEG-4 part 2 Microsoft variant version 3"
|
||||||
|
|
||||||
|
[encoder_msmpeg4v2]
|
||||||
|
hash = "sha1-adc442ce88f2717693b2da3010a1937d77ee522f"
|
||||||
|
other = "MPEG-4 part 2 Microsoft variant version 2"
|
||||||
|
|
||||||
|
[encoder_msvideo1]
|
||||||
|
hash = "sha1-00f43ac0dc162bca10e0d98d6b70c0c6a902f66f"
|
||||||
|
other = "Microsoft Video-1"
|
||||||
|
|
||||||
|
[encoder_png]
|
||||||
|
hash = "sha1-6715d4b82f5d9dfe3e53e30b402ffa1a6fbf30a5"
|
||||||
|
other = "PNG image"
|
||||||
|
|
||||||
|
[encoder_qtrle]
|
||||||
|
hash = "sha1-31bf155cffaf6842ebc54084e4337ca08fdd9848"
|
||||||
|
other = "QuickTime Animation (RLE) video"
|
||||||
|
|
||||||
|
[encoder_sgi]
|
||||||
|
hash = "sha1-f4510e237f7fc3c02caa728f9e500f4b069f9c11"
|
||||||
|
other = "SGI image"
|
||||||
|
|
||||||
|
[encoder_tiff]
|
||||||
|
hash = "sha1-ed09d78c38e0b17ed695f35740c756dd7340eeac"
|
||||||
|
other = "TIFF image"
|
||||||
|
|
||||||
|
[encoder_wmav1]
|
||||||
|
hash = "sha1-cd4a4c5eeac694b6699d55d0f9b477b3b50f18c7"
|
||||||
|
other = "Windows Media Audio 1"
|
||||||
|
|
||||||
|
[encoder_wmav2]
|
||||||
|
hash = "sha1-eb2e5306cb33a702577ecfbdca0461862c66c053"
|
||||||
|
other = "Windows Media Audio 2"
|
||||||
|
|
||||||
|
[encoder_wmv1]
|
||||||
|
hash = "sha1-f9b748554c590c36a56bcba2cd317196b7bdeddb"
|
||||||
|
other = "Windows Media Video 7"
|
||||||
|
|
||||||
|
[encoder_wmv2]
|
||||||
|
hash = "sha1-5b21c87f5c6104797ead60b488b2948428f6b1b7"
|
||||||
|
other = "Windows Media Video 8"
|
||||||
|
|
||||||
|
[encoder_xbm]
|
||||||
|
hash = "sha1-2dfc35881da62e9a1379d8238cf7839b24f79566"
|
||||||
|
other = "XBM (X BitMap) image"
|
||||||
|
|
||||||
[error]
|
[error]
|
||||||
hash = "sha1-a7df8f8b5d754f226ac4cb320577fe692b33e483"
|
hash = "sha1-a7df8f8b5d754f226ac4cb320577fe692b33e483"
|
||||||
other = "Қате орын алды!"
|
other = "Қате орын алды!"
|
||||||
@ -90,9 +222,21 @@ other = "бұл FFprobe емес"
|
|||||||
hash = "sha1-da7b37d7df3fafbd153665b13888413d52b24c17"
|
hash = "sha1-da7b37d7df3fafbd153665b13888413d52b24c17"
|
||||||
other = "FFprobe нұсқасын анықтау мүмкін болмады"
|
other = "FFprobe нұсқасын анықтау мүмкін болмады"
|
||||||
|
|
||||||
|
[errorQueue]
|
||||||
|
hash = "sha1-72aecd9ad85642d84d62dbbf3cf70953c5f696c7"
|
||||||
|
other = "Қате"
|
||||||
|
|
||||||
|
[errorSelectedEncoder]
|
||||||
|
hash = "sha1-33ed1aaf4cb3c2ee9d8f8c325b9b75d16ddf9979"
|
||||||
|
other = "Түрлендіргіш таңдалмаған"
|
||||||
|
|
||||||
[errorSelectedFolderSave]
|
[errorSelectedFolderSave]
|
||||||
hash = "sha1-83da899677cdc90e4344e3b94ee03c46b51bee4c"
|
hash = "sha1-16f3ef93ee36813fdd79d8fb9bb7fc02acbb94a8"
|
||||||
other = "Сіз сақталатын қалтаны таңдамадыңыз!"
|
other = "Сақтау қалтасы таңдалмаған!"
|
||||||
|
|
||||||
|
[errorSelectedFormat]
|
||||||
|
hash = "sha1-cda92c56a1ef1aabc92bbfc405ede8ab13087e66"
|
||||||
|
other = "Файл кеңейтімі таңдалмаған"
|
||||||
|
|
||||||
[exit]
|
[exit]
|
||||||
hash = "sha1-c42457057d1ab7950cea00719cbe0b078891775f"
|
hash = "sha1-c42457057d1ab7950cea00719cbe0b078891775f"
|
||||||
@ -106,15 +250,15 @@ other = "Бұл бағдарламалық құрал **[LGPLv2.1](http://www.gn
|
|||||||
hash = "sha1-45f772b2eca5098cd6d31f2d1dc6edec1987a617"
|
hash = "sha1-45f772b2eca5098cd6d31f2d1dc6edec1987a617"
|
||||||
other = "FFmpeg — **[FFmpeg](https://ffmpeg.org/about.html)** жобасын жасаушы **[Fabrice Bellard](http://bellard.org/)** сауда белгісі."
|
other = "FFmpeg — **[FFmpeg](https://ffmpeg.org/about.html)** жобасын жасаушы **[Fabrice Bellard](http://bellard.org/)** сауда белгісі."
|
||||||
|
|
||||||
[fileVideoForConversionTitle]
|
[fileForConversionTitle]
|
||||||
hash = "sha1-5e727d4a2ff3f21080e51e81641595b2e668f3be"
|
hash = "sha1-981bf090072a487e538d00780d337b47ca877372"
|
||||||
other = "Түрлендіруге арналған файл:"
|
other = "Түрлендіруге арналған файл:"
|
||||||
|
|
||||||
[help]
|
[help]
|
||||||
hash = "sha1-6a45cef900c668effcb2ab10da05855c1fd10f6f"
|
hash = "sha1-6a45cef900c668effcb2ab10da05855c1fd10f6f"
|
||||||
other = "Анықтама"
|
other = "Анықтама"
|
||||||
|
|
||||||
[inProgress]
|
[inProgressQueue]
|
||||||
hash = "sha1-eff79c40e2100ae5fadf3a7d99336025edcca8b5"
|
hash = "sha1-eff79c40e2100ae5fadf3a7d99336025edcca8b5"
|
||||||
other = "Орындалуда"
|
other = "Орындалуда"
|
||||||
|
|
||||||
@ -158,10 +302,18 @@ other = "Кезек"
|
|||||||
hash = "sha1-4864057d626a868fa60f999bed3191d61d045ddc"
|
hash = "sha1-4864057d626a868fa60f999bed3191d61d045ddc"
|
||||||
other = "Сақтау"
|
other = "Сақтау"
|
||||||
|
|
||||||
|
[selectEncoder]
|
||||||
|
hash = "sha1-07beb734a090830bedf8e038e3b45c73d64b5696"
|
||||||
|
other = "Түрлендіргішті таңдаңыз"
|
||||||
|
|
||||||
[selectFFPathTitle]
|
[selectFFPathTitle]
|
||||||
hash = "sha1-95581446a28d968ff1a027c623159a7eb08654cf"
|
hash = "sha1-95581446a28d968ff1a027c623159a7eb08654cf"
|
||||||
other = "FFmpeg және FFprobe жолын көрсетіңіз"
|
other = "FFmpeg және FFprobe жолын көрсетіңіз"
|
||||||
|
|
||||||
|
[selectFormat]
|
||||||
|
hash = "sha1-5e59b9376d321a49e73063eb7355b555d89bdd55"
|
||||||
|
other = "Файл кеңейтімін таңдаңыз"
|
||||||
|
|
||||||
[settings]
|
[settings]
|
||||||
hash = "sha1-7f17c7c62a7fd8d1a508481f4778688927734c2f"
|
hash = "sha1-7f17c7c62a7fd8d1a508481f4778688927734c2f"
|
||||||
other = "Параметрлер"
|
other = "Параметрлер"
|
||||||
@ -174,10 +326,14 @@ other = "FFmpeg функционалдығы тексерілуде..."
|
|||||||
hash = "sha1-92df86371f6c3a06ca1e4754f113142776a32d49"
|
hash = "sha1-92df86371f6c3a06ca1e4754f113142776a32d49"
|
||||||
other = "Сіз оны осы жерден жүктей аласыз"
|
other = "Сіз оны осы жерден жүктей аласыз"
|
||||||
|
|
||||||
|
[total]
|
||||||
|
hash = "sha1-3b5143902e0c5c84459aedf918e17604d9735b94"
|
||||||
|
other = "Барлығы"
|
||||||
|
|
||||||
[unzipRun]
|
[unzipRun]
|
||||||
hash = "sha1-c554dad13026668a1f6adf3171837c5d51bbac36"
|
hash = "sha1-c554dad13026668a1f6adf3171837c5d51bbac36"
|
||||||
other = "Орамнан шығарылуда..."
|
other = "Орамнан шығарылуда..."
|
||||||
|
|
||||||
[waiting]
|
[waitingQueue]
|
||||||
hash = "sha1-307429dd84150877080c4bbff2b340d1e7dadff2"
|
hash = "sha1-307429dd84150877080c4bbff2b340d1e7dadff2"
|
||||||
other = "Күту"
|
other = "Күту"
|
||||||
|
@ -8,12 +8,45 @@ changeFFPath = "FFmpeg и FFprobe"
|
|||||||
changeLanguage = "Поменять язык"
|
changeLanguage = "Поменять язык"
|
||||||
checkboxOverwriteOutputFilesTitle = "Разрешить перезаписать файл"
|
checkboxOverwriteOutputFilesTitle = "Разрешить перезаписать файл"
|
||||||
choose = "выбрать"
|
choose = "выбрать"
|
||||||
completed = "Готово"
|
completedQueue = "Готово"
|
||||||
converterVideoFilesSubmitTitle = "Конвертировать"
|
converterVideoFilesSubmitTitle = "Конвертировать"
|
||||||
converterVideoFilesTitle = "Конвертор видео файлов в mp4"
|
converterVideoFilesTitle = "Конвертер видео, аудио и картинок"
|
||||||
download = "Скачать"
|
download = "Скачать"
|
||||||
downloadFFmpegFromSite = "Будет скачано с сайта:"
|
downloadFFmpegFromSite = "Будет скачано с сайта:"
|
||||||
downloadRun = "Скачивается..."
|
downloadRun = "Скачивается..."
|
||||||
|
encoder_apng = "APNG image"
|
||||||
|
encoder_bmp = "BMP image"
|
||||||
|
encoder_flv = "FLV"
|
||||||
|
encoder_gif = "GIF image"
|
||||||
|
encoder_h264_nvenc = "H.264 с поддержкой NVIDIA"
|
||||||
|
encoder_libmp3lame = "libmp3lame MP3 (MPEG audio layer 3)"
|
||||||
|
encoder_libshine = "libshine MP3 (MPEG audio layer 3)"
|
||||||
|
encoder_libtwolame = "libtwolame MP2 (MPEG audio layer 2)"
|
||||||
|
encoder_libvpx = "libvpx VP8 (codec vp8)"
|
||||||
|
encoder_libvpx-vp9 = "libvpx VP9 (codec vp9)"
|
||||||
|
encoder_libwebp = "libwebp WebP image"
|
||||||
|
encoder_libwebp_anim = "libwebp_anim WebP image"
|
||||||
|
encoder_libx264 = "H.264 libx264"
|
||||||
|
encoder_libx265 = "H.265 libx265"
|
||||||
|
encoder_libxvid = "libxvidcore MPEG-4 part 2"
|
||||||
|
encoder_mjpeg = "MJPEG (Motion JPEG)"
|
||||||
|
encoder_mp2 = "MP2 (MPEG audio layer 2)"
|
||||||
|
encoder_mp2fixed = "MP2 fixed point (MPEG audio layer 2)"
|
||||||
|
encoder_mpeg1video = "MPEG-1"
|
||||||
|
encoder_mpeg2video = "MPEG-2"
|
||||||
|
encoder_mpeg4 = "MPEG-4 part 2"
|
||||||
|
encoder_msmpeg4 = "MPEG-4 part 2 Microsoft variant version 3"
|
||||||
|
encoder_msmpeg4v2 = "MPEG-4 part 2 Microsoft variant version 2"
|
||||||
|
encoder_msvideo1 = "Microsoft Video-1"
|
||||||
|
encoder_png = "PNG image"
|
||||||
|
encoder_qtrle = "QuickTime Animation (RLE) video"
|
||||||
|
encoder_sgi = "SGI image"
|
||||||
|
encoder_tiff = "TIFF image"
|
||||||
|
encoder_wmav1 = "Windows Media Audio 1"
|
||||||
|
encoder_wmav2 = "Windows Media Audio 2"
|
||||||
|
encoder_wmv1 = "Windows Media Video 7"
|
||||||
|
encoder_wmv2 = "Windows Media Video 8"
|
||||||
|
encoder_xbm = "XBM (X BitMap) image"
|
||||||
error = "Произошла ошибка!"
|
error = "Произошла ошибка!"
|
||||||
errorConverter = "не смогли отконвертировать видео"
|
errorConverter = "не смогли отконвертировать видео"
|
||||||
errorDatabase = "не смогли создать файл 'database' в папке 'data'"
|
errorDatabase = "не смогли создать файл 'database' в папке 'data'"
|
||||||
@ -21,13 +54,16 @@ errorFFmpeg = "это не FFmpeg"
|
|||||||
errorFFmpegVersion = "Не смогли определить версию FFmpeg"
|
errorFFmpegVersion = "Не смогли определить версию FFmpeg"
|
||||||
errorFFprobe = "это не FFprobe"
|
errorFFprobe = "это не FFprobe"
|
||||||
errorFFprobeVersion = "Не смогли определить версию FFprobe"
|
errorFFprobeVersion = "Не смогли определить версию FFprobe"
|
||||||
errorSelectedFolderSave = "Не выбрали папку для сохранения!"
|
errorQueue = "Ошибка"
|
||||||
|
errorSelectedEncoder = "Конвертер не выбран"
|
||||||
|
errorSelectedFolderSave = "Папка для сохранения не выбрана!"
|
||||||
|
errorSelectedFormat = "Расширение файла не выбрана"
|
||||||
exit = "Выход"
|
exit = "Выход"
|
||||||
ffmpegLGPL = "Это программное обеспечение использует библиотеки из проекта **FFmpeg** под **[LGPLv2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)**."
|
ffmpegLGPL = "Это программное обеспечение использует библиотеки из проекта **FFmpeg** под **[LGPLv2.1](http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html)**."
|
||||||
ffmpegTrademark = "**FFmpeg** — торговая марка **[Fabrice Bellard](http://bellard.org/)** , создателя проекта **[FFmpeg](https://ffmpeg.org/about.html)**."
|
ffmpegTrademark = "**FFmpeg** — торговая марка **[Fabrice Bellard](http://bellard.org/)** , создателя проекта **[FFmpeg](https://ffmpeg.org/about.html)**."
|
||||||
fileVideoForConversionTitle = "Файл для ковертации:"
|
fileForConversionTitle = "Файл для конвертации:"
|
||||||
help = "Справка"
|
help = "Справка"
|
||||||
inProgress = "Выполняется"
|
inProgressQueue = "Выполняется"
|
||||||
languageSelectionFormHead = "Переключить язык"
|
languageSelectionFormHead = "Переключить язык"
|
||||||
languageSelectionHead = "Выберите язык"
|
languageSelectionHead = "Выберите язык"
|
||||||
licenseLink = "Сведения о лицензии"
|
licenseLink = "Сведения о лицензии"
|
||||||
@ -38,9 +74,12 @@ programmLink = "Сайт проекта"
|
|||||||
programmVersion = "**Версия программы:** {{.Version}}"
|
programmVersion = "**Версия программы:** {{.Version}}"
|
||||||
queue = "Очередь"
|
queue = "Очередь"
|
||||||
save = "Сохранить"
|
save = "Сохранить"
|
||||||
|
selectEncoder = "Выберите конвертер"
|
||||||
selectFFPathTitle = "Укажите путь к FFmpeg и к FFprobe"
|
selectFFPathTitle = "Укажите путь к FFmpeg и к FFprobe"
|
||||||
|
selectFormat = "Выберите расширение файла"
|
||||||
settings = "Настройки"
|
settings = "Настройки"
|
||||||
testFF = "Проверка FFmpeg на работоспособность..."
|
testFF = "Проверка FFmpeg на работоспособность..."
|
||||||
titleDownloadLink = "Скачать можно от сюда"
|
titleDownloadLink = "Скачать можно от сюда"
|
||||||
|
total = "Всего"
|
||||||
unzipRun = "Распаковывается..."
|
unzipRun = "Распаковывается..."
|
||||||
waiting = "В очереди"
|
waitingQueue = "В очереди"
|
||||||
|
@ -1,15 +1,139 @@
|
|||||||
[completed]
|
[encoder_apng]
|
||||||
hash = "sha1-398c7d4f7b0d522afb930769c0fbb1a9f4b61fbe"
|
hash = "sha1-1cbd9abfef96d5614a7e569161b41bd6ad87bbaf"
|
||||||
other = "Completed"
|
other = "APNG image"
|
||||||
|
|
||||||
[inProgress]
|
[encoder_bmp]
|
||||||
hash = "sha1-eff79c40e2100ae5fadf3a7d99336025edcca8b5"
|
hash = "sha1-e0b9c16b016961a5abdc2217e8ffd1ba7ddebc40"
|
||||||
other = "In Progress"
|
other = "BMP image"
|
||||||
|
|
||||||
[queue]
|
[encoder_flv]
|
||||||
hash = "sha1-aec93b16baeaf55fed871075c9494a460e4a91b8"
|
hash = "sha1-3602bbf1cc90e48254f81975c7879b5fc0c4d602"
|
||||||
other = "Queue"
|
other = "FLV"
|
||||||
|
|
||||||
[waiting]
|
[encoder_gif]
|
||||||
hash = "sha1-307429dd84150877080c4bbff2b340d1e7dadff2"
|
hash = "sha1-d092a779172291b5215aa095390a5b11659128a4"
|
||||||
other = "Waiting"
|
other = "GIF image"
|
||||||
|
|
||||||
|
[encoder_h264_nvenc]
|
||||||
|
hash = "sha1-169389f8c4a2518410159c363378ab5c978c32e5"
|
||||||
|
other = "H.264 with NVIDIA support"
|
||||||
|
|
||||||
|
[encoder_libmp3lame]
|
||||||
|
hash = "sha1-cd2c8d6f246c8bc18554b7105cb50b78d3cb2b98"
|
||||||
|
other = "libmp3lame MP3 (MPEG audio layer 3)"
|
||||||
|
|
||||||
|
[encoder_libshine]
|
||||||
|
hash = "sha1-891d56c85857e5d83ef5a1fe077c1f1540788f49"
|
||||||
|
other = "libshine MP3 (MPEG audio layer 3)"
|
||||||
|
|
||||||
|
[encoder_libtwolame]
|
||||||
|
hash = "sha1-b2f53be810b74edc3c454ac75de7ddecfee322ca"
|
||||||
|
other = "libtwolame MP2 (MPEG audio layer 2)"
|
||||||
|
|
||||||
|
[encoder_libvpx]
|
||||||
|
hash = "sha1-b85c923aecfb48de0e87e71b6a21bfc2c547c70e"
|
||||||
|
other = "libvpx VP8 (codec vp8)"
|
||||||
|
|
||||||
|
[encoder_libvpx-vp9]
|
||||||
|
hash = "sha1-3106417bd89bee87daa691e87614caf78cb934fe"
|
||||||
|
other = "libvpx VP9 (codec vp9)"
|
||||||
|
|
||||||
|
[encoder_libwebp]
|
||||||
|
hash = "sha1-1d590d47d46f7880246061fce0e0de6d743db39e"
|
||||||
|
other = "libwebp WebP image"
|
||||||
|
|
||||||
|
[encoder_libwebp_anim]
|
||||||
|
hash = "sha1-f141a9c8f23d79c13d44c30d8f34e05b363771ad"
|
||||||
|
other = "libwebp_anim WebP image"
|
||||||
|
|
||||||
|
[encoder_libx264]
|
||||||
|
hash = "sha1-6d764ac459c0bf3c819d76618418cdfbb7a749eb"
|
||||||
|
other = "H.264 libx264"
|
||||||
|
|
||||||
|
[encoder_libx265]
|
||||||
|
hash = "sha1-55544c166b1e15fd71a58096518e528109599eea"
|
||||||
|
other = "H.265 libx265"
|
||||||
|
|
||||||
|
[encoder_libxvid]
|
||||||
|
hash = "sha1-d4bed46d6cdd2bfa8fd1689801164a83ab10c3f5"
|
||||||
|
other = "libxvidcore MPEG-4 part 2"
|
||||||
|
|
||||||
|
[encoder_mjpeg]
|
||||||
|
hash = "sha1-94ba63a322b493a04da65e566781fe1cf8bb0d50"
|
||||||
|
other = "MJPEG (Motion JPEG)"
|
||||||
|
|
||||||
|
[encoder_mp2]
|
||||||
|
hash = "sha1-a9154b7203349e5d6fbfd67d1ea97715f54b2065"
|
||||||
|
other = "MP2 (MPEG audio layer 2)"
|
||||||
|
|
||||||
|
[encoder_mp2fixed]
|
||||||
|
hash = "sha1-dd2ee670d8bc8a60a96a717ebd26f16b5748cf3f"
|
||||||
|
other = "MP2 fixed point (MPEG audio layer 2)"
|
||||||
|
|
||||||
|
[encoder_mpeg1video]
|
||||||
|
hash = "sha1-30043660719a3cb19dab5c33450665a8a9cc1c01"
|
||||||
|
other = "MPEG-1"
|
||||||
|
|
||||||
|
[encoder_mpeg2video]
|
||||||
|
hash = "sha1-ccb2dcd8510cfdc9d52e5258af1863e5f2c51e77"
|
||||||
|
other = "MPEG-2"
|
||||||
|
|
||||||
|
[encoder_mpeg4]
|
||||||
|
hash = "sha1-67fe42f18421b2f6c90fcdc579f9199bfca4b182"
|
||||||
|
other = "MPEG-4 part 2"
|
||||||
|
|
||||||
|
[encoder_msmpeg4]
|
||||||
|
hash = "sha1-313ee597e4f0d9bd63a2bc6ac1618f028aef76f4"
|
||||||
|
other = "MPEG-4 part 2 Microsoft variant version 3"
|
||||||
|
|
||||||
|
[encoder_msmpeg4v2]
|
||||||
|
hash = "sha1-adc442ce88f2717693b2da3010a1937d77ee522f"
|
||||||
|
other = "MPEG-4 part 2 Microsoft variant version 2"
|
||||||
|
|
||||||
|
[encoder_msvideo1]
|
||||||
|
hash = "sha1-00f43ac0dc162bca10e0d98d6b70c0c6a902f66f"
|
||||||
|
other = "Microsoft Video-1"
|
||||||
|
|
||||||
|
[encoder_png]
|
||||||
|
hash = "sha1-6715d4b82f5d9dfe3e53e30b402ffa1a6fbf30a5"
|
||||||
|
other = "PNG image"
|
||||||
|
|
||||||
|
[encoder_qtrle]
|
||||||
|
hash = "sha1-31bf155cffaf6842ebc54084e4337ca08fdd9848"
|
||||||
|
other = "QuickTime Animation (RLE) video"
|
||||||
|
|
||||||
|
[encoder_sgi]
|
||||||
|
hash = "sha1-f4510e237f7fc3c02caa728f9e500f4b069f9c11"
|
||||||
|
other = "SGI image"
|
||||||
|
|
||||||
|
[encoder_tiff]
|
||||||
|
hash = "sha1-ed09d78c38e0b17ed695f35740c756dd7340eeac"
|
||||||
|
other = "TIFF image"
|
||||||
|
|
||||||
|
[encoder_wmav1]
|
||||||
|
hash = "sha1-cd4a4c5eeac694b6699d55d0f9b477b3b50f18c7"
|
||||||
|
other = "Windows Media Audio 1"
|
||||||
|
|
||||||
|
[encoder_wmav2]
|
||||||
|
hash = "sha1-eb2e5306cb33a702577ecfbdca0461862c66c053"
|
||||||
|
other = "Windows Media Audio 2"
|
||||||
|
|
||||||
|
[encoder_wmv1]
|
||||||
|
hash = "sha1-f9b748554c590c36a56bcba2cd317196b7bdeddb"
|
||||||
|
other = "Windows Media Video 7"
|
||||||
|
|
||||||
|
[encoder_wmv2]
|
||||||
|
hash = "sha1-5b21c87f5c6104797ead60b488b2948428f6b1b7"
|
||||||
|
other = "Windows Media Video 8"
|
||||||
|
|
||||||
|
[encoder_xbm]
|
||||||
|
hash = "sha1-2dfc35881da62e9a1379d8238cf7839b24f79566"
|
||||||
|
other = "XBM (X BitMap) image"
|
||||||
|
|
||||||
|
[errorSelectedFormat]
|
||||||
|
hash = "sha1-cda92c56a1ef1aabc92bbfc405ede8ab13087e66"
|
||||||
|
other = "File extension not selected"
|
||||||
|
|
||||||
|
[selectFormat]
|
||||||
|
hash = "sha1-5e59b9376d321a49e73063eb7355b555d89bdd55"
|
||||||
|
other = "Select file extension"
|
||||||
|
@ -1,15 +1,139 @@
|
|||||||
[completed]
|
[encoder_apng]
|
||||||
hash = "sha1-398c7d4f7b0d522afb930769c0fbb1a9f4b61fbe"
|
hash = "sha1-1cbd9abfef96d5614a7e569161b41bd6ad87bbaf"
|
||||||
other = "Дайын"
|
other = "APNG image"
|
||||||
|
|
||||||
[inProgress]
|
[encoder_bmp]
|
||||||
hash = "sha1-eff79c40e2100ae5fadf3a7d99336025edcca8b5"
|
hash = "sha1-e0b9c16b016961a5abdc2217e8ffd1ba7ddebc40"
|
||||||
other = "Орындалуда"
|
other = "BMP image"
|
||||||
|
|
||||||
[queue]
|
[encoder_flv]
|
||||||
hash = "sha1-aec93b16baeaf55fed871075c9494a460e4a91b8"
|
hash = "sha1-3602bbf1cc90e48254f81975c7879b5fc0c4d602"
|
||||||
other = "Кезек"
|
other = "FLV"
|
||||||
|
|
||||||
[waiting]
|
[encoder_gif]
|
||||||
hash = "sha1-307429dd84150877080c4bbff2b340d1e7dadff2"
|
hash = "sha1-d092a779172291b5215aa095390a5b11659128a4"
|
||||||
other = "Күту"
|
other = "GIF image"
|
||||||
|
|
||||||
|
[encoder_h264_nvenc]
|
||||||
|
hash = "sha1-169389f8c4a2518410159c363378ab5c978c32e5"
|
||||||
|
other = "NVIDIA қолдауымен H.264"
|
||||||
|
|
||||||
|
[encoder_libmp3lame]
|
||||||
|
hash = "sha1-cd2c8d6f246c8bc18554b7105cb50b78d3cb2b98"
|
||||||
|
other = "libmp3lame MP3 (MPEG audio layer 3)"
|
||||||
|
|
||||||
|
[encoder_libshine]
|
||||||
|
hash = "sha1-891d56c85857e5d83ef5a1fe077c1f1540788f49"
|
||||||
|
other = "libshine MP3 (MPEG audio layer 3)"
|
||||||
|
|
||||||
|
[encoder_libtwolame]
|
||||||
|
hash = "sha1-b2f53be810b74edc3c454ac75de7ddecfee322ca"
|
||||||
|
other = "libtwolame MP2 (MPEG audio layer 2)"
|
||||||
|
|
||||||
|
[encoder_libvpx]
|
||||||
|
hash = "sha1-b85c923aecfb48de0e87e71b6a21bfc2c547c70e"
|
||||||
|
other = "libvpx VP8 (codec vp8)"
|
||||||
|
|
||||||
|
[encoder_libvpx-vp9]
|
||||||
|
hash = "sha1-3106417bd89bee87daa691e87614caf78cb934fe"
|
||||||
|
other = "libvpx VP9 (codec vp9)"
|
||||||
|
|
||||||
|
[encoder_libwebp]
|
||||||
|
hash = "sha1-1d590d47d46f7880246061fce0e0de6d743db39e"
|
||||||
|
other = "libwebp WebP image"
|
||||||
|
|
||||||
|
[encoder_libwebp_anim]
|
||||||
|
hash = "sha1-f141a9c8f23d79c13d44c30d8f34e05b363771ad"
|
||||||
|
other = "libwebp_anim WebP image"
|
||||||
|
|
||||||
|
[encoder_libx264]
|
||||||
|
hash = "sha1-6d764ac459c0bf3c819d76618418cdfbb7a749eb"
|
||||||
|
other = "H.264 libx264"
|
||||||
|
|
||||||
|
[encoder_libx265]
|
||||||
|
hash = "sha1-55544c166b1e15fd71a58096518e528109599eea"
|
||||||
|
other = "H.265 libx265"
|
||||||
|
|
||||||
|
[encoder_libxvid]
|
||||||
|
hash = "sha1-d4bed46d6cdd2bfa8fd1689801164a83ab10c3f5"
|
||||||
|
other = "libxvidcore MPEG-4 part 2"
|
||||||
|
|
||||||
|
[encoder_mjpeg]
|
||||||
|
hash = "sha1-94ba63a322b493a04da65e566781fe1cf8bb0d50"
|
||||||
|
other = "MJPEG (Motion JPEG)"
|
||||||
|
|
||||||
|
[encoder_mp2]
|
||||||
|
hash = "sha1-a9154b7203349e5d6fbfd67d1ea97715f54b2065"
|
||||||
|
other = "MP2 (MPEG audio layer 2)"
|
||||||
|
|
||||||
|
[encoder_mp2fixed]
|
||||||
|
hash = "sha1-dd2ee670d8bc8a60a96a717ebd26f16b5748cf3f"
|
||||||
|
other = "MP2 fixed point (MPEG audio layer 2)"
|
||||||
|
|
||||||
|
[encoder_mpeg1video]
|
||||||
|
hash = "sha1-30043660719a3cb19dab5c33450665a8a9cc1c01"
|
||||||
|
other = "MPEG-1"
|
||||||
|
|
||||||
|
[encoder_mpeg2video]
|
||||||
|
hash = "sha1-ccb2dcd8510cfdc9d52e5258af1863e5f2c51e77"
|
||||||
|
other = "MPEG-2"
|
||||||
|
|
||||||
|
[encoder_mpeg4]
|
||||||
|
hash = "sha1-67fe42f18421b2f6c90fcdc579f9199bfca4b182"
|
||||||
|
other = "MPEG-4 part 2"
|
||||||
|
|
||||||
|
[encoder_msmpeg4]
|
||||||
|
hash = "sha1-313ee597e4f0d9bd63a2bc6ac1618f028aef76f4"
|
||||||
|
other = "MPEG-4 part 2 Microsoft variant version 3"
|
||||||
|
|
||||||
|
[encoder_msmpeg4v2]
|
||||||
|
hash = "sha1-adc442ce88f2717693b2da3010a1937d77ee522f"
|
||||||
|
other = "MPEG-4 part 2 Microsoft variant version 2"
|
||||||
|
|
||||||
|
[encoder_msvideo1]
|
||||||
|
hash = "sha1-00f43ac0dc162bca10e0d98d6b70c0c6a902f66f"
|
||||||
|
other = "Microsoft Video-1"
|
||||||
|
|
||||||
|
[encoder_png]
|
||||||
|
hash = "sha1-6715d4b82f5d9dfe3e53e30b402ffa1a6fbf30a5"
|
||||||
|
other = "PNG image"
|
||||||
|
|
||||||
|
[encoder_qtrle]
|
||||||
|
hash = "sha1-31bf155cffaf6842ebc54084e4337ca08fdd9848"
|
||||||
|
other = "QuickTime Animation (RLE) video"
|
||||||
|
|
||||||
|
[encoder_sgi]
|
||||||
|
hash = "sha1-f4510e237f7fc3c02caa728f9e500f4b069f9c11"
|
||||||
|
other = "SGI image"
|
||||||
|
|
||||||
|
[encoder_tiff]
|
||||||
|
hash = "sha1-ed09d78c38e0b17ed695f35740c756dd7340eeac"
|
||||||
|
other = "TIFF image"
|
||||||
|
|
||||||
|
[encoder_wmav1]
|
||||||
|
hash = "sha1-cd4a4c5eeac694b6699d55d0f9b477b3b50f18c7"
|
||||||
|
other = "Windows Media Audio 1"
|
||||||
|
|
||||||
|
[encoder_wmav2]
|
||||||
|
hash = "sha1-eb2e5306cb33a702577ecfbdca0461862c66c053"
|
||||||
|
other = "Windows Media Audio 2"
|
||||||
|
|
||||||
|
[encoder_wmv1]
|
||||||
|
hash = "sha1-f9b748554c590c36a56bcba2cd317196b7bdeddb"
|
||||||
|
other = "Windows Media Video 7"
|
||||||
|
|
||||||
|
[encoder_wmv2]
|
||||||
|
hash = "sha1-5b21c87f5c6104797ead60b488b2948428f6b1b7"
|
||||||
|
other = "Windows Media Video 8"
|
||||||
|
|
||||||
|
[encoder_xbm]
|
||||||
|
hash = "sha1-2dfc35881da62e9a1379d8238cf7839b24f79566"
|
||||||
|
other = "XBM (X BitMap) image"
|
||||||
|
|
||||||
|
[errorSelectedFormat]
|
||||||
|
hash = "sha1-cda92c56a1ef1aabc92bbfc405ede8ab13087e66"
|
||||||
|
other = "Файл кеңейтімі таңдалмаған"
|
||||||
|
|
||||||
|
[selectFormat]
|
||||||
|
hash = "sha1-5e59b9376d321a49e73063eb7355b555d89bdd55"
|
||||||
|
other = "Файл кеңейтімін таңдаңыз"
|
||||||
|
12
main.go
12
main.go
@ -26,7 +26,7 @@ func init() {
|
|||||||
appMetadata := &fyne.AppMetadata{
|
appMetadata := &fyne.AppMetadata{
|
||||||
ID: "net.kor-elf.projects.gui-for-ffmpeg",
|
ID: "net.kor-elf.projects.gui-for-ffmpeg",
|
||||||
Name: "GUI for FFmpeg",
|
Name: "GUI for FFmpeg",
|
||||||
Version: "0.4.0",
|
Version: "0.5.0",
|
||||||
Icon: iconResource,
|
Icon: iconResource,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,15 +37,13 @@ func init() {
|
|||||||
|
|
||||||
ffPathUtilities = &kernel.FFPathUtilities{FFmpeg: "", FFprobe: ""}
|
ffPathUtilities = &kernel.FFPathUtilities{FFmpeg: "", FFprobe: ""}
|
||||||
convertorService := kernel.NewService(ffPathUtilities)
|
convertorService := kernel.NewService(ffPathUtilities)
|
||||||
layoutLocalizerListener := kernel.NewLayoutLocalizerListener()
|
|
||||||
localizerService.AddListener(layoutLocalizerListener)
|
|
||||||
|
|
||||||
queue := kernel.NewQueueList()
|
queue := kernel.NewQueueList()
|
||||||
application = kernel.NewApp(
|
application = kernel.NewApp(
|
||||||
appMetadata,
|
appMetadata,
|
||||||
localizerService,
|
localizerService,
|
||||||
queue,
|
queue,
|
||||||
kernel.NewQueueLayoutObject(queue, localizerService, layoutLocalizerListener),
|
kernel.NewQueueLayoutObject(queue, localizerService),
|
||||||
convertorService,
|
convertorService,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -97,13 +95,11 @@ func main() {
|
|||||||
|
|
||||||
localizerView := localizer.NewView(application)
|
localizerView := localizer.NewView(application)
|
||||||
convertorView := convertor.NewView(application)
|
convertorView := convertor.NewView(application)
|
||||||
convertorHandler := handler.NewConvertorHandler(application, convertorView, convertorRepository)
|
convertorHandler := handler.NewConvertorHandler(application, convertorView, errorView, convertorRepository)
|
||||||
|
|
||||||
localizerRepository := localizer.NewRepository(settingRepository)
|
localizerRepository := localizer.NewRepository(settingRepository)
|
||||||
menuView := menu.NewView(application)
|
menuView := menu.NewView(application)
|
||||||
localizerListener := handler.NewLocalizerListener()
|
mainMenu := handler.NewMenuHandler(application, convertorHandler, menuView, localizerView, localizerRepository)
|
||||||
application.GetLocalizerService().AddListener(localizerListener)
|
|
||||||
mainMenu := handler.NewMenuHandler(application, convertorHandler, menuView, localizerView, localizerRepository, localizerListener)
|
|
||||||
|
|
||||||
mainHandler := handler.NewMainHandler(application, convertorHandler, mainMenu, localizerRepository)
|
mainHandler := handler.NewMainHandler(application, convertorHandler, mainMenu, localizerRepository)
|
||||||
mainHandler.Start()
|
mainHandler.Start()
|
||||||
|
Loading…
Reference in New Issue
Block a user