Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I played a song via terminal. I tried the following and it gave me this result:-

siddhartharao17@siddhartharao-PC:/media/LENOVO/Music/Hindi Asorted/Ek villain$ vlc --audio Galliyan.mp3 
VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b)
[0x814b908] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "equinox",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(vlc:4731): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

now, the query I have is, if I want to change the song from the same terminal(without opening a new one), how to do it? I have been searching,googling, also tried reading the "vlc --help", but it din't help me. I believe I'll get my answer here. Than you in advance :)

share|improve this question

2 Answers 2

up vote 0 down vote accepted

It is not clear what you want exactly, to play music from the command line, without an interface?

In that event, use cvlc as indicated in the output

Use 'cvlc' to use vlc without interface.

So

cvlc --your-options --audio Galliyan.mp3

You should be able to repeat the command after the mp3 is done playing.

Or are you wanting to play 2 tracks at the same time ? with vlc ? Some players do not allow you to open multiple instances at the same time (I am not sure about vlc). If you can not do this with vlc, either use a different player which allows multiple instances, either graphical or command line, or use 2 different players. I know you can play music at the same time from firefox, audacity, and audacious, but I am not sure this is what you want either.

An alternate command line mp3 player ? there are several, aplay is a simple one. There are many very nice alternates, see http://www.linuxjournal.com/content/rock-out-your-console-out

Or are you wanting to continue to use the terminal? In this event use an "&"

cvlc --your-options --audio Galliyan.mp3 &

You can redirect error messages and close the terminal

nohup cvlc --your-options --audio Galliyan.mp3 &> /dev/null &
share|improve this answer
    
Thank you for such a descriptive explaination, Sir :) It worked!! But could you please tell what is the significance of '&' in the end?? –  Siddhartha Jun 8 at 12:30
    
The & at the end puts the command in the background and you can continue to use the terminal to run additional commands. –  bodhi.zazen Jun 8 at 14:37

You should set your VLC preferences to allow multiple instances to run. To open VLC preferences, open VLC and go to Tools -> Preferences and confirm that there is no check mark over "Use only one instance when started from file manager" and over ""Allow only one instance".

Screenshot vlc preferences

Now, start your file from the terminal as follows:

vlc --audio filename &

Note the & at the end of the command. Now you don't have to terminate your currently running file to start a new one.

share|improve this answer
    
It worked, Sir!! Thank you so much :) –  Siddhartha Jun 8 at 12:29
    
@Siddhartha: Please mark the answer as accepted(click on the tick mark besides the answer) since it has helped you. –  i08in Jun 8 at 17:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.