LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-21-2010, 07:30 AM   #1
jone kim
Member
 
Registered: Apr 2010
Posts: 185

Rep: Reputation: 16
playing audio files via terminal


How can I play audio files via terminal. Afaik I've to install mplayer. Suppose I want to play list of audio files, is there any way to play all the files simultaneously via terminal?
 
Old 05-21-2010, 08:21 AM   #2
zuzoa
Member
 
Registered: Nov 2008
Location: USA
Distribution: Arch 64-bit
Posts: 159

Rep: Reputation: 36
Try "play file1.wav & play file2.wav & play file3.wav" etc
 
Old 05-21-2010, 08:48 AM   #3
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
the command "play" is provided by sox, which means the above command won't work if sox isn't installed. But just about any of the main media players should work about the same. No need for "&" between each name though. Just run
Code:
mplayer file1 file2 file3 etc.
To play all the files in a directory, just use a wildcard.
Code:
mplayer file*.wav
Another option would be to write all the filenames into a text file (one name per line, with full or relative paths) to create a playlist, then just load the list with
Code:
mplayer -playlist file.txt
You might want to look into a more full-featured player though. There are quite a few good cli media players out there.

And remember "man commandname" will bring up basic documentation on most commands.
 
Old 05-21-2010, 08:48 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
You can try mpg123. To read from a playlist (plain text, one file per line):
Code:
mpg123 -@ playlist
 
Old 05-21-2010, 08:57 AM   #5
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,045

Rep: Reputation: 65
Quote:
Originally Posted by jone kim View Post
How can I play audio files via terminal. Afaik I've to install mplayer. Suppose I want to play list of audio files, is there any way to play all the files simultaneously via terminal?
Or
Code:
mpg321 file1.mp3
 
Old 05-21-2010, 08:59 AM   #6
zuzoa
Member
 
Registered: Nov 2008
Location: USA
Distribution: Arch 64-bit
Posts: 159

Rep: Reputation: 36
Quote:
Originally Posted by David the H. View Post
No need for "&" between each name though.
I only added those because they said they wanted to play all the files simultaneously.
 
Old 05-21-2010, 10:09 AM   #7
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Ah, ok. If that's what the OP really wants.

But I get the impression that he's not a native English speaker and, considering the context, it's much more likely he really means "sequentially".
 
Old 05-21-2010, 08:35 PM   #8
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
xmms2 is great if you have a library of music and like the idea of controlling a daemon instead of controlling an application that is only active as long as that terminal is active.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what will i do when playing an audio and video files? travis1205 Linux - Software 4 09-24-2007 08:30 AM
Playing Audio Files in amaroK through smb:/ ceros Linux - Networking 2 04-23-2006 06:05 PM
Playing rm Real Audio files? phlyersphan Linux - Software 7 08-23-2004 02:12 PM
Playing Audio Files in Redhat 7.2 newbie2linux Linux - Newbie 2 12-04-2003 03:52 PM
playing real audio files gadhiraju Linux - General 2 09-04-2001 05:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration