FormGrabadora is the recording panel built into Explorador de Archivos. Open it from the main toolbar to capture microphone audio, record your screen, or record from a webcam — all with synchronized audio. Under the hood it uses NAudio’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/XxLunaxX29/ExploradorDeArchivos/llms.txt
Use this file to discover all available pages before exploring further.
WaveInEvent for audio capture, AForge.Video.DirectShow (FilterInfoCollection + VideoCaptureDevice) for webcam access, and FFMpegCore to mux the raw frames and WAV audio into a finished MP4 file.
Audio Recording
Audio capture is handled entirely by NAudio and writes a standard WAV file.Select your microphone
On startup,
RefreshAudioDevices enumerates all WaveIn devices and populates the cmbAudioDevices dropdown. The label lblAudioStatus confirms whether a device was detected.Start recording
Click Iniciar Grabación. A
WaveInEvent is created with the chosen device index and a WaveFormat of 44 100 Hz, 16-bit, stereo. A WaveFileWriter is opened at a timestamped path inside the recordings folder and begins writing every buffer delivered by WaveInEvent_DataAvailable.Monitor elapsed time
A
System.Diagnostics.Stopwatch (_stopwatch) runs alongside a one-second UI timer (_timerRecordingTime) that formats elapsed time as HH:MM:SS in lblRecordingTime.Video Recording
Video mode is controlled by two boolean flags —_isAudioOnly and _useCameraInsteadOfScreen — giving three distinct recording modes.
Screen Capture
When_isAudioOnly = false and _useCameraInsteadOfScreen = false, the recorder captures the screen:
_timerVideoCapturefires at1000 / VIDEO_FPSms intervals (≈ 33 ms for 30 fps).- Each tick calls
Graphics.CopyFromScreeninto a1280 × 720Format32bppRgbBitmapnamed_frameBuffer. - The cloned frame is appended to
_videoFrames(aList<Bitmap>) and simultaneously shown in the live_previewBox(PictureBox).
Webcam Capture
When_useCameraInsteadOfScreen = true, the recorder uses the first webcam found by FilterInfoCollection(FilterCategory.VideoInputDevice):
NewFrame event clones the incoming frame into a Format24bppRgb bitmap, appends it to _videoFrames, and updates _previewBox — even crossing the UI thread boundary via Invoke when needed.
Both screen and webcam modes also start a WaveInEvent (at AUDIO_SAMPLE_RATE = 44100 Hz) that writes to a temporary WAV file in %TEMP% for later muxing.
Muxing with FFMpeg
After recording stops,SaveVideoFileAsync hands work off to a background Task so the UI stays responsive:
Export frames to disk
All
Bitmap objects in _videoFrames are saved as sequentially numbered PNG files (frame_000000.png, frame_000001.png, …) inside a temporary folder under %TEMP%. A Parallel.For loop (max 4 threads) is used to speed up the export.Invoke FFMpeg
CreateMP4WithFFmpeg launches the FFMpeg binary as a child Process:-i audio argument is omitted and only the video stream is encoded.AppDomain.CurrentDomain.BaseDirectory with the constant path ffmpeg\bin\ffmpeg.exe.
Constants
| Constant | Value | Purpose |
|---|---|---|
VIDEO_WIDTH | 1280 | Screen capture frame width (px) |
VIDEO_HEIGHT | 720 | Screen capture frame height (px) |
VIDEO_FPS | 30 | Target frame rate for video capture |
AUDIO_SAMPLE_RATE | 44100 | WAV sample rate (Hz) |
_ffmpegPath | ffmpeg\bin\ffmpeg.exe | Path to FFMpeg binary, relative to app directory |
_recordingsFolder | %LocalAppData%\Grabaciones | Output folder for all recordings |