Giter Site home page Giter Site logo

cc-video's Introduction

cc-video

This is a Node-JS app that converts videos into a playable format for ComputerCraft computers, with video and (incredibly horrible) audio.

Setup

Note: You will require ffmpeg to convert & playback videos. Import a video file and run these commands:

node generate-audio.js <video>
node generate-video.js <video>

This will output audio and video to the ./temp folder. The only resources you need from this is the frames folder, palletes folder, and the audio.raw file. When these files have been generated, move the previously specified files and folders to a folder in a folder named videos, e.g. videos/historyoftheworld. When you go to play this file later, you will use what you named the folder inside videos. You'll be able to delete the .temp folder and the source video now.

Playback in CC

Note: This software is designed for CC:T 1.100.4. If this does not work with your version of CC, please submit and issue and I'll try to get it working. I will not backport this software to any other version of CC/Computronics/whatever else.

Once you've generated a video, next you'll need to actually play the video. For prerequisites, you will need a max size monitor, except 2 blocks smaller, and a speaker to play audio. It is reccomended to use two computers, however one should presumebly work, although it may be slower. Download the provided files in the cc folder in this repo to your computers. For the video, render.lua and receive-video.lua are required, and receive-audio.lua is required for audio, along with AUKit. You'll also need to set up the monitors in the receive-video.lua file, and the websocket URLs in both the receive-audio.lua and receive-video.lua files.

Now that the software has been installed on the computers, start the stream JS file with yarn stream. Note that port 5555 and 5556 must be open and forwarded to send and receive video / audio. To play a video, start the Lua files, open a browser and go to http://localhost:5555/play/<video>, where <video> is what you named the folder with the video information. The video & audio should start playing, although the audio will sound horrible.

Help Wanted

If you know how to fix the issues with the audio skipping, please make an issue so I can fix this problem. Thanks!

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.