Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac version: fwrite takes too long #58

Open
renzhilan opened this issue Nov 13, 2021 · 9 comments
Open

Mac version: fwrite takes too long #58

renzhilan opened this issue Nov 13, 2021 · 9 comments

Comments

@renzhilan
Copy link

Hi, I installed the virtual camera service in the Mac version, and then tried to write a 2m pixel fwrite (buffer, buffer_size, 1, proc) each time, but it took about 200 milliseconds, causing the picture to get stuck. What's the reason,

@renzhilan renzhilan changed the title mac版本:fwrite耗时过长 Mac version: fwrite takes too long Nov 13, 2021
@hipersayanX
Copy link
Member

The delay is because the plugin needs to convert the source frame to the destination frame, the higher the resolution of the frame, the slowest it will get.

@renzhilan
Copy link
Author

The same pixel size of 2M does not freeze on the window version, but it freezes on the mac version.

@hipersayanX
Copy link
Member

I freezes completely, or it just lags?

@renzhilan
Copy link
Author

The streaming time has slowed down. It takes about 100ms to write a frame
fwrite(frameRGBBuffer, bufferSize, 1, outputStream);

@isomov
Copy link

isomov commented Feb 7, 2023

Hi! Is there any way to send frames to virtual camera without pipe?

@qing-wang
Copy link

One of the bottlenecks is the std::vector used in VideoFrame. The allocation of vector objects costs a lot of time. I have made a modification which improves this.

@qing-wang
Copy link

The streaming time has slowed down. It takes about 100ms to write a frame fwrite(frameRGBBuffer, bufferSize, 1, outputStream);

Based on my profiling, write seems fast enough, the bottleneck is the frequent memory allocation.

@hipersayanX
Copy link
Member

@qing-wang I know, I must find some time to port the video converter from Webcamoid to the virtual cameras.

@jbain
Copy link

jbain commented Sep 26, 2023

I'm seeing AKVCamManager consuming 85% cpu and can't get past 21fps
image

I assume this might be related to this issue? Or should I open a new issue? I'm using 9.11 on a intel mac

@hipersayanX hipersayanX transferred this issue from webcamoid/akvirtualcamera Oct 29, 2023
@hipersayanX hipersayanX transferred this issue from another repository Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants