Giter Site home page Giter Site logo

vlc-ctrl's Introduction

vlc-ctrl

Lets you control a running instance of vlc player, start a new instance, get track information, etc.

Supported platforms

  • python 2.7 / 3.4
  • Linux

Features

  • Controls vlc player over dbus.
  • Play, pause, shuffle, toggle, prev, next, stop commands.
  • Play all files in a directory (recursively added).
  • Add files / directories based on inclusion and exclusion patterns.
  • Change volume / fade volume.
  • Print current track info.
  • Quit vlc.
  • Quit based on return code of another command.
  • Can be used as a cron job.

Dependencies

  • vlc player, of course.
  • python-dbus or python3-dbus

    On Ubuntu: >apt-get install python-dbus or >apt-get install python3-dbus

Usage

  • Pause:

    vlc-ctrl pause
  • Play a directory:

    vlc-ctrl play -p /home/user/music
  • Increase volume 10%:

    vlc-ctrl volume +10%
    vlc-ctrl volume +0.1
  • Quit when return code of "command" is 0, retrying the command at most 5 times at 30s intervals and fade out in 10s:

    vlc-ctrl quit -c command -r 5,30 -f 10
  • Get info on currently playing track:

    vlc-ctrl info
  • For more commands, see:

    vlc-ctrl -h

Download

vlc-ctrl's People

Contributors

amol9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vlc-ctrl's Issues

FileNotFoundError: [Errno 2]

I get the following error, what can I do? thanks;
FileNotFoundError: [Errno 2] No such file or directory: '/home/mydesktop/.redcmd/scripts'
on kubuntu16.10, python3.5

[Request] Mac OS X support

Any idea if this could also work on OS X (it doesn't right now)? I am not familiar with dbus or the other requirements used, so my question is more conceptual.

I did try it on Mac OS X, but got the error below:
(I am using VLC 2.2.2 - should that technically be working?)

Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
org.freedesktop.DBus.Error.NoMemory: Not enough memory
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
org.freedesktop.DBus.Error.NoMemory: Not enough memory
Traceback (most recent call last):
  File "~/Library/Python/2.7/bin/vlc-ctrl", line 11, in <module>
    sys.exit(main())
  File "~/Library/Python/2.7/lib/python/site-packages/vlc_ctrl/main.py", line 19, in main
    commandline.execute()
  File "~/Library/Python/2.7/lib/python/site-packages/redcmd/commandline.py", line 50, in execute
    self._command_collection.execute(args, namespace)
  File "~/Library/Python/2.7/lib/python/site-packages/redcmd/command_collection.py", line 465, in execute
    cmd_func.execute(args)
  File "~/Library/Python/2.7/lib/python/site-packages/redcmd/cmdfunc.py", line 21, in execute
    return self.func(*self.get_arg_list(self.func, args))
  File "~/Library/Python/2.7/lib/python/site-packages/vlc_ctrl/client.py", line 35, in play
    self._players.play(path, filter)
  File "~/Library/Python/2.7/lib/python/site-packages/vlc_ctrl/player_list.py", line 38, in wrapped
    self._list[0].get_dbus_interface()
  File "~/Library/Python/2.7/lib/python/site-packages/vlc_ctrl/player.py", line 54, in get_bus_interface
    raise PlayerError('vlc is not running')
vlc_ctrl.player.PlayerError: vlc is not running

Time

Hi, when i use the command vlc-ctrl info, i cant receive the time of the media ( hour:min:sec ) and also that would be great to get the data of its status ( playing or paused ).
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.