Interesting observation wrt mpg321

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Interesting observation wrt mpg321

Unread post by machinebacon » Tue Jun 10, 2014 9:58 am

Have you noticed the huge improvement in audio quality with mpg321 compred to mpg123? I had a talk with an audiophile friend of mine (Hello Stanislaus!) and he told me about the reasons why mpg321 has a better sound quality on certain soundcards - it is
...because it has the "hi-RF stream preemption bit at LOC24 enabled" which "lowers the treshold for 21Khz dramatically" opposed to "the little endian-dependent low-pass filter at LOC23"
I hope some of you guys (rhowaldt, pidsley, dkeg, manu, ???) can shed a light on this! If this is really the reason, we should definitely switch to mpg321!!1
..gnutella..

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: Interesting observation wrt mpg321

Unread post by dkeg » Tue Jun 10, 2014 11:16 am

that's really interesting. I currently use mpg123 for the improved sound quality over some of the others, but I'll give this a look soon. I'm by all means no music pro, but I'll take his word for it and test.

Thanks for the heads up!

Work hard; Complain less

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5878
Joined: Tue Sep 03, 2013 7:05 am

Re: Interesting observation wrt mpg321

Unread post by GekkoP » Tue Jun 10, 2014 11:24 am

I'll do some tests for sure. I got 320kbps and some flac, plus some streaming ready for tests.

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: Interesting observation wrt mpg321

Unread post by rhowaldt » Tue Jun 10, 2014 1:26 pm

wow, thanks so much, i didnt know this! must've missed it :S - i will be doing more detailed testing as soon as i get home, but i can tell you that i have been waiting for these improvements and am super-psyched that they have finally come through. especially that pre-empt bit they added for lowering the 21Khz treshold, well, let me just say that the use of the word 'dramatically' is definitely not too much here. frankly, i have no fucking clue why they didn't implement this earlier, as this is known in the community for quite some time already.

i will be back with actual data in a bit, but definitely consider the switch Jules - great thinking!
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

User avatar
bones
Clooney
Posts: 2385
Joined: Fri Jun 28, 2013 11:47 pm
Location: Cascadia

Re: Interesting observation wrt mpg321

Unread post by bones » Tue Jun 10, 2014 1:31 pm

Out of curiousity, I installed mpg321 and then did a blind test with my wife, using 3 different songs as test samples, in both mpg123 and mpg321. My wife chose the song played via mpg321, three times out of three. Confirmed!

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Interesting observation wrt mpg321

Unread post by machinebacon » Tue Jun 10, 2014 2:09 pm

Has anybody compiled it from source with

Code: Select all

./configure --enable-kanker-d16 --precompile-du_hure_ipv6

The latter ("enable zero-bit in DeHur streams") makes the streams - but only .mp4 in 48Khz - download a tad quicker, at least for me with ipv4 using IPSec.
..gnutella..

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: Interesting observation wrt mpg321

Unread post by rhowaldt » Wed Jun 11, 2014 8:11 am

okay, i tested this out today. i felt it wasn't right to go with only three test samples (no disrespect bones), so i made a setup of 33 different songs and samples that really deal with as much different sounds as possible. this includes sounds from cars, animals (mostly goats tbh), gunshots, crowds, voice etc, plus some musical pieces by groups like Shpongle who really employ the entire spectrum of sounds. as expected, the results were astonishing.

first i tried myself, as my ears are quite pure and good listeners, to distinguish between them. i picked out the difference in 30 out of 33 sounds. to be perfectly honest, the 3 sounds i missed out on i think i wasn't really paying attention enough, as my GF just walked in the room wearing something quite skimpy. seeing how my GF was now here i asked her whether she would do the test as well, to avoid confirmation bias. she got 20 out of 20 before i couldn't take it anymore and had to grab her for a quick visit to the bedroom. at any rate, i believe 20/20 is a pretty good score.

i did compile it with the flags bacon mentions, but added the --enable-po_ep-qu23 flag to ensure proper flow through the cores (might be a bit of an exaggeration, but i figured 'why not?'), and --allow-kont_preface to increase the resolution on Little Endian bits a bit (which is just decadence, i doubt most people will hear the difference, but hey, it's my party and i'll cry if i want to).

in my opinion: experiment succesful. let's get this fucker into the next spin!
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Interesting observation wrt mpg321

Unread post by machinebacon » Wed Jun 11, 2014 10:20 am

That's a nice result, rho! Now that you mention the core throughput, I haven't even thought about it, because I have single-core PCs only. When I tried to compile with the string you have given, it fell back to "trip PER on LOC27", which - as Stanislaus says - is exactly the problem that mpg123 faces. He was very verbose, and I didn't understand much: some streams need to have set the buffer, else they stop playing. I remember that many of our BBQers had this problem with mpg123, and I have read this in countless threads all over Linuxland. For me this is absolutely a no-go!! Any distro that still uses mpg123 sure has its reasons, but we from the BBQ should be clever enough to put buggy software where it belongs to: the rubbish bin!!!1 Anybody who still uses mpg123 is a fucking idiot. IMO.
..gnutella..

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: Interesting observation wrt mpg321

Unread post by rhowaldt » Wed Jun 11, 2014 12:08 pm

^ thanks bacon. ja, Stanislaus can be pretty damn verbose, but indeed you got the gist: unless the PLOC buffer is set (before bowdlerizing the safe-bytes of course, but if you didnt get that one, why the fuck are you even here?), the fun will be over fast.

