Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play Videograbber input via DirectShow locally in Browser

I have an Elgato 4k60 Pro Capture Card and can grab video input via hdmi. I have to use the Elgato Software, but I could also open the live inputstream with VLC via DirectShow. But my goal is to see the live inputstream in the browser, just locally for me. Because it works also in VLC I think it could be possible with HTML/JS. I also could stream it with OBS or something over the internet and watch my own stream in the browser, but this way needs too much hardware resouces. Better would be to show the grabbed input directly in the browser. Is there any good solution or existing example? Thank you very much!

like image 555
MarioGotti Avatar asked Jan 21 '26 09:01

MarioGotti


1 Answers

Locally running browser can open either encoded streaming media or a local user multimedia device such as camera via Media Capture and Streams. So the answer to your question depends on your definition of "see" below:

But my goal is to see the live inputstream in the browser, just locally for me.

The streaming media path requires that something - and browsers do need help with this because they are not the right tool to access media data from devices like Elgato capture card directly - that something encodes the video (and audio) into suitable form. This can be additional application that produces either Media Source Extensions API (MSE) chunks delivered to browser with some helper JS code, which then uses browser MSE interface to populate media streams. Or, alternatively, the encoding application could present the media feed using MPEG-DASH or HLS asset which a browser can play with the help of one of JS players available out there, or native browser support for certain streaming media protocol.

In this sense there is no much of difference whether encoded stream is consumed by your local browser or a browser running on another system on network.

The other path of "seeing" video as a local multimedia device requires, apart of browser support for this relatively new API, that browser's implementation on the platform recognizes the Elgato hardware as a suitable camera, which I am guessing is not the case of Elgato: to my best knowledge (which is a bit stale though) the integration layer they provide is insufficient since modern browsers like Chrome use Media Foundation API (as opposed to DriectShow) to access such local devices and so Elgato remains invisible as a video source.

UPD. I think I stand corrected with the above - Elgato device might be actually visible for Media Capture and Streams API. I checked my records and their Game Capture HD60 Pro looks like having suitable driver for Media Foundation. So 4K60 Pro might work out too. getUserMedia test page is where can quickly check if browser is capable to capture from a local video source.

like image 111
Roman R. Avatar answered Jan 22 '26 21:01

Roman R.