Results 1 to 10 of 10

Thread: command-line vlc and processes

  1. #1
    Join Date
    Aug 2008
    Location
    UK
    Beans
    30
    Distro
    Ubuntu 10.10 Maverick Meerkat

    command-line vlc and processes

    So I'm trying to get myself into the habit of using the command line, and am taking it to quite silly lengths. I was wondering - it's easy enough to get music playing without the vlc interface (cvlc), but how do you pause it or change the volume etc while it's playing?

    (or is general impracticality precisely why they invented GUIs?)

    Also, most programs are easily run from the command line, but unless I start suspending and restarting them, it doesn't seem possible to use the same shell do run multiple programs. But that doesn't sound right - isn't the whole system pretty much just a shell with pretty things stuck on top? And it's running dozens of processes...

    *confused*

  2. #2
    Join Date
    Apr 2008
    Location
    Denton, Texas
    Beans
    379
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: command-line vlc and processes

    If you want documentation for VLC from a command-line then
    Code:
    man vlc
    But take my advice and just use the GUI
    REGISTERED UBUNTU USER - #25241
    I void warranties.
    Programming is 10% science, 25% ingenuity and 65% getting the ingenuity to work with the science.

  3. #3
    Join Date
    Oct 2008
    Location
    Scotland
    Beans
    67
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: command-line vlc and processes

    When using cvlc you can type "help" (w/o quotes) to get a list of supported commands.

    i know you can pause, and you can probably change volume.

  4. #4
    Join Date
    Jan 2007
    Beans
    160
    Distro
    Hardy Heron (Ubuntu Development)

    Re: command-line vlc and processes

    Yes, using VLC from the command line is ridiculous. Debian Package of the Day lists a new Debian package every day (and it's very often a console-based package), so you might want to check that out. Ubuntu Geek also has some good console-based packages.
    Last edited by AndrewTheArt; March 24th, 2009 at 12:42 AM.
    USE GOOGLE. It's your friend.

  5. #5
    Join Date
    Mar 2008
    Location
    Birmingham, UK
    Beans
    Hidden!

    Re: command-line vlc and processes

    If you're not desparate to use vlc, try moc (music on console). It's a good console based music player.
    Code:
    sudo apt-get install moc
    Check the man page for details.
    Code:
    man moc
    Desktop: Phenom 955 BE | GA-MA790XT-UD4P | 8GB TG Elite 1600 | BFG GTX 275
    Conky Screenshots | Last.fm | New to Ubuntu?

  6. #6
    Join Date
    Jul 2008
    Beans
    201

    Re: command-line vlc and processes

    Quote Originally Posted by redandgreen View Post
    Also, most programs are easily run from the command line, but unless I start suspending and restarting them, it doesn't seem possible to use the same shell do run multiple programs.
    Use & to run a program in the background, for example, try
    Code:
    nautilus &
    - the window will appear, but the terminal will return to the propmt, so you can keep using it

  7. #7
    Join Date
    Feb 2008
    Beans
    1,031

    Re: command-line vlc and processes

    Vlc actually has a rather nice ncurses interface.

    Code:
    vlc --extraintf ncurses
    Thats command line enough surely

    I used to use that so I could use my ds (running ds linux) as a remote control when watching movies.

  8. #8
    Join Date
    Aug 2008
    Location
    UK
    Beans
    30
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: command-line vlc and processes

    Hmmm, maybe I'll stop being such a purist thanks everyone!

  9. #9
    Join Date
    Nov 2010
    Beans
    5

    Re: command-line vlc and processes

    I know this is an old thread but that doesn't mean folks don't access it currently so I want to rant.
    I so don't like the way posters in forums stray from the original question. The OP wants to use cvlc, the command line version of vlc, and why shouldn't he? It's available and meant to be used by anyone. Suggesting he use your favorite music player instead of answering his question, is, at best, sub-optimal. I use a Raspberry Pi, headless, to stream audio from the internet using cvlc so, of course, your private solution won't help me. What will help is a direct answer. Millions of people, just within the last year, have purchased a Pi or two and are experimenting with Linux for the first time in their lives. The Pi runs Ubuntu or a version of it. Many will come to this forum to find answers to questions that are, to them, mysterious and difficult for them to get answers to. They should be encouraged to explorer the command line because of the massive power it gives over a GUI and should be given as much help as possible from the 'nix community. Real help, not alternate solutions for which they are not searching.</rant>

    nohup cvlc --volume 50 http://www.publicbroadcasting.net/mpbc/ppr/mainec24.pls 0<&- &>/dev/null

    will start an audio stream from the command line and give you back the command prompt. It will continue to play even if you log out. If you happen to be in a console, or, as in my case, in an ssh session to a remote headless box, you can run alsamixer to control your sound card volume before you log out or after you log back in.

    The nohup prefix tells cvlc to ignore the hang-up signal it gets when you log out. 0<&- closes the STDIN file descriptor and &>/dev/null redirects STDOUT and STDERR to null. The final ampersand runs the whole process in the background. All four of these terms are required to properly daemonize a command so that you can log out and walk away while the daemon continues to run.

    The volume can be any number you are comfortable with. Experiment.

    I so hope that redandgreen was not discouraged from experimenting.

  10. #10
    Join Date
    Oct 2006
    Location
    Ayrshire
    Beans
    40,016
    Distro
    Ubuntu Development Release

    Re: command-line vlc and processes

    Old thread closed.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •