GithubHelp home page GithubHelp logo

softcam's People

Contributors

dependabot[bot] avatar tshino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

softcam's Issues

Mac version? Example problem

Hi, I have tried this project and it was so simple to setup! This is an amazing project, I am currently making an application that will be used by a few of my colleagues, one of them has a Mac, I was wondering whether there will ever be a plugin version of this, also could you give me an example on making it use an image for the camera as I am going to use OpenCV with it.

Issues with the 32 bit support

HI tsihon!

Great library, I have a project in unreal in which I integrated this library. The 64bit version works flawlessly, I can stream to Discord (from browser) or to Google Meet. But I've realized that the standalone version of discord is still 32bit, so I've tried to add support for as that well.

But it just doesn't work and I'm not sure why. I can see the virtual camera option in the discord camera combobox and I checked the registry for the COM object and the path is correct.
There might be some kind of race condition with the initialization, because sometimes 1 out of 10 it starts working if I attach my VS to both of my running instances and debug it step by step. (Unreal and Discord)

Do you have any idea what could go wrong? Because I have no issues with the 64bit version. And I could even manage to run the 32bit version, but only if I debug it in VS.

Add audio pin?

Any plans to support audio? If not, any hints on where I should get started to try to implement it myself?

Add 32-bit support

Thanks to issue #2 and the nice reporter, now it is clear that to build 32-bit softcam.dll is required to support 32-bit camera applications.

  • Adding 32-bit configurations to all projects and solutions is a relatively easy task.
  • Study/investigating and design are required for the following issues:
    • Naming of DLL and LIB. Good practice? Adding '32' suffix?
    • dist directory layout.
    • Installing process. Require running the installer once for each mode?
    • Class ID/name. Should they be different?
    • Use cases with a mix of 32-bit and 64-bit for the DLL and app. Is it possible? Does it work properly?

VS2022 Build Error

Hi, I cloned main repo and latest release and tried to build them with VS2022 17.8.4.
I used Release x64 build type but I got these errors.

Desktop development environment with C++
.NET desktop development
Universal Windows Platform development

packages installed and I am using them with Unreal Engine without problem.

v1.7 Release Error

4>   Creating library E:\Github\C++\WebCam\softcam\x64\Release\softcam.lib and object E:\Github\C++\WebCam\softcam\x64\Release\softcam.exp
4>softcam.vcxproj -> E:\Github\C++\WebCam\softcam\x64\Release\softcam.dll
3>core_tests.vcxproj -> E:\Github\C++\WebCam\softcam\x64\Release\core_tests.exe
4>Creating dist directory and copying the header and binaries into it.
4>softcam.h -> ...dist\include\softcam\
4>The system cannot find the file specified.
4>softcam.lib -> ...dist\lib\x64\
4>The system cannot find the file specified.
4>softcam.dll -> ...dist\bin\x64\
4>The system cannot find the file specified.
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: The command "@if not exist E:\Github\C++\WebCam\softcam\dist mkdir E:\Github\C++\WebCam\softcam\dist
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @if not exist E:\Github\C++\WebCam\softcam\dist\include mkdir E:\Github\C++\WebCam\softcam\dist\include
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @if not exist E:\Github\C++\WebCam\softcam\dist\include\softcam mkdir E:\Github\C++\WebCam\softcam\dist\include\softcam
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @if not exist E:\Github\C++\WebCam\softcam\dist\lib mkdir E:\Github\C++\WebCam\softcam\dist\lib
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @if not exist E:\Github\C++\WebCam\softcam\dist\lib\x64 mkdir E:\Github\C++\WebCam\softcam\dist\lib\x64
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @if not exist E:\Github\C++\WebCam\softcam\dist\bin mkdir E:\Github\C++\WebCam\softcam\dist\bin
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @if not exist E:\Github\C++\WebCam\softcam\dist\bin\x64 mkdir E:\Github\C++\WebCam\softcam\dist\bin\x64
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @echo softcam.h -^> ...dist\include\softcam\
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @copy /y E:\Github\C++\WebCam\softcam\src\softcam\softcam.h E:\Github\C++\WebCam\softcam\dist\include\softcam
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @echo softcam.lib -^> ...dist\lib\x64\
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @copy /y E:\Github\C++\WebCam\softcam\x64\Release\softcam.lib E:\Github\C++\WebCam\softcam\dist\lib\x64
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @echo softcam.dll -^> ...dist\bin\x64\
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @copy /y E:\Github\C++\WebCam\softcam\x64\Release\softcam.dll E:\Github\C++\WebCam\softcam\dist\bin\x64
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: 
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :VCEnd" exited with code 1.
4>Done building project "softcam.vcxproj" -- FAILED.
5>------ Build started: Project: dll_tests, Configuration: Release x64 ------
5>raw_api_test.cpp
5>dll_tests.vcxproj -> E:\Github\C++\WebCam\softcam\x64\Release\dll_tests.exe
========== Build: 4 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Main Errors:

