GithubHelp home page GithubHelp logo

j0t3x / nodejs-ffmpeg-livestreamer-video-streaming Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gaditek-alikhan/nodejs-ffmpeg-livestreamer-video-streaming

0.0 2.0 0.0 24.56 MB

Node.js Streaming Videos Using Livestreamer, FFMPEG, Socket.io And Imagemagick Over UDP Protocol | Developed by: Ali Khan (Full Stack Developer | Data Science Engineer)

Shell 17.10% JavaScript 36.49% HTML 46.41%

nodejs-ffmpeg-livestreamer-video-streaming's Introduction

Node.js Streaming Videos Using Livestreamer, FFMPEG, Socket.io And Imagemagick Over UDP Protocol

Tools Required: Node.js: An open-source, cross-platform JavaScript runtime environment for developing a diverse variety of tools and applications. Express.js: The fast, unopinionated, minimalist web framework for nodejs. Socket.io: Enables real-time bidirectional event-based communication, It works on every platform, browser or device, focusing equally on reliability and speed. Livestreamer: A command-line utility that pipes video streams from various services into a video player, such as VLC. The main purpose of Livestreamer is to allow the user to avoid buggy and CPU heavy flash plugins but still be able to enjoy various streamed content. FFMPEG: A leading multimedia framework to decode, encode, transcode, mux, demux, stream, filter and play. Imagemagick: A free and open-source software suite for displaying, converting, and editing raster image and vector image files.

Why UDP? Used for media streaming specially. Transmission of data is faster than TCP. Requires less processing at the transmitting and receiving of hosts. It is simple to use for a network. The operating system does not need to maintain UDP connections information. Does not need the overhead required to detect reliability. Does not need to maintain the unexpected deception of a data flow.

Installing Dependencies: npm install

Installing livestreamer & imagemagick on ubuntu: sudo apt-get install livestreamer & sudo apt-get install imagemagick Note: ffmpeg can be found in ffmpeg-source folder

Application files generate-watermark.sh: uses imagemagick to add watermark text over image, which will be displayed on top of stream for branding purposes fetch-stream.sh: fetches youtube stream through livestreamer and pipe it to ffmpeg ffmpeg add watermark image as an overlay on top of streaming video ffmpeg then pipe updated stream to node.js server listening on udp port:33333 server.js: initializes ffmpeg child process which will listen on udp port:33333 for incoming stream forward video stream to client.html through socket.io client.html: transform incoming stream to image and then draw that through html5 canvas

Steps To Follow (Run Project): 1: bash generate-watermark.sh 2: bash fetch-stream.sh 3: node server.js 4: open stream.html in browser (ie:http://33.33.33.40:9000/stream)

Screenshots attached in folder.

Developed by: Ali Khan (Full Stack Developer | Data Science Engineer) Linkedin: pk.linkedin.com/in/p2palikhan Skype: ali-gaditek Cell#: +923123740430

nodejs-ffmpeg-livestreamer-video-streaming's People

Watchers

 avatar  avatar

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.