Skip to content

Commit

Permalink
v1.9.5.6 Comeback of copy specific time span to output
Browse files Browse the repository at this point in the history
  • Loading branch information
zbabac committed Jul 30, 2020
1 parent 29901bf commit dd7884c
Show file tree
Hide file tree
Showing 7 changed files with 1,851 additions and 629 deletions.
74 changes: 64 additions & 10 deletions Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 19 additions & 2 deletions Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ private void MultiTransRow()
{
try
{
string from_duration = "";
int str_position = input_file.LastIndexOf('.') + 1; //find position of '.' to determine file extension
str_extension = input_file.Substring(str_position); //store found file extension
if (!checkBoxKeepExtension.Checked) //Change extansion only if box unchecked
Expand Down Expand Up @@ -248,11 +249,13 @@ private void MultiTransRow()
_copy_all_streams = " -map 0:v:" + numericUpDownVideoNr.Value + "? -map 0:a:" + numericUpDownAudioNr.Value + "? "; //include only 1st v&a streams

}
if (checkBoxCopyDuration.Checked)
from_duration = " -ss " + textBoxFromTime.Text + " -t " + textBoxCopyDuration.Text + " ";
string command = "";
if (IsLinux == 0)
command = "ffmpeg -y -i \"" + input_file + "\" " + _copy_all_streams + _subs + " -c copy \"" + out_file + str_extension + "\"";//define ffmpeg command Windows
command = "ffmpeg -y -i \"" + input_file + "\" " + from_duration + _copy_all_streams + _subs + " -c copy \"" + out_file + str_extension + "\"";//define ffmpeg command Windows
else
command = " -y -i \"" + input_file + "\" " + _copy_all_streams + _subs + " -c copy \"" + out_file + str_extension + "\""; //Linux or Mac mono
command = " -y -i \"" + input_file + "\" " + from_duration + _copy_all_streams + _subs + " -c copy \"" + out_file + str_extension + "\""; //Linux or Mac mono
number_of_rows++; //increase counter so we know how many files in the list are
DataGridViewRow tempRow = new DataGridViewRow();//define row that will store command
DataGridViewCell check_cell = new DataGridViewCheckBoxCell(false);//define each column i a row -cell
Expand Down Expand Up @@ -1953,6 +1956,20 @@ private void buttonPlay_Click(object sender, EventArgs e)
ffplay_test(input_file);
}

private void checkBoxCopyDuration_CheckedChanged(object sender, EventArgs e)
{
if (checkBoxCopyDuration.Checked)
{
textBoxFromTime.Enabled = true;
textBoxCopyDuration.Enabled = true;
}
else
{
textBoxFromTime.Enabled = false;
textBoxCopyDuration.Enabled = false;
}
}

private void buttonStreamSavePath_Click(object sender, EventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
Expand Down
Loading

0 comments on commit dd7884c

Please sign in to comment.