• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

mpg123 Command Examples in Linux

by Deepika

“mpg123” is a command-line audio player for Linux and Unix-like systems that is designed to play MPEG audio files (MP3, MP2, and MP1). It is a fast and lightweight player that is well-suited for use in shell scripts and other automated processes. “mpg123” supports a variety of audio output methods, including ALSA, OSS, and PulseAudio, and can be used to play audio files on a variety of hardware platforms, including laptops, desktops, and embedded systems.

One of the key features of “mpg123” is its ability to play audio files directly from the command line, without the need for a graphical user interface. This makes it ideal for use in scripts and other automated processes, where it is important to be able to play audio files quickly and easily.

“mpg123” also provides a number of options for controlling the playback of audio files, including volume control, seeking, and the ability to repeat or shuffle tracks. It supports a wide range of audio file formats, and can be used to play audio files in the background, allowing you to continue working in other applications while the audio is playing.

mpg123 Command Examples

1. Play the specified mp3 files:

# mpg123 path/to/file1.mp3 path/to/file2.mp3 ...

2. Play the mp3 from stdin:

# cat file.mp3 | mpg123 -

3. Jump forward to the next song:

f

4. Jump back to the beginning for the song:

b

5. Stop or replay the current file:

s

6. Fast forward:

.

7. Quit:

q

Summary

In general, “mpg123” is a simple and effective tool for playing MPEG audio files on the command line. Its lightweight design, compatibility with a wide range of audio output methods, and ability to play audio files directly from the command line make it an ideal choice for users who need a fast and reliable audio player for use in shell scripts and other automated processes.

Filed Under: Linux

Some more articles you might also be interested in …

  1. addr2line: command not found
  2. How to Create and Mount Btrfs Snapshots
  3. mkfs.fat: command not found
  4. How to Install GUI On CentOS/RHEL 8
  5. nmcli general Command Examples in Linux
  6. How to Reserve a Port Range for a Third Party Application in CentOS/RHEL
  7. dir Command Examples in Linux
  8. nice: command not found
  9. How to Setup a sudo Switch to Another User That Has no Password or ssh Key Set in Linux
  10. poweroff: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright