Git Product home page Git Product logo

tmedia's Introduction

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

tmedia's People

Contributors

cobyj33 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

tmedia's Issues

Add Terminal Warnings

Different terminals have different outputs, so if a terminal cannot support true color, or if a terminal's font size is too big to produce any high quality output, a warning should be shown to the user momentarily before the program runs the video to tell recommend what could be done to better the user experience

Unable to run executables

Hello Coby,
I found your ASCII video player, but I think that I am doing something wrong because I cannot run the executable. I just getting an error saying zsh: no such file or directory: executable. I am on a mac if this helps.
Screenshot 2023-01-20 at 2 51 48 PM

Plans for the Future

As of right now, I still love this project, but I think the code is much too tightly coupled.

Main Refactoring

  • The code to create the ascii video and the code to actually playback the data should be decoupled, as well as the code to read a video and get a video frame, and the code to read audio and get audio frames.
  • It should all fit together so that it can support different backends for reading video. I'll still have to work out how audio would be packaged into the ascii video but I'll get there

Another goal would be to actually create an mp4 video which emulates a terminal display and includes the audio of the original video synced.

  • C programs aren't very easy to package and distribute, so I also plan to create some sort of binding to Python, Javascript, or whatnot that will allow me to distribute the program a little easier and hopefully make it a web service

asciinema is definitely a big inspiration for these new plans for making ascii recordings, and a goal may even be able to make code generated by ascii_video compatible with asciinema data

As of now, the main plan is to make ascii_video more accessible through refactoring and binding, because if I ever had to compile ffmpeg to run anything I'd just click off the website, and I'm sure other's would too (although there is a docker container :/ but that's not much better for other reasons). It'll also be my first time trying to create language bindings so it should be pretty interesting, and moving the project from C++ to C should pay off and allow me to bind more easily to other languages.

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.