Skip to content

A cmd-line app which plays any video with characters!

License

Notifications You must be signed in to change notification settings

lvxin1024/CMD-Video-Player

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An app which plays video in your console through C++, OpenCV, SDL2 and FFmpeg

Installation

Homebrew(arm64)

brew tap hnrobert/cmd-video-player && brew install cmd-video-player

Function Description:

image
  ____ __  __ ____   __     ___     _            
 / ___|  \/  |  _ \  \ \   / (_) __| | ___  ___  
| |   | |\/| | | | |  \ \ / /| |/ _` |/ _ \/ _ \ 
| |___| |  | | |_| |   \ V / | | (_| |  __/ (_) |
 \____|_|  |_|____/     \_/  |_|\__,_|\___|\___/ 
                                                 
 ____  _                       
|  _ \| | __ _ _   _  ___ _ __ 
| |_) | |/ _` | | | |/ _ \ '__|
|  __/| | (_| | |_| |  __/ |        - by HNRobert
|_|   |_|\__,_|\__, |\___|_|   
               |___/     

Usage:
  play -v /path/to/video [-ct st/dy] [-c s/l] [-chars "@%#*+=-:. "]

Options:
  -v /path/to/video    Specify the video file to play
  -ct [st|dy]          Choose the contrast mode for ASCII art generation
                        st: Static contrast (default)
                        dy: Dynamic contrast, scales the contrast dynamically 
                            based on the video
  -c [s|l]             Choose the character set for ASCII art
                        s: Short character set "@#*+-:. " (default)
                        l: Long character set "@%#*+=^~-;:,'.` "
  -chars "sequence"    Set a custom character sequence for ASCII art 
                       (perior to -c)
                        Example: "@%#*+=-:. "

Examples:
  play -v video.mp4 -ct dy -c l
      Play 'video.mp4' using dynamic contrast and long character set 
      for ASCII art.
  play -v 'a video.mp4' -chars "@#&*+=-:. "
      Play 'a video.mp4' with a custom character sequence for ASCII art.
      (add quotation marks on both sides if the path contains space)
  set -v 'default.mp4'
      Set a default video path to 'default.mp4'
      for future playback commands.
  set -ct dy
      Set dynamic contrast as the default mode 
      for future playback commands.

Additional commands:
  help               Show this help message
  exit               Exit the program
  set                Set default options (e.g. video path, contrast mode)
  save               Save the default options to a configuration file
Screenshot 2024-09-08 at 17 52 12 Screenshot 2024-09-08 at 17 51 00

It only supports macOS on Apple Silicon currently. If needed, other versions would be rolled out as long as you contact me.

About

A cmd-line app which plays any video with characters!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 98.6%
  • Ruby 1.4%