Play MP3Ogg files at the commandline

So you've tweaked Ubuntu into a state of disrepair. Any hope of a GUI is a pipe-dream, at least for the moment. While you hack away fixing things, wouldn't it be nice to have some music to console you at the console?

Just switch to an unused virtual console, login, and type sudo apt-get install vlc. VLC s a GUI media playback application mentioned in Tip 231, on page 272, but it can also run with a text-mode interface—just start it with the -I ncurses command option (note that's a capital I, not L). For example, to play back filename.mp3, I would type vlc -I ncurses file-name.mp3. Multiple files can be specified one after the other, thus cre

38. I should point out for the pedants amongst the readership that in Tip 291, I misstate the "zoom-in" keyboard shortcut. The required keyboard combination is actually [Ctrl ++. Of course, the [= key doubles-up as both = and +, depending on whether the [Shi ft key is pressed. Nautilus is just considerate enough to realize that you mean [Ctrl ]++ when you actually hit [Ctrl ]+=.

ating a playlist, or a wildcard can be used to playback all files in a particular folder (ie vlc -I ncurses ~/Music/*.mp3). Use (a) and Q to alter the volume.

Once the music starts playing, switch back to the original console to continue enacting repairs (and maybe see Tip 30, on page 87, which explains how to install a text-mode web browser; very useful for looking-up solutions!). See Tip 76, on page 133 to see how to alter the master volume of the audio system at the command-line—this might be necessary if playback is too quiet.

Was this article helpful?

0 0

Post a comment