4>The system cannot find the file specified.
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: The command "@if not exist E:\Github\C++\WebCam\softcam\dist mkdir E:\Github\C++\WebCam\softcam\dist
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @if not exist E:\Github\C++\WebCam\softcam\dist\include mkdir E:\Github\C++\WebCam\softcam\dist\include
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @if not exist E:\Github\C++\WebCam\softcam\dist\include\softcam mkdir E:\Github\C++\WebCam\softcam\dist\include\softcam
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @if not exist E:\Github\C++\WebCam\softcam\dist\lib mkdir E:\Github\C++\WebCam\softcam\dist\lib
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @if not exist E:\Github\C++\WebCam\softcam\dist\lib\x64 mkdir E:\Github\C++\WebCam\softcam\dist\lib\x64
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @if not exist E:\Github\C++\WebCam\softcam\dist\bin mkdir E:\Github\C++\WebCam\softcam\dist\bin
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @if not exist E:\Github\C++\WebCam\softcam\dist\bin\x64 mkdir E:\Github\C++\WebCam\softcam\dist\bin\x64
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @echo softcam.h -^> ...dist\include\softcam\
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @copy /y E:\Github\C++\WebCam\softcam\src\softcam\softcam.h E:\Github\C++\WebCam\softcam\dist\include\softcam
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @echo softcam.lib -^> ...dist\lib\x64\
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @copy /y E:\Github\C++\WebCam\softcam\x64\Release\softcam.lib E:\Github\C++\WebCam\softcam\dist\lib\x64
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @echo softcam.dll -^> ...dist\bin\x64\
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: @copy /y E:\Github\C++\WebCam\softcam\x64\Release\softcam.dll E:\Github\C++\WebCam\softcam\dist\bin\x64
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: 
4>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(166,5): error MSB3073: :VCEnd" exited with code 1.
4>Done building project "softcam.vcxproj" -- FAILED.
5>------ Build started: Project: dll_tests, Configuration: Release x64 ------
5>raw_api_test.cpp
5>dll_tests.vcxproj -> E:\Github\C++\WebCam\softcam\x64\Release\dll_tests.exe
========== Build: 4 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Is it possible to set resolution for the output?

Is it possible to set resolution for the output?

I'd like to set aspect ratio manually, doesn't matter if I have to keep updating the registry until I get the one that suits me.

I'm having trouble getting my camera settings to run in Bluestacks as it is, so I'm going to try your dll solution wondering if their app is going to take the dll in.

Also, is this code capable of changing the Win10 native dll settings?

Thanks in advance and sorry if my questions are stupid.

Camera not recognized by Zoom

I got this to work locally via my chrome browser, but Zoom doesn't recognize my virtual camera. Any idea on how to fix?

Image colors are not correct

Hi, I tried loading an image in Python and sending it.

It works, but the image appears very blue.

Here is my code:

from PIL import Image
from x64.Release import softcam

def main():
    dt = 1/60
    cam = softcam.camera(1920, 1280, 60)
    image = Image.open('./test.jpg')
    image = image.convert('RGB')

    # Here, you can wait for an application to connect to this camera.
    while not cam.wait_for_connection(timeout=1):
        pass

    while True:
        # send the image
        cam.send_frame(image)


if __name__ == '__main__':
    main()

Original image:
https://images.unsplash.com/photo-1542500186-6edb30855637?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1740&q=80

What shows up in Zoom (virtual camera):
https://i.imgur.com/3ljVlsU.jpg

Any idea why? Is it related to the color table of the image? I tried converting to RGB, not sure what else I should do.

Thanks

Different Video Formats?

Hello. I understand that currently you can only use BGR24 format. It would be great if you could expand to ABGR32 (or a different layout) and or any YUV format. Other than that, it's a great wrapper.

Edit: Is it possible to choose between Progressive and Interlaced?

Default image when there is no input

Hi,

Is there a way to set a default image when the sender app is not open?

For example, this is what OBS default virtual camera placeholder image is:
image

Thanks for all your hard work.

Changing dll name that is searched for

I keep getting an error saying softcam.dll isn't found as I want to change the name of the dll.
I have installed the dll under a different name. It's just when I run the sender exe, it is looking for the wrong name.

Where is the piece of code to tell it to look for a different name, for example cam.dll

Thanks in advance.

could it add a convert function() which make input is a Mat format

could it add a convert function() which make input is a Mat format ?
a convert function() which make input is a Mat format as :

void Mat2DWimage( Mat matImage, vector &directShowImage )
{
int width = matImage.cols;
int height = matImage.rows;
int channels = matImage.channels();
std::vector directShowImage(width * height * 3);
if (matImage.isContinuous()) {
memcpy(directShowImage.data(), matImage.data, directShowImage.size());
} else {
// If the image is not stored continuously in memory, copy row by row
for (int row = 0; row < height; ++row) {
memcpy(&directShowImage[row * width * 3], matImage.ptr(row), width * 3);
}
}
}

Add hardware ID into device info?

Heyy, wanted to ask, if it's possible to add HW camera ID into this camera. I mean that ID inside brackets.. As you can see, it's not part of camera name, but it's being printed with device.label

real_cam

Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.