Using a directshow rtp filter as virtual webcam? RRS feed

  • Question

  • Hi

    I'm a newbie in this field, although i dont like to say that... :-S

    I want to stream a video from a second pc to my mobile notebook. I then want to decode the stream and use it like a webcam.

    A directshow filter which sould be capable in decoding an rtsp stream was found here:
    but this is simply a filter, what I want is to use this filter in a virtual directshow device to make other programs use it.
    Is this somehow possible, and if yes, how?

    Or is there a better implementation of directshow rtp?

    thanks a lot

    Monday, October 27, 2008 3:52 PM


All replies

  • If are creating a GPL'd open source project, you can use VLC:




    For a Virtual Cam implementation see my Downloads page through the link below.




    Monday, October 27, 2008 4:25 PM
  • Could you clarify what you mean by "Use it like a webcam"
    First of all DirectShow is

    A DirectShow graph consists of a bunch of filters that are connected in a pipeline: webcam manufacturers provide DirectShow source filters which I think is synonymous to the "virtual DirectShow device" you are referring to.
    Open up the GraphEdit tool and select "Graph->Insert Filters" and then select "Audio Capture Sources" or "Video Capture Sources", you'll see the DirectShow filter provided for your webcam (provided that you've installed one)

    Filter's can be registered using regsvr32 and can then be loaded using their GUIDs. This allows other programs to "use" any registered filters.
    Hence if you write a DirectShow filter you should be able to accomplish what you want.

    AFAIK there's no source for Morgan's DS RTSP filter, however the library used internally to accomplish the RTSP/RTP/RCP is the open source liveMedia library available from http://www.live555.com under LGPL. You are free to write your own DirectShow RTP/RTCP/RTSP filters using this library.
    There are no standard ones (at least free) availble AFAIK.
    Monday, October 27, 2008 4:28 PM
  • hehe tbh i've already seen this example... i found it by browsing with google. I think you talk about vivek's example.

    What i'm more looking for is a working out of the box thing, more for proof of concept before trying to code everything myself and realize that it's not what i want.
    Monday, October 27, 2008 5:27 PM
  • My system setup looks like this:

    a RTSP server (videolan VLC) in the web

    a client, which wants to use the RTSP stream as webcam. So by saying virtual webcam I in fact talk about the RTSP stream from the server, which should be handled by my notebook like a webcam. So basically I want to open a program which can handle dshow devices, then select my magical virtual dshow device. The result should be the rtsp stream coming from the rtsp server....

    You say "com based" and t can then be loaded using the "GUID". Somehow it is possible to register a source filter (i did that), but using the filter as a webcam is something harder to accomplish... no?
    Monday, October 27, 2008 5:31 PM

  • for completeness here two links i found by browsing with google:


    trial version 5 min streaming limit, license ~250 euros

    sourcecode? dont think so...

    Here a pure filter which states it can read rtsp:


    but i was not able to get it working, same to first link btw, but i'm trying to get it working...

    Monday, October 27, 2008 5:36 PM
  • VLC also uses the liveMedia library I mentioned above for RTSP, RTP, etc.

    Based on the scenario you describe you have to do the following:

    1) You need to write a DirectShow source filter which accepts packets from the network. This is the filter that you will load via it's GUID. This filter will use the liveMedia library for all your RTSP, RTP, RTCP related things.

    2) You need to write a second DirectShow application which loads your filter and creates a DirectShow graph containing some media pipeline. This might contain the required decoder, etc. You will select your "magical virtual DirectShow device" in this application. I.e. You will load your DirectShow filter and pass it a URL through the IFileSourceFilter interface.
    Alternatively just use Windows Media Player and register your filter as the filter to be used with the RTSP protocol.
    (In which case you don't even have to write the second application, but you have to implement the IFileSourceFilter interface in your filter)

    I'm still not quite sure what you mean by "Using the filter as a webcam".
    What other webcam-like functionality do you require?

    If it's seeking, etc that must all be handled by your source filter.

    And you're right, it's not that easy to accomplish if you're not familiar with DirectShow.
    I've been working on my own one for quite a while and there's still a few things I need to sort out like audio/video synchronisation but overall it works ok. If you get stuck I can give you a couple of pointers in the right direction...

    I must still finish off this tutorial I'm working on which shows how to use the liveMedia library with DirectShow to stream audio (server side) and a simple RTSP filter (client side), but I just haven't had time, I'll try and finish that off soon, maybe that will help you get started...

    Tuesday, October 28, 2008 5:22 AM
  • "I'm still not quite sure what you mean by "Using the filter as a webcam".
    What other webcam-like functionality do you require?"

    I'm working on a virtual reality device and we want to stream video from a second virtual reality device to the first one. Now to get the stream into the framework (which can get plugins in C and C++ http://www.virtools.com/ ) i thought it would be the easiest thing to use a virtual webcam, since telling the framework to use a webcam on a texture is quite easy, but displaying of a video seems a lot harder.

    So i fear to use windows media player is not an option, it must be a virtual webcam.

    How would you call a virtual webcam? virtual dshow device?

    btw When trying to use the
    virtual webcam which comes with the rtp av source filter I get a message telling me that the device is currently being used or not working correctly. This only happens on one device, on the second I can try to use it (still didnt work yet). Reinstalling is no help... i somehow get the feeling that the dshow thing is quite delicate Smile
    Tuesday, October 28, 2008 3:39 PM
  • I am also looking for a software that does that. I would like a software that can take an RTP stream from VideoLan and make it available from softwares on which you can use a webcam, for example MSN Live Messenger.

    Video File ---> VideoLan Software ---> RTP Stream ---> Decoding software that turns the video stream into a virtual web cam ---> MSN Live Messenger

    If you find a software that does that, please let me know, I would pay a reasonable price for it. RTP AV Source Filter is too expensive for what I want to use it for so I did not even try it.
    Thursday, October 30, 2008 11:10 PM
  • To Jeff_Turcot,


    You can search softwares like Video2webcam, Webcam Simulator, Virtual Webcam...

    some of them support converting http/mms streaming to virtual webcam.

    Friday, October 31, 2008 3:20 AM
  • using videolan vlc in directshow open source


    i did not try it, but it might be what you want (it might)
    inform us if u had any success
    Thursday, November 20, 2008 1:23 PM
  • HI

    Did you find a way to do the RTP stream into vIRTUAL WEBCAM?

    Please let me know


    recuerdadinero [ at ] hotmail.com

    Monday, November 26, 2012 12:21 AM