MPEG to AVI library - media

I am searching for a library that can convert MPEG to AVI.
Is there a good one for this purpose?
Thanks in advance.
(My program is written in VC++, Thanks)
(I am using DirectShow.But I don't know how to use it to convert MPEG to AVI ? I know how to build graph and render video that already has an appropriate codec)

You didn't specify the prog language you're working with so I will just mention ffmpeg.
http://ffmpeg.org/

libavcodec is very popular.

Your best best is to use a audio/video framework.
I would recommend the following:
Windows
DirectShow SDK
Media Foundation SDK
Quicktime SDK
Mac
QTKit Framework
Linux
GStreamer
If you need a cross platform solution I would recommend the commercial MainConcept CodecSDK, which has some of the best video codec implementations around.

Related

How to play H.264 video in a win32 window?

I came across a H.264 video which i would like to play in my c++ application. Could anyone suggest what could be the easiest way of doing it? Or What library can be used for the purpose.
Thanks in advance..
Windows API are DirectShow and Media Foundation (mind availability across Windows verions). You need a codec installed in Windows to be able to play the file, stock codec is only provided with Windows 7 editions. A choice of third party codecs is available.
Another option is to use a different framework such as ffmpeg which includes support for container formats and decoders.

Is it possible to use the h264 and aac encoders that ship with windows 7 from directshow?

I see that windows 7 ships with an aac encoder and an h264 encoder. I'm writing a directshow application that needs to do video encoding. I think: "Great! Now I don't have to license a video encoder!", but then I read on to discover that these encoders use the new MFT api which seems to be incompatible with directshow, and there doesn't seem to be a wrapper filter like there is with DMO. Is there a way for me to use these filters in directshow? Maybe there's a wrapper I didn't find? Maybe I can access these filters as DMO's?
As far as I know the H264 and AAC encoders are only available using the Media Foundation APIs. See the Supported Media Formats in Media Foundation on MSDN. So if you want to make use of these you'll need to use WMF instead of or in addition to DirectShow. As far as I know there is now wrapper or adapter to get a MF graph into DirectShow.
The good news is that MF is much improved compared to DirectShow and offers very nice higher level APIs for video like the SinkWriter which make it much easier to write video to a file.

Vorbis decoder for Windows Phone 7

Anyone know of a vorbis decoder library that can be used on Windows Phone 7?
The lack of native code interop make re-using any of the native code implementations difficult (impossible?) but if there are tricks to do that, I'm open to that as well.
There is a managed implementation for mono called csvorbis, it includes a sample which outputs a wav file this didn't need many changes to work with XNA's SoundEffect class. I did a whole track at once, this took a few seconds in the emulator so you may need to stream it using DynamicSoundEffect for better results. The mooncodecs folder has a codec for the desktop version based on csvorbis which may be worth a look aswell.
Ogg Vorbis is not a supported codec on Windows Phone 7 and the platform supports no way of adding support for custom codecs.
The options available are to write your own decoder/converter in managed code or to convert the original source files.
I suspect the second option will be easier.

DivX Decoder libraries?

I saw, in an application from a major software vendor a dll called "DivXDecoder.dll" - which intrigued me as (a) it implies the existence of an easy to use divx library, and (b) I'd rather like to play divx compressed movies in a product I work on.
The DivX project itself seems to concentrate on making Codecs and tools for end users. Are there any C/C++ friendly projects that make playback of divx content in Win32 or Cocoa apps possible?
Look at mplayer sources - it uses the ffmpeg library that handles decoding from a number of formats.
DivX is a compressor that conforms to MPEG-4 Part 2. XviD and some versions of Windows Media are also implementations of the standard. So anything that can decompress MPEG-4 Part 2 should be able to handle things compressed with DivX.
As for actual decompression libraries, I'd recommend libavcodec. It's widely-used (= good support), cross-platform, and open-source (LGPL, so can be used in commercial apps). It's also fairly easy to use from it's C binding. It can open and play many different codecs (and with libavformat, handle many different wrappers i.e. avi, mkv, etc.).
If it's Windows-only, using the OS-provided Video For Windows might be a better option if you just want to play MPEG since you wouldn't need to ship it with your app and you avoid potential license issues. Be warned, though, that this requires the user to have certain codecs installed. On Win7 (and Vista I think) the MPEG codecs required to play DivX/XviD are installed by default, however they're not on XP...
Don't waste your time trying to implement DivX playback in a Cocoa application. Use QTKit. If someone wants to playback DivX content in your app they will install a DivX QuickTime plug-in.

Which video and audio format/codec should I use?

Environment: Windows XP/Vista, VS2008, C#/.NET 2.0, VideoGrabber.
Hi All,
I'm writing an app which captures cameras input and encodes them into a movie file (including sound).
My client suggests I encode the movie using the DivX codec. But it's not installed by default and it's not redistributable: Users would have to download, install and configure it themselves.
Is there a Codec available in default Windows (XP+) installations that I could use to encode video and sound? It must support compression. Ideally, I should be able to programmatically set basic configuration.
Note: I read this question but it doesn't actually address my needs.
TIA,
Is there a Codec available in default Windows (XP+) installations that I could use to encode video and sound?
About the best you can hope for is WMV2 (WMV v8). You may be able to encode it using qasf.dll.
The codecs you get for AVI in XP are all woeful efforts from the early days of ‘Multimedia PCs’: things like Cinepak and RLE, which are of zero use for modern full colour/resolution video, and Intel 4:2:0, which is only chroma subsampling, not really actual video compression.
If you need better than that you'll have to start embedding your own codecs, eg. from ffmpeg.
But it's not installed by default and it's not redistributable: Users would have to download, install and configure it themselves.
That's best anyway. Silently installing codecs onto a system is rather antisocial as there are often clashes between them and you could end up messing up other DirectShow applications. For example there are (at least) three different common DirectShow codecs that can handle “DivX” (which is really nothing more than MPEG-4 Advanced Simple Profile video plus MP3 audio in an AVI container): DivX, Xvid and ffdshow. Having more than one installed can be a recipe for bugs.
Not sure how useful this is to you, but I was trying to answer that very question just recently. This article suggests DIB, I420, or IYUV are supported on all platforms... at least in OpenCV. I had the least trouble with I420.

Resources