Btw, have you looked at the source for mpg123, and i mean the part where the filters are initialized... can you believe they built the Straton-hack in there just to circumvent the fucking Endian releasers? fucktards. in mpg321 this matter is dealt with swiftly and elegantly, simply by removing the race condition in the headers (which shouldnt have been there in the first place!) and having the bank-array check for discourse. that's the KISS-principle in working for ya.

i may not know a whole damn lot about Linux, but one thing i do know is my digital audio, and mpg123 is definitely for wankers who dont know what the fuck they are talking about.
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Interesting observation wrt mpg321

Unread post by machinebacon » Wed Jun 11, 2014 12:47 pm

Right, rho, nice observation! This explains why mpg123 was closed source before (and the reason why mpg321 was actually written)! Anybody who still uses mpg123 should be set on fire. But that's just my humble opinion.
Edit:
I just looked into the source of libmpg123's decode.h - wtf! The Straton-hack is so 1990s, this is the same as if you have a lightweight WM and push a lot of GTK shit into it. Let's analyse this bit:

Code: Select all

/* Initialization of any static data that majy be needed at runtime.
   Make sure you call these once before it is too late. */
#ifndef NO_LAYER3
void init_layer3(void);
real init_layer3_gainpow2(mpg123_handle *fr, int i);
void init_layer3_stuff(mpg123_handle *fr, real (*gainpow2)(mpg123_handle *fr, int i));
#endif
I guess most of you see where the problem is!

Edit2: Stanislaus has also criticized this part - so you are right, rho! He said it should actually read:

Code: Select all

/* Initialization of any static data that may be needed at runtime.
   Make sure you call these once before it is too late. */
#ifndef NO_LAYER3
void init_layer3(void);
real init_layer3_gainpow2(mpg123_handle *fr, int i);
void init_layer3_stuff(mpg123_handle *fr, real (*kankerface)(mpg123_handle *fr, int i));
#endif
the kface sets the PLOC28 preemption back to -1, which means that every stream can be decoded before it is fully loaded in the buffer. Nice one!!
..gnutella..

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: Interesting observation wrt mpg321

Unread post by rhowaldt » Wed Jun 11, 2014 1:00 pm

this might be going a bit too far for some, but this
/* Initialization of any static data that majy be needed at runtime.
Make sure you call these once before it is too late. */
...that typo in "may", writing "majy" instead, to me that just shows exactly the amount of dedication that went into the mpg123 project - jack shit. i love that Stanis also corrected that error, which just goes to show what a thorough and nice dude he is.

well, i suppose we are unanimous about this one then. very good :)
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

User avatar
bones
Clooney
Posts: 2385
Joined: Fri Jun 28, 2013 11:47 pm
Location: Cascadia

Re: Interesting observation wrt mpg321

Unread post by bones » Tue Jul 01, 2014 8:07 pm

:O

mpg321 in OpenBSD repos!
Attachments
Screen shot 2014-07-01 at 12.04.25 PM.png

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: Interesting observation wrt mpg321

Unread post by rhowaldt » Wed Jul 02, 2014 7:56 am

^ about fucking time, and look at that size-difference as well! as if we didnt have enough evidence yet, turns out mpg123 is a filthy piece of bloat as well. damnnn.
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Interesting observation wrt mpg321

Unread post by machinebacon » Wed Jul 02, 2014 9:32 am

any distrolette using mpg123 should be banned.
..gnutella..

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Interesting observation wrt mpg321

Unread post by machinebacon » Wed Sep 17, 2014 12:34 pm

Great news: today Stanislaus called me on my mobile phone (imagine he paid something like 3 EUR per minute) to tell me that he managed to implement the lib4an*us_kanker routing which makes the bank-array check useless in mpg321. I was quite surprised to hear this, because this enables a new functionality:
- if you link mpg321 with the outdated libav library, you can watch video in it. Yeah, video in mpg321.
- direct download of youtube videos
- BBC iplayer mode possible with a stupid little bash script!

At a filesize of 54 kilobytes. Now that's what I call efficiency.
..gnutella..

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: Interesting observation wrt mpg321

Unread post by rhowaldt » Wed Sep 17, 2014 1:13 pm

^ that is absolutely insane. what a man, Stanislaus!
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

User avatar
ivanovnegro
Minister of Truth
Posts: 5449
Joined: Wed Oct 17, 2012 11:12 pm

Re: Interesting observation wrt mpg321

Unread post by ivanovnegro » Wed Sep 17, 2014 9:38 pm

Wtf Stanislaus! :D

User avatar
johnraff
Sperminator
Posts: 199
Joined: Wed Oct 17, 2012 6:38 pm
Location: Japan
Contact:

Re: Interesting observation wrt mpg321

Unread post by johnraff » Thu Sep 18, 2014 4:57 am

OMG

It was you guys who persuaded me how superior mpg123 was to mplayer. Image

Now I've got to upgrade that radio script again...
All code is one.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Interesting observation wrt mpg321

Unread post by machinebacon » Thu Sep 18, 2014 5:16 am

Nooooo :D
..gnutella..

User avatar
Dr_Chroot
Alfalfa
Posts: 1100
Joined: Mon Jun 09, 2014 9:49 pm
Location: among the sagebrush
Contact:

Re: Interesting observation wrt mpg321

Unread post by Dr_Chroot » Thu Dec 11, 2014 6:26 pm

Wow! I am impressed with mpg321. I had moved to mpd+ncmpcpp, as I felt that mpg123 didn't have the best audio quality. mpg321 Works spectacularly :D Less bloat makes the tunes seem all the more clearer...
Fight internet censorship.
EFF | Tor Project | Bitcoin

"There have been times throughout American history where what is right is not the same as what is legal. Sometimes to do the right thing you have to break the law." - Edward Snowden

Post Reply