IPB

Welcome Guest ( Log In | Register )

MPG123 DirectShow Filter
harashin
post Sep 22 2003, 04:53
Post #1





Group: Members
Posts: 339
Joined: 20-February 02
From: Kyoto, Japan
Member No.: 1362



Kane released a directshow filter which is based on Otachan's in_mpg123.
Download MPG123 DirectShow Filter (including the source)
Of course, both of FhG and MAD are also good enough.

EDIT:correct the author's name

This post has been edited by harashin: Nov 10 2003, 00:00


--------------------
Folding@Home Hydrogenaudio.org Team ID# 32639
http://folding.stanford.edu/
Go to the top of the page
+Quote Post
 
Start new topic
Replies
Stuart60611
post Aug 27 2005, 04:08
Post #2





Group: Members
Posts: 384
Joined: 12-June 05
Member No.: 22685



Thanks for the reply and have it working no problem. My final question is what, if any, advantage or disadvantage is there of runing mp3123 and mad as a direct show filers as opposed to simplying using the .dll versions of the decoders for winamp in the winamp plugin directory to play mp3s stored locally on the machine? I really only play mp3s stored locally and rarely play streams. It appears that this is designed mainly for decoding audio streams as opposed to decoding .mp3s stored locally on my machine? What does the parser do and what are the purposes of its corresponding settings (how should parser be configured?)? The distinction between filter one and two seems to be debuging versus plain decoding. Please explain.

This post has been edited by Stuart60611: Aug 27 2005, 04:21
Go to the top of the page
+Quote Post
Pa3PyX
post Aug 27 2005, 08:02
Post #3





Group: Members
Posts: 20
Joined: 8-April 05
Member No.: 21280



QUOTE (Stuart60611 @ Aug 26 2005, 11:08 PM)
Thanks for the reply and have it working no problem.  My final question is what, if any, advantage or disadvantage is there of runing mp3123 and mad as a direct show filers as opposed to simplying using the .dll versions of the decoders for winamp in the winamp plugin directory to play mp3s stored locally on the machine?   I really only play mp3s stored locally and rarely play streams.  It appears that this is designed mainly for decoding audio streams as opposed to decoding .mp3s stored locally on my machine? What does the parser do and what are the purposes of its corresponding settings (how should parser be configured?)?  The distinction between filter one and two seems to be debuging versus plain decoding.  Please explain.


There is probably no advantage in using DirectShow filters to play MP3's in Winamp as opposed to its stock decoder or the .dll plugins (if they are the same version as the ones used to compile the DirectShow filter). You have 2 levels of API versus 1 level of API, so it will probably be slower rather than faster.

Streams -- no; Winamp's stock decoder supports streams (at least Shoutcast), and so should the .dll plugins. On the contrary, Winamp's DirectShow plugin is stupid -- it won't play until it can read the entire stream, and with any broadcast, of course this never happens. It will just sit there and consume bandwidth. If you are to play some other type of stream than Shoutcast (e.g. ASF), you would do that in WMP (which will use whatever filter with best merit is in the system to play MP3 data). I'm not sure what happens if you have MP3 data in a QuickTime stream and you open it with QuickTime player, and I don't think Real streams can contain MP3 at all.

The advantage of using mpg123/MAD DirectShow filter instead of FhG DirectShow filter is performance, as it was already mentioned. This would concern you if you had some K6-2/300 CPU and wanted to play XviD movies on it, like I did. You would notice that it plays more or less OK without audio (with 70-90% CPU usage), but once you throw in FhG, you hit 100% and the video starts lagging -- so a speedier MP3 decoder helps.

And generally, the advantage of having DirectShow plugins is that they can be used in any DirectShow compatible player, not just Winamp.

So far as parser and decoder settings are concerned.
1) DirectShow is a stream oriented API; there are always (at least) three parts to playing a file:
a) Extracting the data from a file and formatting it in DirectShow format stream. This is done by a parser (also called splitter, or demu(ltiple)xer). No decoding is done at this point, merely the data stored in the file is converted into DirectShow stream(s).
b) Decoding the resulting stream(s). This is done by a decoder; a decoder converts MP3, XVID, DIV3, or whatever else gibberish you may have as one of your streams into plain and simple format that your sound/video card can understand.
c) Passing the decoded stream(s) to the Windows hardware API (MCI, or DirectX), which in turn pass it to hardware drivers, which pass it to hardware, for playback.

For instance, to play an AVI file containing XVID video and MP3 audio, DirectShow would construct the following graph:
CODE
File Reader
|
+-> AVI Splitter (a)
   |
   +-> XviD MPEG-4 Video Decoder (b)
   |   |
   |   +-> Video Renderer (c)
   |
   +-> mpg123 and MAD DirectShow Filter (b)
       |
       +-> Default DirectSound Device (c)

