Mp3SupportInDirectShow

MP3 Support in DirectShow

A SummerOfCode project for 2006; the initial goal is to support playing MP3s using DirectShow. If time allows, support for more formats will follow.

Current Status

I've implemented a filter using FFMPEG that can theoretically support a bevy of formats. Audio works, but doesn't sound good because underruns occur frequently. Video will work once a issue in the video renderer is fixed. I'm currently working on polishing up what I've got in order to integrate it.

The initial plan was to write a demuxing and decoding core and make a bunch of individual filters corresponding to those in Windows. I opted to take this route instead because it is probably sufficient for the most common case (clients using RenderFile()).

Another difficulty has to do with the file reader failing to open files if it can't identify their media type. While FFMPEG theoretically supports OGG and mp3 files with ID3 tags, for example, the Async reader fails to recognize the media type of these files. Currently, this stops the graph building process.

Buffer underruns while playing audio

Despite a lot of effort put into trying to improve this, underruns still occur frequently if the buffer size in DSoundRender is not increased beyond 8K. Even with a larger buffer of 16K, under runs occur frequently under load. Testing with a standalone DirectSound app suggests this is not caused solely by latency in the DirectShow framework, but my test app might have been flawed.

Videos not rendered correctly

This is caused by DirectShow's video renderer not handling a negative bmHeight field in the VIDEOINFOHEADER structure correctly. Robert might have a fix for this.

ASync Reader does not open unknown media types

I doubt this is correct behavior, but I haven't had time to look at this yet.


Mp3SupportInDirectShow (last edited 2008-05-03 02:15:21 by nathan.n)