This implements a DirectShow driver/wrapper over a HTTP based JPEG/M-JPEG streamed video, widely available with IP cameras. Once installed, it provides a Start Menu shortcut to manage video capture devices, where a user can add/remove devices. The devices are automatically registered with DriectShow and are available to applications.
The compatibility list includes:
- Windows SDK AmCap Sample (reference)
- VideoLan VLC
- Skype (see below)
- Google Talk Video Chat
- Luxriot (as rather an example as Luxriot has its own generic JPEG/M-JPEG device driver, however this still demonstrates compatibility and interoperability of applications)
- GraphEdit, GraphStudio and similar tools
For a created device it is required to configure:
- JPEG or M-JPEG resource URL on the device, where the driver will access video feed or sequential snapshots
- Image/video size on the device
Resource URLs vary from device to device and there is no standard identifier. This has to be looked up for specific model in device API reference or SDK. For JPEG snapshots it is possible to copy image shortcut from web browser and paste address into device settings.
Note that some devices, especially low end IP cameras deliver non-compliant feed which can be decoded either by manufacturer’s ActiveX control or model-specific implementation which this driver does not convert and is unlikely to ever cover. The driver will only work with hardware which honors industry standards.
For example, Stardot NetCam SC cameras make the video feed accessible using /nph-mjpeg.cgi resource, so the full URL will consist of protocol prefix “http://”, optional username and password (see screenshot above), IP address or host name e.g. “demo2.stardotcams.com”, resource identifier on the device “/nph-mjpeg.cgi”.
It is necessary to provide video size of the footage in advance so that the driver could negotiate content media types without accessing the device. Future versions of the driver might implement auto-detection.
To make the device work with Skype, it is necessary to:
- Configure the device (using its web interface) to work at resolution 640×480
- Add/configure device with Alax.Info IP video Source as described above, including setting of 640 by 480 pixel resolution in device configuration
Software implements and registers video input/capture devices, listed under DirectShow CLSID_VideoInputDeviceCategory category. The applications access devices from the list and treat as a regular device such as web camera.
Windows SDK AmCap sample will create the following DirectShow graph where the source filter implemented by this software:
Internally, software creates a worker filter graph in order to stream data from the device:
To decode video, software uses stock MJPEG Decompressor Filter provided with operating system.
- Version: 1.0.0
- Binaries: Win32 â€“ IpVideoSourceSetup-Win32.msi, x64 – IpVideoSourceSetup-x64.msi
- License: This software is free to use
14 Replies to “DirectShow Video Source Filter for JPEG and M-JPEG IP Cameras”
- 1280 x 720
First of all you can check Axis software, I am sure they provide a filter for this. You can use my filter https://alax.info/blog/1216 and I am pretty sure there are a number of filters available on the net.
You will need an URL which works for your camera to get M-JPEG stream. I think their API is here http://www.axis.com/files/manuals/VAPIX_3_HTTP_API_3_00.pdf page 29
Thanks for nice Directshow source filter, the only problem is that it works only with 32 bit applications but I have a 64 bit application and it did not accept it, could you also make the 64 bit version.
Also as a suggestion if it can accept RTSP URLs I thenk it will be ideal.
Great news: x64 build is also available, see https://alax.info/blog/1223
I have bits of code to build RTSP filter also, but this goes slowly as a low priorty thing.
maybe a generic “ffmpeg as input” filter would be even more useful (i.e. anything ffmpeg can receive…)
I do not understand how it makes you a webcam. Could you help me? As in skype
I have a Sony IPELA SNC CH180 camera, like this one: http://126.96.36.199/en/index.html
However, I’m not able to find the video feed for this camera.
Does anyone know the feed?
Here you go:
First of all, I must thank for your great DirectShow wrapper. It works very well for me.
Recently I have to deal with similar case to get video fed into my application via DirectShow, but the IP camera provided can only stream H.264 via RTSP. I know it was a low priority thing for you, but just curious to know how soon it will be published as it has a quite some time since March of this year. Thanks in anticipation.
Is it possible to change the framerate, even that the camera can’t do that?
When using a grabberprogram that use the directshow device, the fps dont change anything, always the ip-camera fps.
It’s fine if it was possible to set the fps inside the manager.
Throttling – to lower effective FPS and reach certain target FPS of interest – on my filter is possible, however it is not the best way to approach the problem.
It is certainly better to embed the FPS setting into URL, or otherwise set it up on the camera directly. It is not applicable to every device, of course. Throttling network activity does not work good because there is buffering between the host and the camera. The best would be to receive at maximal rate and drop unnecessary frames. This does not have to happen in the source filter, and can take place any time later down the stream.
I don’t think I am going to add this option to the source filter itself.
The 64 bit version does not work with Skype. I have Windows 7 64 bit. Tried to install both 32 and 62 bit versions, but the IP camera does not show up in the camera list of Skype. I followed the indications strictly to no avail. However, with a different Webcam Viewer, the IP camera is seen. So there must be something wrong just with Skype.
Skype is 32-bit app. You need 32-bit version of IP Video Source to work with Skype.
Additionally, because of Skype bug in their recent version you need to alter registry manually. I have not yet embedded this fix into setup to have this done automatically. See Bringing virtual DirectShow devices back to life with Skype 6 for details on registry patching.
can you assist me please… I have downloaded and installed your utility â€“ IpVideoSourceSetup-Win32 and have entered http://172.16.81.249:10000/cgi-bin/video.cgi?msubmenu=mjpg this shows in VLC as a direct show device but when i try to play it , vlc tries but nothing happens,,, tried the webcam and it goes ok,, any assitance is appreciated,, paul
Hey Paul, sorry I lost your comment… It’s hard to tell what’s wrong without being able to try oneself. If your camera is on Internet, I could possibly try to configure it on my end and then share the instructions. Or, the M-JPEG feed might be not quite valid, or decoder rejects this flavor of JPEG etc.