4

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

10
  • Where is your dir directory located? full path? Nov 19, 2014 at 17:26
  • @KasiyA why does that matter? It's on the current directory. Nov 19, 2014 at 17:26
  • You want to play all music files in your dir directory and also all musics in its sub-directory?right? Nov 19, 2014 at 17:28
  • please go to your dir directory. then run for file in . ;do vlc "$file" ;done & Nov 19, 2014 at 17:33
  • I have done that. That for look has no effect, it is the same as vlc ., which is the same that I've done. Nov 19, 2014 at 17:35

2 Answers 2

5

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)

2
  • But does it work if there are multiple levels? And I'd like to avoid typing several possible extensions. Nov 19, 2014 at 15:11
  • I have edited the answer accordingly. Nov 19, 2014 at 15:28
3

Bit of an old question, but if you're still wondering then I'd do:

find . -name *.mp3 -exec cvlc '{}' +

Which would find all mp3 files and then plays them in cvlc. The plus on the end, as apposed to semicolon means that you will use a single instance of vlc, rather than having it restart after every single song which might lead to longer breaks between songs.

1
  • Multiple extensions: find . -type f \( -name ".mp3" -or -name ".ogg" \) -exec cvlc '{}' +
    – Yamaneko
    Aug 15, 2019 at 0:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .