Simplest way to feed existing video file to a Skype call from C#?
Asked Answered
E

1

6

I have looked in quite a few places both in SO and elsewhere but nothing seems to directly answer my question (at least not using terms I am familiar with).

Note: We are aware of the challenges of getting a video auto-responder to work smoothly and look good, but this question is not about that. Right now I am focusing on the immediate technical issue of feeding a video file to Skype.

Background
I have been asked to create a Skype "auto-responder" for use in a demo environment that supports audio and video calls, as well as IM chat.

Problem
It is relatively easy to create an IM chat "bot" for this, and it appears there is an existing Skype API for playing an audio file over a call, but there is no API for playing a video file.

Doing My Homework
Within the Skype API, there is another version called SkypeKit which supposedly provides some different features than their standard Desktop API. I have submitted a request to get access to SkypeKit but have not yet received a response on that.

Beyond support within the Skype API, our next thought was that there must be virtual webcam components out there for download/purchase that would allow us to play a video so that Skype believes it is coming from a webcam. One of the closer questions to this that I found on stackoverflow is here:

How to transmit with a virtual webcam driver in .NET

However, the author of that post was limiting his request to free/open source solutions, while I have the option of using a commercial component (within reason). Also, the only response to it implies building your own virtual webcam using DirectShow.

There are a plethora of discussions, both on SO and other sites, on building your own virtual webcam using DirectShow, but that seems a lot more costly than just buying something for a few hundered USD. I have zero experience with DirectShow or anything related and it would take time just to understand the concepts and terminology. It is possible I could take the time and learn all of this, but a simpler solution, if available, is preferred.

As far as existing components goes, the only one I could find is Virtual Camera SDK, but it seems to be focused on capturing video (from screen or real webcam), rather than posing as a webcam for other applications. Their site is also rather vague on information, which makes me a little cautious.

There are plenty of other products and discussions I have found, but it would be tedious and uninformative to list them all here.

The Question(s)
My actual question has two parts:

  1. What is the best way to stream a video file to a Skype call?
  2. If the answer is via a virtual webcam, what is the simplest way to accomplish this (i.e. good off-the-shelf components, sample code, etc.)

As an aside, someone here even suggested just playing videos on the screen and setting up a real webcam to stream the images into Skype. As you can imagine, a fully programmatic solution would be better.

Thank-you in advance for any assistance.

Eternalize answered 20/2, 2013 at 22:10 Comment(8)
I won't pose this as an answer as I don't have enough details to really help you but my first thought was that you could look at the output from a real webcam device under linux and consider creating your own device that applications (like Skype) can connect to and receive video from.Bassett
Your best solution if skype don't give you what you want would be to make a dummy camera driver, which would mean developing it as a device using the Windows DDK. Once you're into that territory then there's little sample code around as few people need to do it.Malcah
Also, the poor english on the "virtual camera sdk" site would not give me confidence that their product is suitable for use in production.Malcah
@JamesSnell I appreciate your responses, but creating my own dummy camera driver is far more effort than I want to consider for now. I am kind of surprised there aren't more off-the-shelf solutions out there.Eternalize
hmm - coming back to this I spotted an SO thread which discusses Vivek's VCam at tmhare.mvps.org/downloads.htm and that in combination with using flash to play back the video to a screen region and handle the transitions neatly might be a good bet?Malcah
@JamesSnell I came across that page in my searches prior to posting my question here but at the time felt the page and code was fairly old. The Capture Source Filter (which I presume is the VCam you are referring to) was written in VC6. Another of the downloads notes that it requires VS.NET 2003 but has not been tested on "Whidbey" (the code name for VS 2005). I'm still hoping someone has produced something more pre-packaged, but I must admit that those hopes are fading. I may have to give Virtual Camera SDK a try.Eternalize
Not sure if this will help at all but link heres a bit of code which demonstrates how to capture video input from a webcam etc, so maybe you could use this to work out the "opposite" end of it...Clementineclementis
The problem with virtual DirectShow cameras is that even if you end up implementing it (though you write it clearly that you don't want go there, and you definitely don't want to implement a driver with DDK!), you will be facing slowly fixed Skype bugs. Skype guys don't really check their software against virtual devices, still they obstruct any debugging running within their process. Painful experience, no happy ending guarantee - and this is still the easiest way.Afloat
H
1

With current technologies, I would say that the best option is indeed to use a virtual webcam implementation.

There's several solutions available (a quick Google search - www.google.com/search?q=virtual+webcam - returned quite a few options). A full POC solution would involve:

  • Initialize virtual webcam and let it ready for video playback;
  • Make sure Skype is using the virtual webcam as video source;
  • use Skype API to detect Skype incoming video calls;
  • use Skype API to pick up the call, and start video playback using the virtual device as target.
  • Cleanup: hang up as the video ends, or stop playback if remote caller hangs up.
Huge answered 2/4, 2013 at 18:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.