Git Product home page Git Product logo

Comments (6)

mpromonet avatar mpromonet commented on June 2, 2024

Hi @muhanad40

Please note v4l2:// urls are for H264 encoded stream, then it needs -o argument and H264 support from the v4l2 device. When enabled it should be discovered by /api/getMedialist.
videocap url used the iteration of video device detected with GetDeviceName see https://github.com/mpromonet/webrtc-streamer/blob/master/inc/CapturerFactory.h#L90 and openned in https://github.com/mpromonet/webrtc-streamer/blob/master/inc/VcmCapturer.h#L81, it is not the number in /dev/videoXX.

Best Regards,
Michel.

from webrtc-streamer.

muhanad40 avatar muhanad40 commented on June 2, 2024

Hi @mpromonet, thank you for your quick reply. I don't think the streams are H264 encoded. I just plug the devices in and they show up in the /dev directory. How can I connect to a device's webrtc stream using its device path? Is this even possible?

The reason why I ask is because I need a way that's predictable to connect to the webrtc stream. I have a web application that knows a device's /dev path so it can only use that to connect to its stream.

How can I do this?

from webrtc-streamer.

muhanad40 avatar muhanad40 commented on June 2, 2024

FYI, I can connect to a device using opencv using the device's /dev path videocap://dev/video2 and able to grab a screenshot. So I know that videocap://dev/video* pattern works. Not sure how I can do this with this.

from webrtc-streamer.

muhanad40 avatar muhanad40 commented on June 2, 2024

Another reason why I want to rely on the real /dev path is that it's predictable. Currently the devices are enumerated so I can't predict which device will be which index number. I plan to connect many more devices and it's very important that I use something fixed and not dynamic.

from webrtc-streamer.

mpromonet avatar mpromonet commented on June 2, 2024

Hi,
You may use device by path. In order to do this, you need to modify the code. Feel free to submit a PR.
Best Regards
Michel

from webrtc-streamer.

muhanad40 avatar muhanad40 commented on June 2, 2024

Hi, I wish I can submit a PR, but I'm not a C++ developer. Thanks anyways :)

from webrtc-streamer.

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.