I'm using DirectShow .NET to capture WebM Videos.
The Graph looks like this:
My question is, how can i use the "preview" pin from VP8 encoder to stream a preview video?
Is there any (free) DirectShow filter available for this job?
Or is the preview pin the wrong way?
Edit:
The "Enhanced Video Renderer" is the renderer to show the video in a window. It works properly but is just an example. I have a Webservice (WCF) and want to stream the live capture through the network simultaneously to the filewriter. (Filewriter in the graph "test.webm") I think i doesn't need a custom solution here. There are filters for showing the video in a Window. i simply need a filter with a streaming output. The rendering process is part of the browser side. How can i achieve this?
In other words: Im searching a stream writer filter or something else.
Related
I have designed an winform application (c#) to play a video using microsoft.directx.audiovideoplayback in a picturebox.Now I want to extract each of the frames or bitmap images of the video while it is being played.Is there any way to achieve it?
Video playback (AudioVideoPlayback based in particular) does not use bitmaps to stream and present video. In order to extract individual frames you need a more powerful video API to stream and decompress video. One of the typical approaches is to use DirectShow.NET library (both it and AudioVideoPlayback use DirectShow API on the back end) and Sample Grabber there to get you individual frames using SampleCB callback. The data you obtain there can be converted to bitmaps.
See:
Efficiently grabbing pixels from video
I am developing C# desktop application and referring this link to Play video file http://www.codeproject.com/Articles/2632/DirectShow-MediaPlayer-in-C , now from this playing video file ,when I click on this panel (shown in above link ) how to capture Images from playing video file,I searched but I found all examples showing capturing Images from some device(for eg.webcam,etc..) ,In my case Its not device it's file which I am browsing from Directory and Playing ,as I am new to this Video capturing Please direct me how I can do this
"Capture" normally refers to image acquisition when you obtain the image from external source. You want to take a copy of currently displayed video frame instead. There are several ways to do it and when it comes to playback when video is being visualized, the video renderers typically offer GetCurrentImage method which returns a copy of currently displayed video frame, possibly even converted to RGB.
Method syntax slightly differs between video renderer versions.
See previous topics on achieving this:
take picture from webcam c# (references sample application from DirectShow.NET)
IBasicVideo CetCurrentImage catastrophic failure(DirectShow.NET)
Also:
Best DirectShow way to capture image from web cam preview ? SampleGrabber is deprecated
Grabbing images from a DVD using direct show
You need a filter which captures screen and sends the video down the stream.
In the DirectShow Library there is a sample filter called PushSource and inside there is PushSourceDesktop.
At Codeplex there are Examples like this (Click me) or Information (Click me) about Filters.
You can also use a "SampleGrabber" DirectShow filter: just place it in the filter chain between your source filter and render filter.
More info about SampleGrabber:
see MSDN
I want to be able to control a DSLR camera to start/stop recording video.
Canon has a nice SDK, but it seems that Video capture is not supported.
Anyone know if Nikon SDK supports this ?
Maybe there is a workaround for shooting video using Canon's SDK ?
Thanks.
Another hack: you might be able to capture the liveview images and stitch them together into a movie file.
It seems this is impossible using Canon's SDK. I solved this with a hack - using a USB-IR transmitter that sends the signal used by a Canon Remote to start/stop video. Ugly but works.
I am interested in developing an application that will allow me to build a list of videos from xml (containing video title, duration, etc) and play that list as my webcam stream. Meaning, if I were to visit ustream.tv, or activate my webcam on live messenger my video playlist would register as my active webcam.
Does anybody have experience in this area, and perhaps have some advice to offer?
If you want this to work so that third party apps see your video as a standard webcam stream (and is sounds very much like you do) then the only way to do it is to write a virtual webcam driver. You will then then be able to "play" your video content as your webcam's streaming output. This will involve writing code to decode the video content - probably using DirectShow - and then copying the raw video stream to the webcam's output stream. You'll need to either write a custom DirectShow renderer filter or use the sample grabber to access the raw, decoded frames.
It's certainly an achievable goal, but not particularly easy given that both DirectShow and driver development have fairly steep learning curves. There are a variety of different driver models you could use for this, depending on exactly what your aims are. The easiest thing would be to create a Video for Windows (VfW) virtual camera driver. The huge benefit of this approach is that the driver will be entirely user mode code - much easier to debug and to write in general.
I don't have a lot of experience in this area, but I would start by looking at the MSDN docs for the DirectShow API.
A couple of .NET wrapper libraries exist as well:
Managed DirectShow
DirectShow.NET
Another DirectShow.NET
I want to plug a live video broadcasting facility to a website. I'm planning to use silverlight and C# but I'm very newbie in this topic.
What is the best way to do this?
Thanks in advance.
Update:
I have a camera. I want it to capture it and show on my website. Live. But I have no idea about what I must do inside. Tell me everything about the capturing, streams, api's, dll's, whatever else I need to know. Thanks.
If you're on Windows, you may want to consider the free Windows Media Encoder 9 SDK (http://www.microsoft.com/windows/windowsmedia/forpros/encoder/features.aspx). The idea is that Windows Media Encoder allows you to use any device as a media source (say, a video capture card or a streaming-enabled camcorder) and to push it out as an ASF stream, or even to multicast/broadcast it via Windows Media Services.
The WME SDK is simply a programmatic (COM) interface to WME. In principle you can automate the encoder and instruct it to use your camera as a source, and push it out to a specified UDP port or publishing point (for the latter you'll need Windows Server 2003/2008 with Windows Media Services installed).
A newer alternative is Microsoft Expression Encoder SDK (http://www.microsoft.com/downloads/details.aspx?FamilyId=9A077A3D-58CE-454C-B486-153F0578BE4A&displaylang=en), which "talks" to Expression Encoder and allows you to stream out to Silverlight clients (among others), but the caveat here is that EE is not free (WME is).
do you have a live stream? Or is that the part you need? If you already have a live stream with a URI, then you could use Silverlight to display it as all you need is a player and a URI (you can get a player anywhere, here's one http://sl2videoplayer.codeplex.com).
If you don't have the stream, then what you will need is some mechanism to capture video and stream it. You can use Windows Media Server to do the streaming.
Can you clarify what pieces you have and what you need?