Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to save raw data to MPEG file?

2 views
Skip to first unread message

Waiman

unread,
Jan 19, 2005, 1:31:08 PM1/19/05
to
Hi, I'm writing a PC application in C++ and I need to be able to save raw
8-bit pixel data in various file formats, i.e. AVI, MPEG. I'm using the VFW
library for the AVI format but I haven't been able to determine what I can
use for MPEG.

I thought the Windows Media Format SDK would do, but the documentation
refers to the Windows Media MPEG-4 Encoder DMO which seems to produce ASF
files with MPEG-4 compression. I would need something that outputs "*.MPG"
files. Could anyone help?

Also, I don't have a requirement for which type of MPEG to use. Any
recommendations/comments on that would be appreciated too.

TIA,
Waiman

Alessandro Angeli [MVP::DigitalMedia]

unread,
Jan 20, 2005, 6:05:13 AM1/20/05
to
Waiman wrote:

VFW is meant to work with AVI files and WMF with ASF files.
Both include a minimun set of codecs (in the case of WMF,
the WM codecs and the more-or-less MPEG4 ones) but none
supports anything like MPEG. The most general framework is
DirectShow, part of DirectX, which supports any number of
formats and codecs as long as you have the necessary filters
installed. DirectShow comes with built-in support for AVI
(just like VFW) and ASF (based on WMF) and you can add
support for MPEG1/2 by installing third-party filters, like
the ones included in commercial MPEG1/2 encoders/recorders
(MoonLight.com, GoCyberLink.com, InterVideo.com,
Ligos.com... maybe the free ffdshow as well, if you use a
recent alpha version).


--

// Alessandro Angeli
// MVP :: Digital Media
// a dot angeli at psynet dot net


Waiman

unread,
Jan 20, 2005, 11:03:07 AM1/20/05
to
"Alessandro Angeli [MVP::DigitalMedia]" wrote:

> VFW is meant to work with AVI files and WMF with ASF files.
> Both include a minimun set of codecs (in the case of WMF,
> the WM codecs and the more-or-less MPEG4 ones) but none
> supports anything like MPEG. The most general framework is
> DirectShow, part of DirectX, which supports any number of
> formats and codecs as long as you have the necessary filters
> installed. DirectShow comes with built-in support for AVI
> (just like VFW) and ASF (based on WMF) and you can add
> support for MPEG1/2 by installing third-party filters, like
> the ones included in commercial MPEG1/2 encoders/recorders
> (MoonLight.com, GoCyberLink.com, InterVideo.com,
> Ligos.com... maybe the free ffdshow as well, if you use a
> recent alpha version).
>

So are you saying that if I purchased a commercial MPEG1/2 encoder package,
to get the filter, then I would be able to use DirectShow to create MPG
files? Do you know if there is such a thing as commercially available
software that I could interface with directly without going through
DirectShow?

I was looking at an example of using DirectShow to create AVI files and it
seemed so complicated compared to my implementation using VFW. Perhaps
because DirectShow is providing way more capability than I need and it's all
new to me.

And lastly if I have to purchase software I may as well get something that
will simplify the development as much as possible.

Thanks again for your time.

Alessandro Angeli [MVP::DigitalMedia]

unread,
Jan 21, 2005, 4:34:06 AM1/21/05
to
Waiman wrote:

> So are you saying that if I purchased a commercial
> MPEG1/2 encoder package, to get the filter, then I would
> be able to use DirectShow to create MPG files? Do you
> know if there is such a thing as commercially available
> software that I could interface with directly without
> going through DirectShow?

Ligos or Moonlight may have an MPEG SDK. For MPEG1 only,
also have a look at bbMPEG, which is open source. For
MPEG1/2, maybe you can find a Windows porting of ffmpeg or
use the VFW wrapper in ffdshow (I don't know if it supports
MPEG encoding). Notice that you need 2 components: an
MPEG1/2 encoder and and MPEG1/2 muxer, juke like with AVIs.
bbMPEG should provide both for MPEG1, ffdshow only the
encoder. There may be other open source projects related to
VCD and SVCD creation.

> I was looking at an example of using DirectShow to create
> AVI files and it seemed so complicated compared to my
> implementation using VFW. Perhaps because DirectShow is
> providing way more capability than I need and it's all
> new to me.

It *is* more complicated

Waiman

unread,
Jan 21, 2005, 11:51:09 AM1/21/05
to

"Alessandro Angeli [MVP::DigitalMedia]" wrote:

> Ligos or Moonlight may have an MPEG SDK. For MPEG1 only,
> also have a look at bbMPEG, which is open source. For
> MPEG1/2, maybe you can find a Windows porting of ffmpeg or
> use the VFW wrapper in ffdshow (I don't know if it supports
> MPEG encoding). Notice that you need 2 components: an
> MPEG1/2 encoder and and MPEG1/2 muxer, juke like with AVIs.
> bbMPEG should provide both for MPEG1, ffdshow only the
> encoder. There may be other open source projects related to
> VCD and SVCD creation.
>

Oh this is great! The bbMPEG DLL even came with an example program that
demonstrates how to use the DLL. I should be all set now. Thank you so
much, you've been a great help!

Untergrundprinz

unread,
Dec 18, 2009, 4:24:01 PM12/18/09
to

--
Mein Open Key: )xAGPBF5B4
0 new messages