Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c#

skype

webcam

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.

like image 698
Dave Parker Avatar asked Feb 20 '13 22:02

Dave Parker


1 Answers

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.
like image 141
OnoSendai Avatar answered Oct 20 '22 06:10

OnoSendai