Ubuntu – Play all audio files in a directory from the command line ignoring non-audio files

vlc

If I do:

vlc dir

it also plays files like images for 10 seconds. Is there a way to prevent that and play only the music?

I also have music files on arbitrary subfolders: dir/jazz, dir/classic, dir/jazz/miles-davies, etc.

I can do it with find and some bash-fu, but I'd prefer a simple vlc solution, or some other very simple solution that does not involve coding a complex script, in particular deciding what is a music file or not.

I have seen: How to play music files directly from folders? , but it is not VLC specific.

Also opened on the bug tracker: https://trac.videolan.org/vlc/ticket/12819

Best Answer

You can use the following command to play only MP3s

vlc folder/*.mp3 (GUI)

cvlc folder/*.mp3 (CLI)

You can specify additional formats using *.ogg etc.

If there are subfolders -

vlc folder/*/./*.mp3 (GUI)

cvlc folder/*/./*.mp3 (CLI)

Related Question