-
-
Save visioforge/2bca80b89b06fa5dbc03d7324720d976 to your computer and use it in GitHub Desktop.
// Required NuGet packages: | |
// https://www.nuget.org/packages/VisioForge.DotNet.VideoCapture/ | |
// https://www.nuget.org/packages/VisioForge.DotNet.Core.Redist.VideoCapture.x64/ | |
// https://www.nuget.org/packages/VisioForge.DotNet.Core.Redist.VideoCapture.x86/ | |
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; | |
using VisioForge.Types.OutputFormat; | |
namespace SampleCapture | |
{ | |
public partial class Form1 : Form | |
{ | |
public Form1() | |
{ | |
InitializeComponent(); | |
videoCapture1.OnError += OnError; | |
} | |
private void btStart_Click(object sender, EventArgs e) | |
{ | |
videoCapture1.Screen_Capture_Source = new VisioForge.Types.Sources.ScreenCaptureSourceSettings() { FullScreen = true }; | |
videoCapture1.Audio_RecordAudio = videoCapture1.Audio_PlayAudio = false; | |
videoCapture1.Output_Filename = Environment.GetFolderPath(Environment.SpecialFolder.MyVideos) + "\\output.avi"; | |
videoCapture1.Output_Format = new VFAVIOutput(); // Default AVI output with MJPEG for video and PCM for audio | |
videoCapture1.Mode = VisioForge.Types.VFVideoCaptureMode.ScreenCapture; | |
videoCapture1.Start(); | |
} | |
private void btStop_Click(object sender, EventArgs e) | |
{ | |
videoCapture1.Stop(); | |
} | |
private void OnError(object sender, ErrorsEventArgs e) | |
{ | |
System.Diagnostics.Debug.WriteLine(e.Message); | |
} | |
} | |
} |
That's VisioForge.Controls.UI.WinForms.VideoCapture in this sample.
For MVC app you can use VisioForge.Controls.VideoCaptureCore class with same API.
How can I record the audio of the Screen?
- Use "VisioForge What You Hear Source" as an audio capture device.
- set Audio_RecordAudio to true.
You can check main SDK demos
- Use "VisioForge What You Hear Source" as an audio capture device.
- set Audio_RecordAudio to true.
You can check main SDK demos
videoCapture1.Audio_RecordAudio = false; videoCapture1.Audio_CaptureDevice =
And what do I've to put here? To record the audio of the pc
videoCapture1.Audio_CaptureDevice = "VisioForge What You Hear Source";
How can I record it from 2 different ways? Like my micro and the pc
How to use this in .Net Core MVC application.Please provide the code reference
How can I record it from 2 different ways? Like my micro and the pc
- Main audio source - VideoCapture1.Audio_CaptureDevice = "first device";
- Second audio source - VideoCapture1.Additional_Audio_CaptureDevice_Add("second device");
Please check sample code of big projects - https://github.com/visioforge/.Net-SDK-s-samples
How to use this in .Net Core MVC application.Please provide the code reference
Do you want to capture the screen using .Net MVC app?
Hi,
I want to record Video and save it using .Net core application. Can you please provide any reference for that. I have tried jquery plugin but the quality of the video recorded after saving it is not good moreover for all the browsers it's not working.
Hi,
I want to record Video and save it using .Net core application. Can you please provide any reference for that. I have tried jquery plugin but the quality of the video recorded after saving it is not good moreover for all the browsers it's not working.
Please check sample code of big projects - https://github.com/visioforge/.Net-SDK-s-samples
All samples are .Net 4.7.2, .Net Core 3.1 and .Net 5.0 compatible,
Hi,
Thank you for reply, but in the above provided links using Form but i want .Net Core MVC format(Web application with views). I have searched many haven't got any reference. Please help me out by providing any reference. Thanks a lot
Sorry, we do not have MVC demos. If you want to view video streams in the MVC web app it's not possible. But you can use our SDK in the background to stream to HTML5 using HLS, for example.
I am using it in mvc.net application. Where did "videoCapture1" object came from?