Skip to main content

Topic: MPG123 DirectShow Filter (Read 22836 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • harashin
  • [*][*][*][*]
MPG123 DirectShow Filter
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
  • Last Edit: 09 November, 2003, 06:00:04 PM by harashin
Folding@Home Hydrogenaudio.org Team ID# 32639
http://folding.stanford.edu/

  • askoff
  • [*][*][*][*]
MPG123 DirectShow Filter
Reply #1
Does it contain any other features than just a decoder? eg. dithering?

  • harashin
  • [*][*][*][*]
MPG123 DirectShow Filter
Reply #2
With this filter, you can select the output sample format.
IIRC, it's not featured by other filters.
Folding@Home Hydrogenaudio.org Team ID# 32639
http://folding.stanford.edu/

  • askoff
  • [*][*][*][*]
MPG123 DirectShow Filter
Reply #3
With quick test it works nice. Are there any plans to include more features with it? Resampling and dithering could be nice.

  • harashin
  • [*][*][*][*]
MPG123 DirectShow Filter
Reply #4
OK. I'll ask the author about your request.
Folding@Home Hydrogenaudio.org Team ID# 32639
http://folding.stanford.edu/

  • askoff
  • [*][*][*][*]
MPG123 DirectShow Filter
Reply #5
It's verry exciting. Are we getting "foobar2000" directshow filter...
  • Last Edit: 22 September, 2003, 06:27:12 PM by askoff

  • yong
  • [*][*][*]
MPG123 DirectShow Filter
Reply #6
Hey!, anyone tried this MP2/3 directshow filter?
It's great, can decode some of my buggy mp3,
(why buggy? because it crash many mp3 directshow filter...)
featured replaygain, configurable audio buffer , preamp, and ... find out yourself (actually i can't remember)
mpg123 and MAD Directshow filter, latest version is Version 1.040.
  • Last Edit: 07 January, 2005, 06:35:39 AM by yong

  • Daijoubu
  • [*][*]
MPG123 DirectShow Filter
Reply #7
I personaly find it a little bit more CPU friendly than the Fhg DS decoder
1.041 is out

  • Pa3PyX
  • [*]
MPG123 DirectShow Filter
Reply #8
Quote
I personaly find it a little bit more CPU friendly than the Fhg DS decoder
1.041 is out
[a href="index.php?act=findpost&pid=273623"][{POST_SNAPBACK}][/a]


And besides, FhG does not handle lower bitrate joint (MS) stereo frames properly (seems to apply low pass filter where it should not -- or simply does not decode higher sfb's?). This produces horrible artifacts at lower bitrate VBR unless min bitrate is set to at least 128 kbps at encode time, or regular (LR) stereo is used. Whereas both mpg123 and MAD (and Winamp's Nitrane) are free of this problem.
  • Last Edit: 31 July, 2005, 12:52:34 AM by Pa3PyX

  • kjoonlee
  • [*][*][*][*][*]
MPG123 DirectShow Filter
Reply #9
Winamp stopped using Nitrane ages ago. It now uses FhG.

  • Pa3PyX
  • [*]
MPG123 DirectShow Filter
Reply #10
Quote
Winamp stopped using Nitrane ages ago. It now uses FhG.
[a href="index.php?act=findpost&pid=316931"][{POST_SNAPBACK}][/a]


I thought it was the other way around (they switched from FhG to Nitrane in 2.<something>); did they switch back?

  • rjamorim
  • [*][*][*][*][*]
MPG123 DirectShow Filter
Reply #11
Quote
I thought it was the other way around (they switched from FhG to Nitrane in 2.<something>); did they switch back?[a href="index.php?act=findpost&pid=316932"][{POST_SNAPBACK}][/a]


Winamp up to version 2.21: Nitrane
Winamp 2.22: FhG
Winamp from 2.23 to 2.665: Nitrane
Winamp 2.666 onwards: FhG

Nitrane (actually, Playmedia's AMP decoding engine) is hopelessly buggy. FhG is a much superior decoding engine.

Nullsoft went back to Nitrane after 2.22 because people complained it was too slow (Nitrane trades off accuracy for speed).
Get up-to-date binaries of Lame, AAC, Vorbis and much more at RareWares:
http://www.rarewares.org

  • Pa3PyX
  • [*]
MPG123 DirectShow Filter
Reply #12
Quote
Winamp up to version 2.21: Nitrane
Winamp 2.22: FhG
Winamp from 2.23 to 2.665: Nitrane
Winamp 2.666 onwards: FhG

Nitrane (actually, Playmedia's AMP decoding engine) is hopelessly buggy. FhG is a much superior decoding engine.

Nullsoft went back to Nitrane after 2.22 because people complained it was too slow (Nitrane trades off accuracy for speed).
[a href="index.php?act=findpost&pid=316935"][{POST_SNAPBACK}][/a]


Thanks; found that on Bouvigne's web site, too.

Also, upon further research (also on mp3tech.org), only versions prior to 1.9 of FhG suffer high frequency errors described above; version 1.9 (e.g. in K-Lite codec pack 2.47+) does not have this problem. I had an older version installed; I'm not sure which version is supplied with WMP.
  • Last Edit: 31 July, 2005, 02:08:50 AM by Pa3PyX

  • callmeace
  • [*][*]
MPG123 DirectShow Filter
Reply #13
In WindowsXP I have Lame in my system codecs, and I think Windows uses the FraunHofer mp3 for system decoding overriding Lame - at least on the rare occasions when I use WMP. So am I supposed to install this directshow filter alongside whatever else is already there, or should I uninstall anything first?

Thanks for any advice on conflicts or how to use this for playback etc, I get scared of breaking Windows 

  • Pa3PyX
  • [*]
MPG123 DirectShow Filter
Reply #14
Quote
In WindowsXP I have Lame in my system codecs, and I think Windows uses the FraunHofer mp3 for system decoding overriding Lame - at least on the rare occasions when I use WMP. So am I supposed to install this directshow filter alongside whatever else is already there, or should I uninstall anything first?

Thanks for any advice on conflicts or how to use this for playback etc, I get scared of breaking Windows 
[a href="index.php?act=findpost&pid=318003"][{POST_SNAPBACK}][/a]


You might just want to change filter merits, so the filters you want get used by default. In control panel, open Sounds and Audio Devices, pick Hardware, then Audio Codecs, and hit Properties. Choose Properties tab, and you should see the list of installed codecs. Select the codec you want, hit Properties, and use the Change Priority setting.

Edit: I don't think LAME ACM supports decoding of audio (or it was in the alpha stage the last time I checked), only encoding.
  • Last Edit: 05 August, 2005, 11:19:12 PM by Pa3PyX

  • jorsol
  • [*][*]
MPG123 DirectShow Filter
Reply #15
Maybe this is a dumb question, but which is the best decoder to use, mpg123 or MAD?
That is in the mpg123 DSF (DirectShowFilter)

And another thing, if I want to use ffdshow to play MP3, MP2, MP1, which is best MAD or mp3lib?

Is ok to use ffdshow to decode MP3, MP2, MP1? or should I use the FhG that comes by default? (in case I decide to not use "mpg123 DirectShow Filter")
JorSol
aoTuVb5 -q4

  • rjamorim
  • [*][*][*][*][*]
MPG123 DirectShow Filter
Reply #16
Quote
Maybe this is a dumb question, but which is the best decoder to use, mpg123 or MAD? That is in the mpg123 DSF (DirectShowFilter)


From a quality point of view: Either.

Quote
And another thing, if I want to use ffdshow to play MP3, MP2, MP1, which is best MAD or mp3lib?


Reportedly mpglib had/has problems with MP2 and MP1 at certain bitrates. I don't know if that got fixed in the DSF. I think it got fixed in foobar.

Quote
Is ok to use ffdshow to decode MP3, MP2, MP1? or should I use the FhG that comes by default? (in case I decide to not use "mpg123 DirectShow Filter")[a href="index.php?act=findpost&pid=318171"][{POST_SNAPBACK}][/a]


If you only care about quality, either will do. But mpg123 DSF has some interesting features, like ReplayGain and choice of output format, that might be useful for you.
Get up-to-date binaries of Lame, AAC, Vorbis and much more at RareWares:
http://www.rarewares.org

MPG123 DirectShow Filter
Reply #17
Quote
From a quality point of view: Either.


What would be best then?

  • moozooh
  • [*][*][*][*]
MPG123 DirectShow Filter
Reply #18
The one which is faster or more functional.
Infrasonic Quartet + Sennheiser HD650 + Microlab Solo 2 mk3. 

MPG123 DirectShow Filter
Reply #19
Quote from: Mo0zOoH,Aug 8 2005, 05:30 PM

The one which is faster or more functional.
[a href="index.php?act=findpost&pid=318680"][{POST_SNAPBACK}][/a]
[/quote


I use winamp and have both the mp3123 and mad decoder plugin in my input plugin directory.  What I do not understand is what this filter does differently, if anything?  Also, how do I use this filter to decode .mp3s through winamp?  Does a direct show filter require use of direct sound output (I use asio generally).  Any help in explaining what this filter does and how to use with it winamp would be greatly appreciated.  Also, the mad decoder plugin has not been updated for several years, and I was wondering in the filter uses an updated version of mad?

Thanks.

  • Pa3PyX
  • [*]
MPG123 DirectShow Filter
Reply #20
Quote
I use winamp and have both the mp3123 and mad decoder plugin in my input plugin directory.  What I do not understand is what this filter does differently, if anything?  Also, how do I use this filter to decode .mp3s through winamp?  Does a direct show filter require use of direct sound output (I use asio generally).  Any help in explaining what this filter does and how to use with it winamp would be greatly appreciated.  Also, the mad decoder plugin has not been updated for several years, and I was wondering in the filter uses an updated version of mad?

Thanks.
[a href="index.php?act=findpost&pid=318682"][{POST_SNAPBACK}][/a]


In Winamp, you need to associate the DirectShow decoder with the .MP3 extension. Go to Options/Preferences/Plug-ins/Input, select NullSoft DirectShow Decoder, and hit Configure. You should see a list of extensions; add MP3 and restart Winamp, then open any MP3 file and play it. Upon hitting Alt+3, yous should see DirectShow filters dialog rather than the usual ID3 editor; mpg123 directshow filter should be listed. (If you see Fraunhofer instead, you may need to play with filter merits; see above.)

If this is insufficient, configure the default (Nullsoft MPEG audio decoder) plugin by removing MP3 from its list of extensions in the General tab.

I don't think, however, that you will be able to seek the stream as you play it; Winamp (at least Winamp 5.08c) can only seek video files with its DirectShow plugin (i.e. files that actulally contain timestamps, I suspect).

MPG123 DirectShow Filter
Reply #21
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.
  • Last Edit: 26 August, 2005, 11:21:16 PM by Stuart60611

  • Pa3PyX
  • [*]
MPG123 DirectShow Filter
Reply #22
Quote
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: [Select]
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: [Select]
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.  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.
  • Last Edit: 27 August, 2005, 04:11:43 AM by Pa3PyX

  • PatchWorKs
  • [*][*][*][*]
MPG123 DirectShow Filter
Reply #23
...and what about ffdshow ?

MPG123 DirectShow Filter
Reply #24
Quote
Quote
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: [Select]
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: [Select]
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.  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.
[a href="index.php?act=findpost&pid=322968"][{POST_SNAPBACK}][/a]


Thanks.  That fully explained everthing I inquired about.
  • Last Edit: 27 August, 2005, 01:22:47 PM by Stuart60611