@@ -74,12 +74,12 @@ Where can you install the app?
Install
- Windows 8, 10, 11 (64 bits) | v1.2.8 | Download directly from GitHub
+ Windows 8, 10, 11 (64 bits) | v1.2.9 | Download directly from GitHub
Uses .Net 8.0 and FFmpeg (ffmpeg-6.1.1-full_build-shared)
Acknowledgments
-Thanks to Flaticon for the icon and TutorialesVbNET for giving me the idea to create this.
+Thanks to Flaticon for the icons, FFmpeg for their incredible framework, NAudio, and TutorialesVbNET for giving me the inspiration to create this.
diff --git a/Simple-Screen-Recorder.csproj b/Simple-Screen-Recorder.csproj
index 6b225b1..2d44375 100644
--- a/Simple-Screen-Recorder.csproj
+++ b/Simple-Screen-Recorder.csproj
@@ -9,11 +9,11 @@
enable
Simple_Screen_Recorder.Program
True
- 1.2.8
+ 1.2.9
Lextrack
Lextrack
- 1.2.8
- 1.2.8
+ 1.2.9
+ 1.2.9
screen recorder.png
Resources\screen recorder.ico
x64
@@ -146,19 +146,19 @@
-
+
PreserveNewest
-
+
PreserveNewest
-
+
PreserveNewest
-
+
PreserveNewest
-
+
PreserveNewest
@@ -170,13 +170,13 @@
PreserveNewest
-
+
PreserveNewest
-
+
PreserveNewest
-
+
PreserveNewest
diff --git a/UI/AboutForm.Designer.cs b/UI/AboutForm.Designer.cs
index ab56068..7481e95 100644
--- a/UI/AboutForm.Designer.cs
+++ b/UI/AboutForm.Designer.cs
@@ -66,7 +66,7 @@ private void InitializeComponent()
label3.Name = "label3";
label3.Size = new Size(151, 38);
label3.TabIndex = 7;
- label3.Text = "Simple Screen Recorder\r\nv1.2.8";
+ label3.Text = "Simple Screen Recorder\r\nv1.2.9";
//
// label2
//
diff --git a/UI/AudioRecorderMainWindow.cs b/UI/AudioRecorderMainWindow.cs
index 7f8e1b2..fa76d5c 100644
--- a/UI/AudioRecorderMainWindow.cs
+++ b/UI/AudioRecorderMainWindow.cs
@@ -14,6 +14,8 @@ public partial class AudioRecorderMainWindow : Form
private string AudioName = "";
public int ProcessId { get; private set; }
+ public static string ResourcePath = Path.Combine(Directory.GetCurrentDirectory(), @"FFmpegResources\ffmpeg");
+
public AudioRecorderMainWindow()
{
InitializeComponent();
@@ -44,7 +46,6 @@ private void btnStartRecording_Click(object sender, EventArgs e)
RecordAudio();
DisableElementsUI();
RecordFfmpegInitial();
-
}
private void RecordFfmpegInitial()
@@ -62,6 +63,7 @@ private void DisableElementsUI()
ComboBoxMicrophone.Enabled = false;
ComboBoxSpeaker.Enabled = false;
BtnBackScreen.Enabled = false;
+ comboBoxAudioSourceAudio.Enabled = false;
}
private void BtnStop_Click(object sender, EventArgs e)
@@ -86,6 +88,7 @@ private void StopAudioRec()
ComboBoxMicrophone.Enabled = true;
ComboBoxSpeaker.Enabled = true;
BtnBackScreen.Enabled = true;
+ comboBoxAudioSourceAudio.Enabled = true;
CheckAudioStop();
CheckFfmpegProcces();
@@ -124,34 +127,33 @@ private void RecordAudio()
}
}
-
private void CheckAudioStop()
{
string selectedOption = comboBoxAudioSourceAudio.SelectedItem.ToString();
- if (selectedOption == StringsEN.TwoTrack)
+ if (selectedOption == StringsEN.TwoTrackAudio)
{
- if (ScreenAudioMic.waveIn is object)
+ if (AudioRecorderMic.waveIn is object)
{
- ScreenAudioMic.waveIn.StopRecording();
+ AudioRecorderMic.waveIn.StopRecording();
}
- if (ScreenAudioDesktop.waveIn is object)
+ if (AudioRecorderDesktop.waveIn is object)
{
- ScreenAudioDesktop.waveIn.StopRecording();
+ AudioRecorderDesktop.waveIn.StopRecording();
}
}
- else if (selectedOption == StringsEN.Desktop)
+ else if (selectedOption == StringsEN.DesktopAudio)
{
- if (ScreenAudioDesktop.waveIn is object)
+ if (AudioRecorderDesktop.waveIn is object)
{
- ScreenAudioDesktop.waveIn.StopRecording();
+ AudioRecorderDesktop.waveIn.StopRecording();
}
}
- else if (selectedOption == StringsEN.Microphone)
+ else if (selectedOption == StringsEN.MicrophoneAudio)
{
- if (ScreenAudioMic.waveIn is object)
+ if (AudioRecorderMic.waveIn is object)
{
- ScreenAudioMic.waveIn.StopRecording();
+ AudioRecorderMic.waveIn.StopRecording();
}
}
@@ -187,7 +189,7 @@ private static void RecSpeaker()
AudioRecorderDesktop.Cleanup();
AudioRecorderDesktop.CreateWaveInDevice();
- var soundPlayer = new System.Media.SoundPlayer(Properties.Resources.Background);
+ var soundPlayer = new System.Media.SoundPlayer(Resources.Background);
soundPlayer.PlayLooping();
AudioRecorderDesktop.outputFilename = "SystemAudio." + Strings.Format(DateTime.Now, "MM-dd-yyyy.HH.mm.ss") + ".wav";
@@ -200,6 +202,12 @@ private void btnOutputRecordings_Click(object sender, EventArgs e)
Process.Start("explorer.exe", "AudioRecordings");
}
+ private void CountRecAudio_Tick(object sender, EventArgs e)
+ {
+ var Difference = DateTime.Now.Subtract(TimeRec);
+ LbTimer.Text = "Rec: " + Difference.Hours.ToString().PadLeft(2, '0') + ":" + Difference.Minutes.ToString().PadLeft(2, '0') + ":" + Difference.Seconds.ToString().PadLeft(2, '0');
+ }
+
private void GetTextsMain()
{
Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(Settings.Default.Languages);
@@ -222,6 +230,7 @@ private void GetTextsMain()
comboBoxAudioSourceAudio.Items.Add(StringsEN.MicrophoneAudio);
comboBoxAudioSourceAudio.SelectedIndex = selectedIndex;
}
+
private void LoadUserSettingsCombobox()
{
comboBoxAudioSourceAudio.SelectedIndex = Settings.Default.AudioRecordingSourceIndex;
@@ -240,15 +249,17 @@ private void AudioRecorderMainWindow_FormClosed(object sender, FormClosedEventAr
private void BtnBackScreen_Click(object sender, EventArgs e)
{
- this.Close();
- RecorderScreenMainWindow backscreenrec = new RecorderScreenMainWindow();
- backscreenrec.Show();
- }
- private void CountRecAudio_Tick(object sender, EventArgs e)
- {
- var Difference = DateTime.Now.Subtract(TimeRec);
- LbTimer.Text = "Rec: " + Difference.Hours.ToString().PadLeft(2, '0') + ":" + Difference.Minutes.ToString().PadLeft(2, '0') + ":" + Difference.Seconds.ToString().PadLeft(2, '0');
+ if (btnStartRecording.Enabled == false)
+ {
+ System.Windows.MessageBox.Show(StringsEN.message2, "Error");
+ }
+ else
+ {
+ this.Close();
+ RecorderScreenMainWindow backscreenrec = new RecorderScreenMainWindow();
+ backscreenrec.Show();
+ }
}
}
}
diff --git a/UI/MergeAllMediaForm.cs b/UI/MergeAllMediaForm.cs
index 81089e4..826d4a6 100644
--- a/UI/MergeAllMediaForm.cs
+++ b/UI/MergeAllMediaForm.cs
@@ -57,7 +57,7 @@ private void BtnVideo_Click(object sender, EventArgs e)
var archivo = new OpenFileDialog();
archivo.InitialDirectory = recordingsFolder;
archivo.Filter = "Video files|*.avi;*.mkv;*.wmv|All files|*.*";
- archivo.Multiselect = false; // Solo permite la selección de un archivo
+ archivo.Multiselect = false;
if (archivo.ShowDialog() == DialogResult.OK)
{
@@ -77,7 +77,7 @@ private void BtnDeskAudio_Click(object sender, EventArgs e)
var archivo = new OpenFileDialog();
archivo.InitialDirectory = recordingsFolder;
archivo.Filter = "Audio files|*.wav;*.aac|All files|*.*";
- archivo.Multiselect = false; // Solo permite la selección de un archivo
+ archivo.Multiselect = false;
if (archivo.ShowDialog() == DialogResult.OK)
{
@@ -97,7 +97,7 @@ private void BtnMicAudio_Click(object sender, EventArgs e)
var archivo = new OpenFileDialog();
archivo.InitialDirectory = recordingsFolder;
archivo.Filter = "Audio files|*.wav;*.aac|All files|*.*";
- archivo.Multiselect = false; // Solo permite la selección de un archivo
+ archivo.Multiselect = false;
if (archivo.ShowDialog() == DialogResult.OK)
{
diff --git a/UI/RecorderScreenMainWindow.cs b/UI/RecorderScreenMainWindow.cs
index 8c57be0..d20332a 100644
--- a/UI/RecorderScreenMainWindow.cs
+++ b/UI/RecorderScreenMainWindow.cs
@@ -40,11 +40,6 @@ private void Form1_Load(object sender, EventArgs e)
InitializeForm();
}
- private void SetKeyPreview()
- {
- this.KeyPreview = true;
- }
-
private void CreateOutputFolder()
{
string outputFolderPath = Path.Combine(Application.StartupPath, "OutputFiles");
@@ -72,8 +67,6 @@ private void InitializeComboBoxes()
}
-
-
private void OpenAudioComponents()
{
ScreenAudioMic.OpenComp();
@@ -125,68 +118,6 @@ private void CheckBoxAllMonitors_CheckedChanged(object sender, EventArgs e)
}
}
- #region Testing things in VideoCodecs
- /*private void StartRecordingProcess(string codec, int fps, string bitrate, string screenArgs)
- {
- try
- {
- string ffmpegArgs = $"{ResourcePath} -f gdigrab -framerate {fps} {screenArgs} -c:v {codec} -b:v {bitrate} Recordings/{VideoName}";
-
- ProcessStartInfo processInfo = new("cmd.exe", $"/c {ffmpegArgs}")
- {
- WindowStyle = ProcessWindowStyle.Hidden,
- CreateNoWindow = true,
- RedirectStandardOutput = true
- };
- Process.Start(processInfo);
- }
- catch (Exception ex)
- {
- MessageBox.Show($"Failed to start recording: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
- }
-
- private void VideoCodecs()
- {
- int fps = int.Parse((string)comboBoxFps.SelectedItem);
- string bitrate = (string)comboBoxBitrate.SelectedItem;
- string codecArgs;
- string codec;
-
- if (CheckBoxAllMonitors.Checked)
- {
- codecArgs = "-i desktop";
- }
- else
- {
- Screen selectedScreen = Screen.AllScreens[comboBoxMonitors.SelectedIndex];
- Rectangle bounds = selectedScreen.Bounds;
- codecArgs = $"-offset_x {bounds.Left} -offset_y {bounds.Top} -video_size {bounds.Width}x{bounds.Height} -i desktop";
- }
-
- switch (comboBoxCodec.SelectedItem.ToString())
- {
- case "H264 (Default)":
- codec = "h264_mf -qp 0";
- break;
- case "MPEG-4":
- codec = "mpeg4 -preset medium";
- break;
- case "H264 NVENC (Nvidia)":
- codec = "h264_nvenc -qp 0";
- break;
- case "H264 AMF (AMD)":
- codec = "h264_amf -qp 0";
- break;
- default:
- codec = "h264_mf -qp 0";
- break;
- }
-
- StartRecordingProcess(codec, fps, bitrate, codecArgs);
- }*/
- #endregion
-
private void VideoCodecs()
{
if (CheckBoxAllMonitors.Checked == true)
@@ -404,7 +335,7 @@ private static void RecSpeaker()
ScreenAudioDesktop.Cleanup();
ScreenAudioDesktop.CreateWaveInDevice();
- var soundPlayer = new System.Media.SoundPlayer(Properties.Resources.Background);
+ var soundPlayer = new System.Media.SoundPlayer(Resources.Background);
soundPlayer.PlayLooping();
ScreenAudioDesktop.outputFilename = "SystemAudio." + Strings.Format(DateTime.Now, "MM-dd-yyyy.HH.mm.ss") + ".wav";
@@ -412,6 +343,68 @@ private static void RecSpeaker()
ScreenAudioDesktop.waveIn.StartRecording();
}
+ #region Testing things with VideoCodecs
+ /*private void StartRecordingProcess(string codec, int fps, string bitrate, string screenArgs)
+ {
+ try
+ {
+ string ffmpegArgs = $"{ResourcePath} -f gdigrab -framerate {fps} {screenArgs} -c:v {codec} -b:v {bitrate} Recordings/{VideoName}";
+
+ ProcessStartInfo processInfo = new("cmd.exe", $"/c {ffmpegArgs}")
+ {
+ WindowStyle = ProcessWindowStyle.Hidden,
+ CreateNoWindow = true,
+ RedirectStandardOutput = true
+ };
+ Process.Start(processInfo);
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show($"Failed to start recording: {ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
+ }
+ }
+
+ private void VideoCodecs()
+ {
+ int fps = int.Parse((string)comboBoxFps.SelectedItem);
+ string bitrate = (string)comboBoxBitrate.SelectedItem;
+ string codecArgs;
+ string codec;
+
+ if (CheckBoxAllMonitors.Checked)
+ {
+ codecArgs = "-i desktop";
+ }
+ else
+ {
+ Screen selectedScreen = Screen.AllScreens[comboBoxMonitors.SelectedIndex];
+ Rectangle bounds = selectedScreen.Bounds;
+ codecArgs = $"-offset_x {bounds.Left} -offset_y {bounds.Top} -video_size {bounds.Width}x{bounds.Height} -i desktop";
+ }
+
+ switch (comboBoxCodec.SelectedItem.ToString())
+ {
+ case "H264 (Default)":
+ codec = "h264_mf -qp 0";
+ break;
+ case "MPEG-4":
+ codec = "mpeg4 -preset medium";
+ break;
+ case "H264 NVENC (Nvidia)":
+ codec = "h264_nvenc -qp 0";
+ break;
+ case "H264 AMF (AMD)":
+ codec = "h264_amf -qp 0";
+ break;
+ default:
+ codec = "h264_mf -qp 0";
+ break;
+ }
+
+ StartRecordingProcess(codec, fps, bitrate, codecArgs);
+ }*/
+ #endregion
+
private void DisableElementsUI()
{
comboBoxMonitors.Enabled = false;
@@ -420,12 +413,12 @@ private void DisableElementsUI()
ComboBoxSpeaker.Enabled = false;
comboBoxCodec.Enabled = false;
comboBoxFps.Enabled = false;
-
CheckBoxAllMonitors.Enabled = false;
ComboBoxFormat.Enabled = false;
RefreshMonitors.Enabled = false;
menuStrip1.Enabled = false;
comboBoxBitrate.Enabled = false;
+ comboBoxAudioSource.Enabled = false;
}
private void StopRec()
@@ -435,13 +428,13 @@ private void StopRec()
ComboBoxMicrophone.Enabled = true;
ComboBoxSpeaker.Enabled = true;
comboBoxMonitors.Enabled = true;
-
comboBoxFps.Enabled = true;
CheckBoxAllMonitors.Enabled = true;
ComboBoxFormat.Enabled = true;
RefreshMonitors.Enabled = true;
menuStrip1.Enabled = true;
comboBoxBitrate.Enabled = true;
+ comboBoxAudioSource.Enabled = true;
CheckAudioStop();
CheckFfmpegProcces();
@@ -508,12 +501,12 @@ private void GetTextsMain()
labelMonitorSelector.Text = StringsEN.labelMonitorSelector;
btnMergedFiles.Text = StringsEN.btnMergedFiles;
- int selectedIndex = comboBoxAudioSource.SelectedIndex; // Guardar el índice seleccionado
+ int selectedIndex = comboBoxAudioSource.SelectedIndex;
comboBoxAudioSource.Items.Clear();
comboBoxAudioSource.Items.Add(StringsEN.TwoTrack);
comboBoxAudioSource.Items.Add(StringsEN.Desktop);
comboBoxAudioSource.Items.Add(StringsEN.Microphone);
- comboBoxAudioSource.SelectedIndex = selectedIndex; // Restaurar el índice seleccionado
+ comboBoxAudioSource.SelectedIndex = selectedIndex;
}
@@ -664,7 +657,11 @@ private void RecorderScreenMainWindow_KeyDown(object sender, KeyEventArgs e)
{
BtnExit.PerformClick();
}
+ }
+ private void SetKeyPreview()
+ {
+ this.KeyPreview = true;
}
}
}
\ No newline at end of file