Package: comp
compis ampvfront-end using curses. It has basic
media player functions and can to extract playlists from multiple sources such
as media sites supported byyoutube-dl,
local and direct URL to video/audio and its own JSON playlist format.Installationcomprequires Python 3.5+ withcursesmodule (only available on
Unix-like OSes such as GNU/Linux and the BSDs) andlibmpv(available aslibmpv1in Debian/Ubuntu, openSUSE; and asmpvin Arch Linux, Gentoo,
macOS Homebrew repository). It also depends onpython-mpvandyoutube-dlbut the setup program will automatically install them if they
are missing.Assetuptoolswillinstall in an egg and cause breakage, usingpip(Python 3 version)
is a must.  Afterinstalling it,
runpip3 install comp(you might want to add--userflag to use theUser Scheme).For developers, clone theGithub repothen
simply run thecompexecutable to test the program. If you insist on
installing it, still usepip3:pip3 install .. Note thatcompis
distibuted in awheelcreated via./setup.py bdist_wheel.Command line optionsusage: comp [-h] [-v] [-e {json,mpv,youtube-dl}] [-c CONFIG] [--vid VID]
            [--vo DRIVER] [-f YTDL_FORMAT]
            playlist

Curses Omni Media Player

positional arguments:
  playlist              path or URL to the playlist

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -e {json,mpv,youtube-dl}, --extractor {json,mpv,youtube-dl}
                        playlist extractor, default is youtube-dl
  -c CONFIG, --config CONFIG
                        path to the configuration file
  --vid VID             initial video channel. auto selects the default, no
                        disables video
  --vo DRIVER           specify the video output backend to be used. See
                        VIDEO OUTPUT DRIVERS in mpv(1) for details and
                        descriptions of available drivers
  -f YTDL_FORMAT, --format YTDL_FORMAT
                        video format/quality to be passed to youtube-dlExamplesOpen a JSON playlist:comp -e json test/playlist.jsonOpen a Youtube playlist with video height lower than 720:comp -f '[height<720]' https://www.youtube.com/watch?list=PLnk14Iku8QM7R3ARnrj1TwYSZleF-i7jTKeyboard controlBindings inherited from mpvFor convenience purpose, I try to mimicmpvdefault keybindings, but many
are slightly different frommpvexact behaviour (mainly because of the lack
of keys which are unsupported bycurses). So I will list all of them here
for you tocompare:Left and RightSeek backward/forward 5 seconds. Shifted arrow does a 1 second seek.Up and DownSeek backward/forward 1 minute.[and]Decrease/increase current playback speed by 10%.{and}Halve/double current playback speed.BackspaceReset playback speed to normal.<and>Go backward/forward in the playlist.ReturnStart playing.Space /pPause (pressing again unpauses)..Step forward. Pressing once will pause, every consecutive press will play
one frame and then go into pause mode again.,Step backward. Pressing once will pause, every consecutive press will play
one frame in reverse and then go into pause mode again.qStop playing and quit.//9and*/0Decrease/increase volume.mMute sound._Cycle through the available video tracks.#Cycle through the available audio tracks.fToggle fullscreen.TToggle stay-on-top.wandeDecrease/increase pan-and-scan range.o/PShow progression bar, elapsed time and total duration on the OSD.OToggle OSD states between normal and playback time/duration.vToggle subtitle visibility.jandJCycle through the available subtitles.xandzAdjust subtitle delay by +/- 0.1 seconds.lSet/clear A-B loop points.LToggle infinite looping.Ctrl-+and Ctrl--Adjust audio delay (A/V sync) by +/- 0.1 seconds.uSwitch between applying no style overrides to SSA/ASS subtitles, and
overriding them almost completely with the normal subtitle style.VToggle subtitle VSFilter aspect compatibility mode.randtMove subtitles up/down.sTake a screenshot.STake a screenshot, without subtitles.Alt-sTake a screenshot each frame.Page Up and Page DownSeek to the beginning of the previous/next chapter.dActivate/deactivate deinterlacer.ACycle aspect ratio override.1and2Adjust contrast.3and4Adjust brightness.5and6Adjust gamma.7and8Adjust saturation.Alt-0Resize video window to half its original size.Alt-1Resize video window to its original size.Alt-2Resize video window to double its original size.ECycle through editions.Movements and selectionsThe following keybindings are Emacs-like since most characters are taken bympv.Ctrl-pand Ctrl-nMove a single line up/down.Alt-vand Ctrl-vMove a single page up/down.Home / Ctrl-<and End / Ctrl->Move to the beginning/end of the playlist.Ctrl-SpaceDeselect/reselect the current entry and move down a line.Playlist manipulationCtrl-oOpen playlist.Ctrl-iInsert playlist.Ctrl-fand Alt-fSearch forward/backward for a pattern.Alt-mCycle through playing modes.DeleteDelete the current entry.WSave the current playlist under JSON format.F5Redraw the screen content.:Execute ampvcommand.Configuration filesIf not specified by the--config, (user-specific) configuration file is~/.config/comp/settings.ini. Default configurations
are listed below:[comp]
# Initial playing mode, which can be one of these 8 modes: play-current,
# play-all, play-selected, repeat-current, repeat-all, repeat-selected,
# shuffle-all and shuffle-selected.
play-mode = play-current

[mpv]
# Options to be parsed to mpv. See OPTIONS section on mpv(1) man pages for
# its complete list of available options.
# For example:
#vo = xv
#ontop = yes
#border = no
#force-window = yes
#autofit = 500x280
#geometry = -15-50

[youtube-dl]
# Video format/quality to be passed to youtube-dl. See FORMAT SELECTION in
# youtube-dl(1) man page for more details and descriptions.
format = bestvideo+bestaudioBugsMedia durations are not extracted from online playlists asyoutube-dl.YoutubeDLoptionextract_flatis set to'in_playlist'.
This is rather a feature to save up bandwidth than a bug because a track’s
duration is updated when it’s played.