Git Product home page Git Product logo

Comments (15)

kmalinich avatar kmalinich commented on June 9, 2024 1

It may have something to do with whatever is telling OBS (here shown on macOS 10.15.6) that the only valid FPS selection is 2

20200912-095520

from showmewebcam.

htruong avatar htruong commented on June 9, 2024

I think it's because the webcam only supports MJPEG for now. We need to get H264 support in for better performance. We need someone who can figure out how to make uvc-camera output H264 from the HQ camera.

$ ffmpeg -hide_banner -f v4l2 -list_formats all -i /dev/video0
[video4linux2,v4l2 @ 0x55b219f916c0] Compressed:       mjpeg :          Motion-JPEG : 1920x1080

Here, I think webex doesn't have an accelerated H264 encoding pipeline or its software encoding pipeline is horribly inefficient.

from showmewebcam.

htruong avatar htruong commented on June 9, 2024

Thanks for the cursor. Let me see what can be done about this.

from showmewebcam.

kmalinich avatar kmalinich commented on June 9, 2024

Found it

https://github.com/showmewebcam/uvc-gadget/blob/4de8718f04d3fb14cee7fd1e3ceca0c93dc580d6/multi-gadget.sh#L29

Frame interval in was set to 5000000 microseconds, which is 2 frames per second.
Setting it instead to 333333 microseconds [ (1/30) x 10^7) ] makes it 30 frames per second.
Previous to this change, it did definitely appear to be running faster than 2 frames per second in Quicktime Player movie recording and in OBS preview, but now it is definitely much smoother. It may or may not fix @Fernyman79 's issue.

With this change the FPS value appears properly in OBS:
20200913-221928

from showmewebcam.

htruong avatar htruong commented on June 9, 2024

@kmalinich Thanks, that's fantastic, I will try that and release a fix. I think the unit for dwFrameInterval isn't microseconds though, because 333,333 microsecs = 0.33 secs = 3fps.

from showmewebcam.

htruong avatar htruong commented on June 9, 2024

I have checked, it looks like at least VLC in Linux sees that the current fps is 0.2.

That makes dwFrameInterval should be in microseconds, and thus be set to 33333 not 333333.

from showmewebcam.

Fernyman79 avatar Fernyman79 commented on June 9, 2024

Awesome! I'm definitely getting around 30 fps on Webex now. I can't test the image quality on the other end yet, but I'll report as soon as I have a chance to test.

from showmewebcam.

htruong avatar htruong commented on June 9, 2024

@Fernyman79 did you set the parameter dwFrameInterval to 33,333 or 333,333?

from showmewebcam.

nathcoad avatar nathcoad commented on June 9, 2024

How can I modify the multi-gadget.sh script? The squashfs filesystem is mounted readonly. Thanks!

from showmewebcam.

Fernyman79 avatar Fernyman79 commented on June 9, 2024

@htruong just checked. 333,333.

from showmewebcam.

Fernyman79 avatar Fernyman79 commented on June 9, 2024

@nathcoad after editing the script, you have to rebuild:

sudo make clean
sudo make

I'm not sure if there's a proper way, but this worked for me.

from showmewebcam.

kmalinich avatar kmalinich commented on June 9, 2024

I've seen reference to the value being in nanoseconds in the UVC driver documentation, but still the value that makes 30fps happen is indeed 333333.

I'll be testing "live in production" on my sprint stand-up Microsoft Teams call for work in 3 hours or so, and I'll report back

from showmewebcam.

kmalinich avatar kmalinich commented on June 9, 2024

Worked 100% for all (10+) the Teams calls I've used it with.

from showmewebcam.

htruong avatar htruong commented on June 9, 2024

Can someone help me test v1.22-preview that has the parameter set to 333,333?

https://github.com/showmewebcam/showmewebcam/releases/tag/v1.22-preview

from showmewebcam.

nathcoad avatar nathcoad commented on June 9, 2024

I don't have webex, but I do have OBS installed and I can confirm that the framerate has gone from 2 to 30 FPS, with a framerate interval of 33.3333 ms.
Thanks for fixing this so quickly!

from showmewebcam.

Related Issues (20)

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.