And to play a plain MP3 file, you will have this:
CODE
File Reader
|
+-> MP3 Parser Filter (a)
   |
   +-> mpg123 and MAD DirectShow Filter (b)
       |
       +-> Default DirectSound Device (c)

There is a program called GraphEdit that will help you visualize the process. You can construct graphs manually and connect filters in whatever chain you want so long as input/output stream formats are compatible (which more often than not they won't be even if they are. smile.gif Ask Microsoft how that is and why you can't connect AVI Splitter to AVI Mux, even though the operations are inverses of one another.)

So enabling MP3 parser in mpg123dsf config enables the use of the splitter that is supplied with the package, instead of the default MP3 splitter installed in the system. You don't have to enable the mpg123dsf parser to use mpg123 decoder filter, i.e. you can use the system's default parser with mpg123 decoder. (Doing it the other way around may be tricky, however -- FhG won't connect directly to mpg123dsf parser for reasons unknown to me, so you may need some converter in the middle, or disable features like ReplayGain.) The advantage of mpg123dsf parser over the default system parser is that it can show ID3 tags and pass ReplayGain info to compatible decoders, if hat information is present in the file headers/trailers.

So far as Filter 1 and Filter 2 tabs are concerned, these are just two tabs of settings for the same decoder, because they did not all fit in one tab. smile.gif

This post has been edited by Pa3PyX: Aug 27 2005, 09:11
Go to the top of the page
+Quote Post

Posts in this topic
- harashin   MPG123 DirectShow Filter   Sep 22 2003, 04:53
- - askoff   Does it contain any other features than just a dec...   Sep 22 2003, 12:50
- - harashin   With this filter, you can select the output sample...   Sep 22 2003, 15:21
- - askoff   With quick test it works nice. Are there any plans...   Sep 22 2003, 18:09
- - harashin   OK. I'll ask the author about your request.   Sep 22 2003, 18:58
- - askoff   It's verry exciting. Are we getting "foob...   Sep 22 2003, 23:24
- - yong   Hey!, anyone tried this MP2/3 directshow filte...   Jan 7 2005, 12:35
- - Daijoubu   I personaly find it a little bit more CPU friendly...   Feb 15 2005, 01:46
|- - Pa3PyX   QUOTE (Daijoubu @ Feb 14 2005, 08:46 PM)I per...   Jul 31 2005, 05:46
- - kjoonlee   Winamp stopped using Nitrane ages ago. It now uses...   Jul 31 2005, 05:57
|- - Pa3PyX   QUOTE (kjoonlee @ Jul 31 2005, 12:57 AM)Winam...   Jul 31 2005, 06:04
|- - rjamorim   QUOTE (Pa3PyX @ Jul 31 2005, 02:04 AM)I thoug...   Jul 31 2005, 06:34
|- - Pa3PyX   QUOTE (rjamorim @ Jul 31 2005, 01:34 AM)Winam...   Jul 31 2005, 06:59
- - callmeace   In WindowsXP I have Lame in my system codecs, and ...   Aug 5 2005, 08:25
|- - Pa3PyX   QUOTE (callmeace @ Aug 5 2005, 03:25 AM)In Wi...   Aug 6 2005, 04:17
- - jorsol   Maybe this is a dumb question, but which is the be...   Aug 6 2005, 06:52
|- - rjamorim   QUOTE (jorsol @ Aug 6 2005, 02:52 AM)Maybe th...   Aug 6 2005, 15:44
|- - Pusherman   QUOTE (rjamorim @ Aug 6 2005, 04:44 PM)From a...   Aug 7 2005, 12:37
- - Mo0zOoH   The one which is faster or more functional.   Aug 9 2005, 00:30
|- - Stuart60611   [quote=Mo0zOoH,Aug 8 2005, 05:30 PM] The one which...   Aug 9 2005, 00:39
|- - Pa3PyX   QUOTE (Stuart60611 @ Aug 8 2005, 07:39 PM)I u...   Aug 27 2005, 02:23
- - Stuart60611   Thanks for the reply and have it working no proble...   Aug 27 2005, 04:08
|- - Pa3PyX   QUOTE (Stuart60611 @ Aug 26 2005, 11:08 PM)Th...   Aug 27 2005, 08:02
|- - Stuart60611   QUOTE (Pa3PyX @ Aug 27 2005, 01:02 AM)QUOTE (...   Aug 27 2005, 18:22
- - PatchWorKs   ...and what about ffdshow ?   Aug 27 2005, 11:21


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st October 2014 - 15:46