@@ -17,6 +17,7 @@ type Mediafile struct {
17
17
videoMinBitrate int
18
18
videoCodec string
19
19
vframes int
20
+ vsync string
20
21
frameRate int
21
22
audioRate int
22
23
maxKeyframe int
@@ -51,7 +52,6 @@ type Mediafile struct {
51
52
outputPipeReader * io.PipeReader
52
53
outputPipeWriter * io.PipeWriter
53
54
movFlags string
54
- vsync string
55
55
hideBanner bool
56
56
outputPath string
57
57
outputFormat string
@@ -128,6 +128,10 @@ func (m *Mediafile) SetVframes(v int) {
128
128
m .vframes = v
129
129
}
130
130
131
+ func (m * Mediafile ) SetVsync (val string ) {
132
+ m .vsync = val
133
+ }
134
+
131
135
func (m * Mediafile ) SetFrameRate (v int ) {
132
136
m .frameRate = v
133
137
}
@@ -262,10 +266,6 @@ func (m *Mediafile) SetMovFlags(val string) {
262
266
m .movFlags = val
263
267
}
264
268
265
- func (m * Mediafile ) SetVsync (val string ) {
266
- m .vsync = val
267
- }
268
-
269
269
func (m * Mediafile ) SetHideBanner (val bool ) {
270
270
m .hideBanner = val
271
271
}
@@ -405,6 +405,10 @@ func (m *Mediafile) Vframes() int {
405
405
return m .vframes
406
406
}
407
407
408
+ func (m * Mediafile ) Vsync () string {
409
+ return m .vsync
410
+ }
411
+
408
412
func (m * Mediafile ) FrameRate () int {
409
413
return m .frameRate
410
414
}
@@ -541,10 +545,6 @@ func (m *Mediafile) MovFlags() string {
541
545
return m .movFlags
542
546
}
543
547
544
- func (m * Mediafile ) Vsync () string {
545
- return m .vsync
546
- }
547
-
548
548
func (m * Mediafile ) HideBanner () bool {
549
549
return m .hideBanner
550
550
}
@@ -658,6 +658,7 @@ func (m *Mediafile) ToStrCommand() []string {
658
658
"AudioRate" ,
659
659
"VideoCodec" ,
660
660
"Vframes" ,
661
+ "Vsync" ,
661
662
"VideoBitRate" ,
662
663
"VideoBitRateTolerance" ,
663
664
"VideoMaxBitRate" ,
@@ -703,7 +704,6 @@ func (m *Mediafile) ToStrCommand() []string {
703
704
"OutputPath" ,
704
705
"Bframe" ,
705
706
"MovFlags" ,
706
- "Vsync" ,
707
707
}
708
708
709
709
for _ , name := range opts {
@@ -823,7 +823,7 @@ func (m *Mediafile) ObtainVframes() []string {
823
823
824
824
func (m * Mediafile ) ObtainVsync () []string {
825
825
if m .vsync != "" {
826
- return []string {"-vsync" , fmt .Sprintf ("%s" , m .vframes )}
826
+ return []string {"-vsync" , fmt .Sprintf ("%s" , m .vsync )}
827
827
}
828
828
return nil
829
829
}
0 commit comments