How to Programmatically Convert .JPEG Images to Video (.WMV) File?

T

TCook

Hello All,

First, I apologize for posting this to so many newsgroups. I just wasn't
sure which group would be the best place.

I know that Windows Movie Maker can be used to select a group of images and
convert it to a Windows Video (.WMV) file.

I was wondering if someone knows how or has a code snippet for performing
this task programmatically?

I wish to programmatically loop through a directory and convert all .jpeg
images into a singular Windows Video (.WMV) file. Although C# would be my
language of choice, any example would be very welcome.

Thanks & Regards,

TC
 
A

Alessandro Angeli [MVP::DigitalMedia]

TCook said:
I wish to programmatically loop through a directory and
convert all .jpeg images into a singular Windows Video
(.WMV) file. Although C# would be my language of choice,
any example would be very welcome.

To create a WMV you need to use the WindowsMediaFormat SDK.
Using the WMF SDK, you can push an uncompressed image at a
time through the writer object to produce the WMV. Reading
the images and uncompressing them from JPEG it's up to you.
Otherwise you could use DirectShow, which wraps the WMF
writer object. The DirctShow\PushSource sample the latest
Platform SDK will show you how to read a sequence of BMPs.
Modifying it to read and decompress JPEGs is still up to
you.

Doing this in C# is hard if not close to impossible.

All of this (reading JPEGs, creating WMVs, using PushSource,
using C#) has been covered many times in
microsoft.public.win32.programmer.directx.video (for
DirectShow) and microsoft.public.windowsmedia.sdk (for the
WMF SDK).
 
T

TCook

Thanks Alessandro.


Alessandro Angeli said:
To create a WMV you need to use the WindowsMediaFormat SDK. Using the WMF
SDK, you can push an uncompressed image at a time through the writer
object to produce the WMV. Reading the images and uncompressing them from
JPEG it's up to you. Otherwise you could use DirectShow, which wraps the
WMF writer object. The DirctShow\PushSource sample the latest Platform SDK
will show you how to read a sequence of BMPs. Modifying it to read and
decompress JPEGs is still up to you.

Doing this in C# is hard if not close to impossible.

All of this (reading JPEGs, creating WMVs, using PushSource, using C#) has
been covered many times in microsoft.public.win32.programmer.directx.video
(for DirectShow) and microsoft.public.windowsmedia.sdk (for the WMF SDK).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top