Coder Social home page Coder Social logo

png2t's Introduction

๐Ÿ–ผ๏ธ png2t ๐ŸŽฌ

Who needs a GUI anyways?

What?

png2t is a fun little program that allows you to print out image or play a video format in a shell, so long as the shell supports ANSI escape codes!

How?

png2t was written entirely in Rust! It currently depends on FFMPEG being installed to the system, but later versions of this will hopefully use an internal image library rather than external shell calls. png2t decomposes videos into .exr image files of each of their frames, loads them into memory, then prints them as individual RGB pixels using ANSI Truecolor sequences. It even plays the sound!

Why?

It's cool!

Building

Unix

1. Install cargo to your system

Visit https://rustup.rs/ for installation instructions!

2. Install ffmpeg

Debian-based:

sudo apt install -y ffmpeg

Fedora-based:

sudo dnf install -y ffmpeg

3. Clone this repository

git clone [email protected]:bepri/png2t.git && cd png2t

4. Build

cargo build --release

Resulting binary will be at target/release/png2t

Windows

1. Install cargo on your system:

2. Install FFMPEG for Windows

Downloads can be found at this link.

3. Clone this repository

git clone [email protected]:bepri/png2t.git && cd png2t

4. Build

cargo build --release

Resulting binary will be at target/release/png2t.exe

png2t's People

Contributors

bepri avatar adam-mcdaniel avatar oscix avatar

Stargazers

 avatar

Watchers

 avatar

png2t's Issues

Add clean exit from a video

If a video ends, then it exits cleanly just fine. But if ctrl+c is pressed mid-video, drop is never called for Media and the temp directory never gets cleaned up.

What I would like to happen:

  • Capture the q, ctrl+q, and ctrl+c keystrokes
  • If any is read, finish printing the current frame then exit gracefully
  • (Optional) leave the last frame printed visible every time the program exits, to make the printing behavior consistent with photo inputs.

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.