473,756 Members | 6,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

video from static images

Hello,

I have a program that renders an animation. I would like the program
to be able to save this animation to a popular video file. Is there
a .NET API for doing this? I looked into DirectShow, but I could not
determine if it can be used to capture data from the screen.
Oct 21 '08 #1
4 2442
On Mon, 20 Oct 2008 22:34:22 -0700, <cr*****@gmail. comwrote:
Hello,

I have a program that renders an animation. I would like the program
to be able to save this animation to a popular video file. Is there
a .NET API for doing this? I looked into DirectShow, but I could not
determine if it can be used to capture data from the screen.
DirectShow is not supported in .NET. But there is an open-source project
providing a managed-code wrapper for it, called DirectShow.NET.

As far as whether it supports screen capture, it doesn't. But if your own
program is generating the animation, it should be simple enough to divert
the images being displayed to the screen to a source filter for a video
compression graph in DirectShow.

If it's not your own program generating the animation and you need to
capture from the screen, I'm pretty sure there are existing third-party
programs that do that. I seem to recall Fraps having this feature, for
example.

Pete
Oct 21 '08 #2
As far as whether it supports screen capture, it doesn't. But if your own
program is generating the animation, it should be simple enough to divert
the images being displayed to the screen to a source filter for a video
compression graph in DirectShow.
Thanks for your reply. My own program is generating the animation and
this is probably what I want to do. If you are familiar with this,
can you elaborate more on what needs to be done or at least give the
DShow interface names so I can start looking them up on MSDN?

Is a source filter basically an array of images?
[...]
>
Pete
Oct 21 '08 #3
On Mon, 20 Oct 2008 23:16:11 -0700, <cr*****@gmail. comwrote:
Thanks for your reply. My own program is generating the animation and
this is probably what I want to do. If you are familiar with this,
can you elaborate more on what needs to be done or at least give the
DShow interface names so I can start looking them up on MSDN?
Sorry...I haven't done this stuff recently enough to have the relevant
interface names off the top of my head. Basically, though...you'll want
to set up a graph with the appropriate encoder and file writer as the
renderer, and your own pull source filter as the input.

Looking at the built-in "File Source (Async)" filter, it looks like a good
start would be the IBaseFilter and IAsyncReader filter interfaces (the
latter being implemented by the output pin of your IBaseFilter).

If you want more details, I recommend the DirectShow specific forums, such
as microsoft.publi c.win32.program mer.directx.vid eo. There's also
microsoft.publi c.multimedia.di rectx.dshow.pro gramming...I don't recall
that newsgroup, but it looks like it's been around since '97. I don't
know what the difference between the two might be, other than that the
"video" newsgroup is likely to be more specific to video-related
questions, while the other is probably more general.
Is a source filter basically an array of images?
In DirectShow, the entire process is set up as a directed graph. Each
node in the graph is a "filter". Every filter exposes input pins, output
pins, or both. The pins are the logical connection between one filter and
another.

Different filters do different things. Source filters provide data,
transformation filters change the data, and renderers write data. Sources
can be files, video cameras, or programmaticall y generated, for example.
Transformations including codecs, color-space conversion, video effects,
etc. Renderers can be video cards, files, network i/o, etc.

Source filters have only output pins, renderers have only input pins.

So, when I write "source filter", I mean that you'll implement a filter
with an output pin that will present each image in sequence to the
DirectShow graph that you've set up to write the file. You'll use as the
renderer an appropriate codec writing into the "File Writer" filter. When
I describe the filter as a "pull" filter, that means that the downstream
input pin is responsible for requesting each video frame as needed. A
"push" filter is one where the source controls the flow. "Pull" is
generally more appropriate when you want the renderer to go as fast as it
can (such as when writing a file).

This is all already pretty off-topic. Hopefully the above is enough to
get you pointed in the right direction, and you can get more help in the
more directly related forums as needed. (They may even clear up whatever
mistakes I've made in the above...as I said, it's been awhile and I may be
a bit rusty).

Pete
Oct 21 '08 #4
On Oct 21, 2:16*am, cron...@gmail.c om wrote:
Thanks for your reply. *My own program is generating the animation and
this is probably what I want to do. *If you are familiar with this,
can you elaborate more on what needs to be done or at least give the
DShow interface names so I can start looking them up on MSDN?
I would also look at the DirectShowLib stuff on SourceForge.
http://sourceforge.net/project/showf...roup_id=136334

We've been using that with C# for a couple of years now without
problems. Most of the code is in C# but we have a few custom filters
written in C++. As long as you have some familiarity with C++ and COM
you can easily create a source filter to take a series of bitmaps from
your application and pump them through the filter. I would look into
using the ASFWriter fitler to start with for creating .wmv files since
there are examples for that and it works pretty well. The examples
that come with direct show SDK already have a simple bitmap array
pumper and I believe a sample graph that dumps to .wmv format.
Oct 21 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2920
by: googlemike | last post by:
Is there a video module so that I can write a Linux Python script to record video coming over USB video cams? What about these side-thoughts: * What about recording multiple streams over multiple USB ports? (Think in the context of a security system.) * What about lossy compression?
0
1383
by: Gerry Viator | last post by:
Hi all, Can someone recommend a good 3rd party image\video control or VS.NET control for imaging\video. I will need a recomendation on a good capture card as well for medical images\video? These will be snapshot images or (10 to 30 second video clips) thanks
0
1561
by: dicky2283 | last post by:
windows development community please help me im deepak roy , doing my final year undergrad in computer science.... im doing a project - Motion detection and Tracking in vc++( video for windows). The project combines image acquisition, manipulation techniques with other image processing techniques and neural network approaches. im using video for windows to capture images from a webcam( EZONICS CAM II ). if u have used video for windows,...
3
2261
by: rangermccoy | last post by:
Hello there, What are the best php/c libraries for handling media including images, video, and music? I would like to manipulate media dfiles, including watermarking, thumbnailing, truncating, etc. I know there's the GD llibrary for images.
5
9708
by: Pete Chen | last post by:
Hello all: I'd like to grab images from video (wmv format, a physical file stored in the host or even a streaming video, e.g. mms://abc.com/test.wma). Is there any solution that after I put the timecode into the the module, the PHP can return to the image corresponding to the timecode. How can I do this? Thanks
3
18297
by: rajibnsu | last post by:
While searching for capturing video with a webcam I god the following code.It gives two errors.Says:The type or namespace name 'WebcamEventArgs' does not exit in the namespace 'WebCam_Capture' (are you missing an assembly reference?) using System; using System.Collections; using System.ComponentModel; using System.Drawing; using System.Data; using System.Windows.Forms; using System.Runtime.InteropServices; namespace WebCam_Capture
1
1980
by: alcool | last post by:
I, i would like publishing some images captured with a local video camera (with opencv api). Then I would like view this images with a client in a browser (like a applet or with the simple functionality of firefox) I must open a socket? How i can do? I hope in your suggestion
9
2106
by: GloStix | last post by:
Okay, when I click the link it dissapears and makes a white space underneath it but the space is clickable. so when you click the space, the link actually works Used Firefox 3.0 RC2 for this. OS X 10.5 http://www.screencast.com/t/wgztYUrdN (Video) http://www.jameswmann.com/music.htm (The actual page) HTML
0
9431
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9255
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10014
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9844
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9819
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9689
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7226
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
2
3326
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2647
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.