Skip to content

Commit c484a35

Browse files
committed
changes for 3.28.0
* Add audio amplification option * Increase cache size for preview frames
1 parent 302c227 commit c484a35

File tree

7 files changed

+29
-9
lines changed

7 files changed

+29
-9
lines changed

Dialogs/ConverterDialog.cs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,17 @@ private void ProcessOnErrorDataReceived(object sender, DataReceivedEventArgs arg
6969
if (args.Data != null && !args.Data.Contains("AVOption"))
7070
{
7171
if (DataContainsProgress(args.Data))
72-
ParseAndUpdateProgress(args.Data);
72+
{
73+
try
74+
{
75+
ParseAndUpdateProgress(args.Data);
76+
}
77+
catch (Exception ex)
78+
{
79+
boxOutput.AppendText($"An error happened {ex.Message}");
80+
}
81+
}
82+
7383
else
7484
boxOutput.InvokeIfRequired(() => boxOutput.AppendText(Environment.NewLine + args.Data));
7585
}
@@ -90,11 +100,11 @@ private bool DataContainsProgress(string data)
90100

91101
private void ParseAndUpdateProgress(string input)
92102
{
93-
var r = new Regex(@"time=([^ ]+)");
103+
var r = new Regex(@"time=\d\d:\d\d:\d\d.\d\d");
94104
var m = r.Match(input);
95105
if (m.Success)
96106
{
97-
var time = TimeSpan.Parse(m.Groups[1].Value); // happens to be the same format as TimeSpan so yay
107+
var time = TimeSpan.Parse(m.Value.Split('=')[1]); // happens to be the same format as TimeSpan so yay
98108
var progress = Math.Abs((float)time.TotalSeconds / _induration); // sometimes the progress is negative, breaking the progressBar
99109
progress = Math.Min(progress, 1); // sometimes progress becomes more than 100%, which breaks the progressBar
100110
progressBar.InvokeIfRequired(() =>
@@ -470,6 +480,7 @@ private void ExitedMerge(object sender, EventArgs eventArgs)
470480
}
471481
else
472482
{
483+
taskbarManager.SetProgressValue(1000, 1000);
473484
boxOutput.AppendText($"{Environment.NewLine}{Environment.NewLine}Video converted succesfully!");
474485
GetFileSize();
475486
pictureStatus.BackgroundImage = StatusImages.Images["Success"];

Filters/Crop.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ private void AddCropPan(int width, int height)
366366
/ (decimal)Program.VideoSource.Track.TimeBaseDenominator;
367367

368368
string crop = $"{cropLeft}:{cropTop}:{newWidth}:{newHeight}";
369-
CropPoint cropPoint = new CropPoint(currentTime, crop);
369+
CropPoint cropPoint = new CropPoint(currentTime, crop, cropPercent);
370370

371371
if (!cropsList.ContainsKey(currentFrame))
372372
cropsList.Add(currentFrame, cropPoint);
@@ -646,12 +646,13 @@ void SetFrame(int frame, bool modifier = false)
646646
frame += trackVideoTimeline.Value;
647647

648648
trackVideoTimeline.Value = Math.Max(0, Math.Min(trackVideoTimeline.Maximum, frame)); // Make sure we don't go out of bounds.
649+
649650
}
650651

651652
private void trackVideoTimeline_ValueChanged(object sender, EventArgs e)
652653
{
653654
previewFrame.Frame = trackVideoTimeline.Value;
654-
previewFrame.Refresh();
655+
previewFrame.Refresh();
655656
}
656657

657658
private void trackVideoTimeline_KeyDown(object sender, KeyEventArgs e)

NewUpdate/3.38.0.zip

130 KB
Binary file not shown.

NewUpdate/latest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.37.1
1+
3.38.0

Objects/CropPoint.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
namespace WebMConverter.Objects
1+
using System.Drawing;
2+
3+
namespace WebMConverter.Objects
24
{
35
public class CropPoint
46
{
57
public decimal InitialTime { get; set; }
68
public string Crop { get; set; }
9+
public RectangleF Rectangle { get; set; }
710

8-
public CropPoint(decimal initialTime, string crop)
11+
public CropPoint(decimal initialTime, string crop, RectangleF rectangle)
912
{
1013
InitialTime = initialTime;
1114
Crop = crop;
15+
Rectangle = rectangle;
1216
}
1317
}
1418
}

Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("3.37.1")]
34+
[assembly: AssemblyVersion("3.38.0")]

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,10 @@ If you have any issues with this program, you may report them on [here][NewIssue
231231

232232
## Changelog
233233

234+
#### Version 3.38.0
235+
* Add audio amplification option
236+
* Increase cache size for preview frames
237+
234238
#### Version 3.37.1
235239
* Minor changes underhood and UI
236240

0 commit comments

Comments
 (0)