[Solved] "mpg321 --loop -1 FILE" - no infinite loop - Why?

Post here if you are a new Porteus member and you're looking for some help.
User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

[Solved] "mpg321 --loop -1 FILE" - no infinite loop - Why?

Post#1 by Rava » 04 Oct 2023, 06:33

System Porteus 5.0
mpg321 1.29.3

It states via mpg321 --longhelp

Code: Select all

--loop <n>    loop track(s) <n> times, < 0 means infinite loop (not with --random!)
As far as my brain understand that, this

Code: Select all

mpg321 --loop -1 FILENAME
should get mpg321 to loop FILENAME infinite since I followed what it said via its --longhelp ( and "-1" is "<0", yes? ) - but it is not. The file is played exactly once and then mpg321 exits.

Why? Is my brain in the wrong or is what mpg321 --longhelp states incorrect?
Last edited by Rava on 10 Oct 2023, 01:26, edited 1 time in total.
Reason: Added [Solved] to subject
Cheers!
Yours Rava

donald
Full of knowledge
Full of knowledge
Posts: 2073
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

"mpg321 --loop -1 FILE" - no infinite loop - Why?

Post#2 by donald » 04 Oct 2023, 09:12

mpg321 1.29.3-- where did you get that from?
I think you mean mpg123 - mpg123-1.29.3-x86_64-1.txz at slackware
and if so mpg123 --loop -1 bb.mp3 plays and plays and plays....
but I have (right now) version mpg123 1.23.4....

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

"mpg321 --loop -1 FILE" - no infinite loop - Why?

Post#3 by Rava » 04 Oct 2023, 10:51

Code: Select all

guest@rava:/$ file /usr/bin/mpg123
/usr/bin/mpg123: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, stripped
guest@rava:/$ file /usr/bin/mpg321
/usr/bin/mpg321: symbolic link to mpg123
Seems it is the same binary, but it behaves erratically when called as "mpg321". Weird. well, whatever, problem solved. I shall call it from henceforth only as mpg123. :magic:
Thanks. :friends:

Added in 5 minutes 7 seconds:
Fun fact:

Code: Select all

mpg123 --loop -1 /mnt/sda4/sound/notification_-15dB.mp3
is like a non-stop popping of chewing-gum bubbles sound. Almost machine-gun-like repetitive sound.

(you need the notification_-15dB.mp3 for that to work)

Added in 1 minute 17 seconds:
donald wrote:
04 Oct 2023, 09:12
but I have (right now) version mpg123 1.23.4....
For some reason, in Porteus 5.0.1 the mpg123 version is still 1.29.3 ???
Cheers!
Yours Rava

donald
Full of knowledge
Full of knowledge
Posts: 2073
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

"mpg321 --loop -1 FILE" - no infinite loop - Why?

Post#4 by donald » 04 Oct 2023, 11:59

Rava wrote:
04 Oct 2023, 10:57
For some reason, in Porteus 5.0.1 the mpg123 version is still 1.29.3 ???
Yep
Slackware64 15.0 = mpg123-1.29.3-x86_64-1.txz
Slackware64 current = mpg123-1.32.3-x86_64-1.txz

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

"mpg321 --loop -1 FILE" - no infinite loop - Why?

Post#5 by Rava » 04 Oct 2023, 12:08

donald wrote:
04 Oct 2023, 11:59
Slackware64 15.0 = mpg123-1.29.3-x86_64-1.txz
Slackware64 current = mpg123-1.32.3-x86_64-1.txz
Is there real improvement between these versions so upgrading makes sense?
Cheers!
Yours Rava

donald
Full of knowledge
Full of knowledge
Posts: 2073
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

"mpg321 --loop -1 FILE" - no infinite loop - Why?

Post#6 by donald » 04 Oct 2023, 12:14

Rava wrote:
04 Oct 2023, 12:08
Is there real improvement between these versions so upgrading makes sense?
https://www.mpg123.de/

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

"mpg321 --loop -1 FILE" - no infinite loop - Why?

Post#7 by Rava » 04 Oct 2023, 12:17

^
2023-10-02 thomas: Releasing mpg123 version 1.32.3:
[…]
This finally is, hopefully, the release to replace 1.31.x. This was a rough ride due to largefile API/ABI stuff being just … horror. I really, really, hope that I won't have to rework that another time.
Sounds like some improvement (and hard work for the maintainer) :coffee:
Thanks donald for the heads up.
Cheers!
Yours Rava

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

[Solved] "mpg321 --loop -1 FILE" - no infinite loop - Why?

Post#8 by Rava » 10 Oct 2023, 01:55

Update
I just now tried pressing the "v" key when playing some file via
mpg123 *
(and not via mpg321 since for reasons unknown that is just a symlink to mpg123 but the application misbehaves when being addressed so, see the issue with non working loop above) without knowing that this exists as "verbose" key, I just presumed will do so.
And look what it does.

Without it all it said was this during playing of a file

Code: Select all

Terminal control enabled, press 'h' for listing of keys and functions.

Playing MPEG stream 1 of 8: 01 Track 01.mp3 ...

MPEG 1.0 L III cbr192 44100 stereo

Title:   Track 01
Comment: 1
and when a file was finished this

Code: Select all

[0:51] Decoding of 01 Track 01.mp3 finished.
But during playing of file 3 of 8 from "./*" I pressed "v" and this was displayed at the bottom where usually an empty line would be:

Code: Select all

_ 0999+0787  00:26.09+00:20.56 --- 100=100 192 kb/s  627 B acc    0 clip p+0.00
(unless you press one of the keys for "pause", then there would be

Code: Select all

 Stopped.  
displayed)

Dunno what the 0999+0787 part is about.
The 00:26.09+00:20.56 is: Current position in played file / remaining time of same file.

And what you cannot see via a simply copying of the text output and putting it into a [ code ] snippet:
the whole line is displayed inverted from the beginning (left) and non-inverted at the end (right) proportional towards the position.
Have a real screenshot as well since I cannot display the inverted / non-inverted state via a simple [ code ] snippet:
Image

I like what mpg123 does when you press "v" - and when you press "v" 3 more times it stops displaying the detailed output at the bottom. Dunno why you have to press "v" 3 more times for it to stop being verbose; its output looks the same, but maybe it would change the verbosity of the above part

Code: Select all

Title:   Track 01
Comment: 1
when displaying a new played file?

Anyhow, Rava is a happy camper once more exploring a CLI (command line interpreter) / terminal program and what they can do without the need of having a bloated GUI version of that program as added frontend. :D
Last edited by Rava on 10 Oct 2023, 02:00, edited 1 time in total.
Reason: streamlining; typo
Cheers!
Yours Rava

Post Reply