Skip to content

cobyj33/tmedia

Repository files navigation

tmedia

C++ 17 Terminal Media Player

Example Output

example created in tmux example colored output example vscode example volcano example keybiard example audio-playback

Table of Contents

Supports

  • Playing Audio and Video Files
  • Displaying Image files
  • Displaying Colored and Grayscale output
  • Audio and Video Controls (Seeking, Changing Volume, Muting, Pausing, Looping)
  • Playing multiple files
  • Reading directories for multiple files to play

Media Controls

  • Video and Audio Controls
    • Space - Play and Pause
    • Up Arrow - Increase Volume 5%
    • Down Arrow - Decrease Volume 5%
    • Left Arrow - Skip Backward 5 Seconds
    • Right Arrow - Skip Forward 5 Seconds
    • Escape or Backspace or 'q' - Quit Program
    • '0' - Restart Playback
    • '1' through '9' - Skip To n/10 of the Media's Duration
    • 'L' - Switch looping type of playback (between no loop, repeat, and repeat one)
    • 'M' - Mute/Unmute Audio
  • Video, Audio, and Image Controls
    • 'C' - Display Color (on supported terminals)
    • 'G' - Display Grayscale (on supported terminals)
    • 'B' - Display no Characters (on supported terminals) (must be in color or grayscale mode)
    • 'N' - Skip to Next Media File
    • 'P' - Rewind to Previous Media File
    • 'R' - Fully Refresh the Screen

All of these controls can also be seen when calling tmedia with no args or with --help

Installing

See BUILD.md for information. Currently, Ubuntu 20.04 is the main tested

Bug and Feature Reporting

If there are any problems with installing or using tmedia, or any requested feature, please leave an issue at the github repo and I'll be sure to help.

Acknowledgments

Bundled 3rd-party libraries

  • miniaudio - Cross-platform audio playback (github)
  • Natural Sort - Natural Sorting and Comparison: For sorting directory files
  • readerwriterqueue - Lock free SPSC Circular Buffer for consistent realtime audio
  • random - "Random for modern C++ with convenient API" (README.md)

Inspiration and Resources