{"id":19503789,"url":"https://github.com/goh-chunlin/webcamwinform","last_synced_at":"2025-04-26T00:33:19.808Z","repository":{"id":48127762,"uuid":"104764735","full_name":"goh-chunlin/WebcamWinForm","owner":"goh-chunlin","description":"A simple Windows Forms application to demonstrate how to record video and audio via a webcam using C#.","archived":false,"fork":false,"pushed_at":"2024-06-18T01:26:16.000Z","size":50,"stargazers_count":30,"open_issues_count":1,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-04T05:41:53.452Z","etag":null,"topics":["azure-storage-blob","dotnet-5","ffmpeg","opencv","webcam","webcam-capture","winforms"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/goh-chunlin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-25T15:00:31.000Z","updated_at":"2024-09-08T08:06:51.000Z","dependencies_parsed_at":"2024-11-10T22:23:32.626Z","dependency_job_id":"6cfea061-8d06-4291-b16b-50923535a25a","html_url":"https://github.com/goh-chunlin/WebcamWinForm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goh-chunlin%2FWebcamWinForm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goh-chunlin%2FWebcamWinForm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goh-chunlin%2FWebcamWinForm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/goh-chunlin%2FWebcamWinForm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/goh-chunlin","download_url":"https://codeload.github.com/goh-chunlin/WebcamWinForm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250917285,"owners_count":21507561,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-storage-blob","dotnet-5","ffmpeg","opencv","webcam","webcam-capture","winforms"],"created_at":"2024-11-10T22:22:59.646Z","updated_at":"2025-04-26T00:33:19.548Z","avatar_url":"https://github.com/goh-chunlin.png","language":"C#","funding_links":["https://www.buymeacoffee.com/chunlin"],"categories":[],"sub_categories":[],"readme":"# WebcamWinForm\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://gclstorage.blob.core.windows.net/images/WebcamWinForm-banner.png\" /\u003e\n\u003c/div\u003e\n\n[![.NET 5 Build](https://github.com/goh-chunlin/WebcamWinForm/actions/workflows/dotnet-5.yml/badge.svg)](https://github.com/goh-chunlin/WebcamWinForm/actions/workflows/dotnet-5.yml)\n[![CodeQL](https://github.com/goh-chunlin/WebcamWinForm/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/goh-chunlin/WebcamWinForm/actions/workflows/codeql-analysis.yml)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![Donate](https://img.shields.io/badge/$-donate-ff69b4.svg)](https://www.buymeacoffee.com/chunlin)\n\nA simple Windows Forms (.NET 5) application to demonstrate how to record video and audio via a Logitech webcam using C#.\n\n## Objective\nIn 2017, inspired by [\"How to use a web cam in C# with .NET Framework 4.0 and Microsoft Expression Encoder 4\", a project on Code Project by Italian software developer Massimo Conti](https://www.codeproject.com/Articles/202464/How-to-use-a-WebCam-in-C-with-the-NET-Framework), I built a simple demo to show how we can connect C# Windows Form with a webcam to record both video and audio.\n\nIn 2020, .NET 5 is officially announced by Microsoft. Many libraries that I used earlier are no longer working. Hence, I took the chance to upgraded this project to use .NET 5 together with other new libraries.\n\nThe recorded media will be saved as a MP4 file locally. The file will also be uploaded to [Microsoft Azure Storage](https://azure.microsoft.com/en-us/services/storage/) at the same time in a container named \"webcam-videos\", hence the user interface asks for the connection string to the Azure Storage.\n\nThe webcam that I have tested with is [Logitech HD Webcam C270](https://www.logitech.com/en-us/products/webcams/c270-hd-webcam.960-000694.html).\n\n## Important Nuget Packages\n- [DirectShowLib.Standard 2.1.0](https://www.nuget.org/packages/DirectShowLib.Standard/);\n- [OpenCvSharp4 4.5.0.20201013](https://www.nuget.org/packages/OpenCvSharp4/);\n- [OpenCvSharp4.runtime.win 4.5.0.20201013](https://www.nuget.org/packages/OpenCvSharp4.runtime.win/);\n- [BasicAudio 2020.11.10.1](https://www.nuget.org/packages/BasicAudio/);\n- [FFMpegCore 3.2.4](https://www.nuget.org/packages/FFMpegCore/);\n- [Azure.Storage.Blobs 12.7.0](https://www.nuget.org/packages/Azure.Storage.Blobs/).\n\n## References\n- [How to Use a Webcam in C# with .NET Framework 4.0 and Microsoft Expression Encoder 4](https://www.codeproject.com/Articles/202464/How-to-use-a-WebCam-in-C-with-the-NET-Framework);\n- [Visual Studio C# VideoCapture](https://stackoverflow.com/a/49303081/1177328);\n- [Memory Leak while converting Opencv Mat to .net BitMap](https://stackoverflow.com/a/43839778/1177328);\n- [memory leak with videocapture, memory goes up with the function of read(image)](https://github.com/opencv/opencv/issues/5715);\n- [openCV video saving in python](https://stackoverflow.com/a/29317298/1177328);\n- [EMGU CV videowriter is unable to make video](https://stackoverflow.com/a/32021413/1177328);\n- [WebCam Video Recording in MPEG using C# Desktop Application](https://stackoverflow.com/questions/19366260/webcam-video-recording-in-mpeg-using-c-sharp-desktop-application);\n- [GitHub: rosenbjerg/FFMpegCore](https://github.com/rosenbjerg/FFMpegCore)\n- [Look at me! Windows Image Acquisition](https://channel9.msdn.com/coding4fun/articles/Look-at-me-Windows-Image-Acquisition);\n- [Record audio in Windows Form C#](https://www.youtube.com/watch?v=xjcoAWHxi1A);\n- [Multimedia Command Strings](https://docs.microsoft.com/en-us/previous-versions/ms712587(v=vs.85));\n- [How to Install FFmpeg on Windows](http://blog.gregzaal.com/how-to-install-ffmpeg-on-windows/);\n- [GitHub: BtbN/FFmpeg-Builds](https://github.com/BtbN/FFmpeg-Builds/releases);\n- [Quickstart: Azure Blob storage client library v12 for .NET](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-dotnet).\n\n## License ##\n\nThis library is distributed under the GPL-3.0 License found in the [LICENSE](./LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoh-chunlin%2Fwebcamwinform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoh-chunlin%2Fwebcamwinform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoh-chunlin%2Fwebcamwinform/lists"}