Archived

This topic is now archived and is closed to further replies.

Carrot

MP3 and DirectShow

Recommended Posts

I''ve managed to get DirectShow working using a filter graph to extract MP3 music from a file. The problem is that I''ve been informed that it''s unwise to use DirectShow components for such a task because end-users may not have the necessary components available on their machines! I know that the DirectShow SDK for DX7 came as a separate set of modules, but people installing DX7.1+ should have the DirectShow components surely? Anyone like to throw some light on the subject?

Share this post


Link to post
Share on other sites
The only things the end user requires are the codecs. Some codecs (MP3) are more commonly found on an end users machine than others (WMA).

Q: How does the end user get codecs usable with DShow under Windows ?
A: By installing a new version of Media Player


It''s perfectly valid to ship media player with your app (if it''s going on a CD) or ask the end user to download the codec (there''s a Windows codec site on the MS site, can''t remember the URL though) or ask the end user to download an update to Media Player.

I''d say that almost all machines you come across these days will have the MP3 codec installed from _somewhere_, whether a media player upgrade, WinAmp etc.

BTW: To ship the MP3 codec yourself you''d have to pay the license fee for the privelage. People like MS have already paid that and it''s valid for you to use as long as it''s only with Windows.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
Just remembered something though:

Older versions of runtime DirectShow did indeed come as a separate install "DirectX Media". Though once again most machines have that. *

In DirectX 8 (8.0 seems so long ago!) onwards, DirectShow is now included by default as part of DirectX.

[* memories of the whole name change and the painful old ways of using it back in the ActiveMovie (back when the X in ActiveX was silent) have come flooding back]

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
Is there any reason that I should NOT be using DirectShow as the music player in a game, that anyone knows of?

I thought about using other third party libraries but decided on DirectShow because I was using the other DX modules anyway, and it just fits in nicely.

Share this post


Link to post
Share on other sites
We used it to play the music in "Pac-Man:Adventures In Time", absolutely no problems. And it behaved itself when we used Bink to play movies if that''s what you mean.

Of course that was a DX7 game so the installer checked for the presence of DirectX Media and installed it (and media player) if it wasn''t there.

If you ship with DX8 or require DX8 then there''s no need to install DirectXMedia separately.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
One thing that I think I should point out is that if you decide to decode mp3''s with DShow, you should make sure that the graph contains the right decoder for mp3 (mpeg1(2) layer3). When I used DShow and had directshow handle the graph creation for me it used mpeg2 decoder and it sounded crappy, then I added my own code to replace the mped2 codec with mpeg layer3 codec and it made the sound much better (not as good as winamp tho).

Share this post


Link to post
Share on other sites
sorry: just resurecting this thread...

What are the patenting issues involved with distributing MP3 files with a shareware game?

I was under the impression that because Micrsoft pays the patent license when distributing its media player, that it also covered MP3 files that are bundled with a game (plus the DirectShow decoder)

Anyone have any info on this (I've spend ages searching the web only to find conflicting reports)

Thanks.

[edit] Sorry, by pure coincidence, somone's asked this in other current thread!

[/edit]


[edited by - carrot on February 6, 2003 12:35:03 PM]

Share this post


Link to post
Share on other sites