Git Product home page Git Product logo

downloaded-video-syncronization-over-multiple-devices's Introduction

Project Title

SyncPlay

Inspiration

Amidst the COVID quarantine, I started this project to watch movies and videos in sync with my friends, some of whom had limited internet connectivity and preferred to download the videos. As such i wanted to build a solution that allowed us to have a fun time, and connect socially regardless of internet speed or location. This experience taught me the power of technology to bring people together, even in challenging times.

Objective:

The main objective of this project is to enable users to play locally downloaded videos and movies in sync across different devices using low bandwidth.

Project Description:

SyncPlay is a project aimed at playing locally downloaded videos and movies in sync across different devices using low bandwidth. The project is built in the node.js environment and is divided into two different codebases for server and client. The server codebase is hosted and the client is run locally on each device. The communication between server and client is achieved using socket.io.

To use SyncPlay, the video that needs to be watched in sync is downloaded and the client codebase is run across all devices. When a user starts a video, the current time along with the start signal is sent to the server, which further transmits the signal to all the connected clients. Similarly, other signals like pause or seek are transmitted across all the connected clients, and users are able to watch the video in sync even at a low bandwidth.

Overall, SyncPlay is a simple and easy-to-use solution for playing videos in sync across different devices. It is particularly useful for group viewings and remote watch parties where all participants want to watch the same content at the same time. With SyncPlay, users no longer have to worry about syncing their video manually or dealing with buffering issues caused by high bandwidth requirements.

Working:

The project works in the node.js environment and is divided into two different codebases for server and client. The server codebase is hosted and the client is run locally each device. The communication between server and client is achieved using socket.io.

The video that needs to be watched in sync is downloaded and the client codebase is run across all devices. When a user starts a video the current time along with the start signal is sent to the server which further transmits the signal to all the connected clients, similarly, other signals like pause or seek are transmitted across all the connected clients and video u are able to watch the video in sync even at a low bandwidth

The video player at the client's side render's the video in small chunks, to improve the resource efficiency

Features:

  • Low bandwidth usage to play videos in sync.
  • Ability to handle multiple clients watching the same video, by allowing them to create rooms.
  • Start, pause, and seek controls to sync the video playback.

The downlaoded video at the client's end is rendered in chunks which has the following benefits:

  • Faster load time
  • Reduced buffering
  • Improved seek performance
  • Better control over data usage
  • Increased flexibility in playback options

Usage:

  1. Remote team video watching: Remote teams can use this project to watch training or educational videos in sync, regardless of their location.

  2. Movie or video sharing with friends and family: Users can download a movie or video, host the server and invite their friends and family to join in and watch it in sync.

  3. Virtual movie nights: With the pandemic and social distancing guidelines in place, this project can be used to host virtual movie nights where people can watch a movie in sync with their friends and family members in different locations.

  4. Educational use: This project can be used in educational settings where teachers or instructors can show videos to their students in sync, ensuring that all students are on the same page.

  5. Video presentations: The project can also be used for presenting videos during conferences, webinars or remote meetings. The presenter can ensure that all attendees are seeing the same video at the same time, and no one falls behind or misses any crucial information.

Prerequisites:

Node and npm should be installed

Instructions for local testing:

  • Clone the repo to your local device
  • Move inside the directory

Setting up video-client

  1. Move inside the video-client directory
  2. Replace the existing video in video folder with your mp4 video
  3. Rename your video as video.mp4
  4. Run the following commands from root of video-client
        npm install
        npm start

Starting sync-server

  1. From another window move inside the sync-server directory
  2. Run the following commands from root of video-client
    npm install
    npm start

Testing

  1. Go to a web browser and search url localhost:3000 across all tabs
  2. Through UI select create room or join room
  3. Do same thing in different browser tab
  4. Tabs joined to the same room, can watch the video in sync

Instructions for using across devices:

You will need to host the sync-server on hosting platform like render or heroku

  1. Host the sync-server directory on a paltform and fetch the url to that deployment
  2. Go to video-client/public directory
  3. Open the web.js and update the remoteLink
  4. Change the link in following from localDepoy to remoteLink
// Linking to socket conecction
    var socket = io.connect(localDeploy , {
    reconnection: true
});

downloaded-video-syncronization-over-multiple-devices's People

Contributors

gauraangs avatar gshba avatar zigbee-s avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.