Interstellar Streaming
Abstract
Abstract
Mentors:
- Fahim Ahmed
- Vedant Tarale
- Abhishek Satpathy
Mentees:
- Nandan Ramesh
- Krishna Tulsyan
- Upasana Nayak
Aim: The aim of our project is to leverage IPFS to create a streaming platform that enhances web speed, safety, and openness, while also implementing adaptive bitrate streaming for improved user experience.
Introduction: Traditional streaming methods relying on HTTP and TCP protocols face challenges like bandwidth limitations and scalability issues. This project proposes to overcome these challenges by utilizing the decentralized, peer-to-peer approach of IPFS for media streaming, aiming for smoother playback experiences and reduced strain on servers.
Diagrammatic Representation
Methodology :
Concept
With IPFS, content can be fetched from nearby peers, reducing the distance data has to travel. This can significantly reduce buffering and latency issues, resulting in a smoother streaming experience for viewers, even for high-quality videos. In traditional HTTP streaming, each viewer needs to individually download the content from the server, resulting in multiple copies being transmitted over the network(when multiple users are requesting the same video). IPFS utilizes content-addressable storage, where content is identified by its unique hash. This enables the sharing of content among viewers, reducing bandwidth requirements as the same content can be fetched from nearby peers.
Additionally, IPFS's peer-to-peer nature allows for better scalability compared to centralized streaming systems. As the number of viewers increases, the content distribution load is distributed among multiple peers, reducing strain on individual servers. One of the key benefits of IPFS Streaming is that it makes it possible to stream content from IPFS without relying on a centralized server or content delivery network (CDN). Instead, content is streamed directly from other users on the IPFS network who have already downloaded the file. This makes IPFS Streaming a highly decentralized and peer-to-peer technology.
Implementation
- Research and Planning: Gain understanding of Web, Computer Networking, FFmpeg, HLS, and IPFS technology. Analyze IPFS capabilities for streaming and define system architecture.
- FFmpeg Video Chunking: First, the user uploads the files on the website. The video file, as formdata, is passed to the server , which then uses FFmpeg to chunk the video file into several .ts files each containing a video segment (of length 10 seconds) and generate .m3u8 files, for each of the 4 resolutions, which contains the instruction on combining the .ts files to form the video back.
- Uploading files: Next, the server uploads the entire folder containing the .m3u8 files for each resolution and their corresponding .ts files for the entire video length to IPFS.
- Streaming videos: The viewers send requests to the Node server to watch the videos, which then are met with responses containing the IPFS CID(Content IDentifier) of the folder containing files pertaining to that video. Then, the client retrieves the file directly from the IPFS network using the CID, while caching it in the browser’s local storage.
- Adaptive bitrate: During the streaming process, if the user sets their quality to “Auto”, then depending on the network speed of the client, the player shifts between resolutions to give the user a better experience.
Results:
In this project, we successfully developed a decentralized streaming platform leveraging IPFS, which allows users to upload, browse, and stream videos with improved efficiency and scalability. Dynamic adaptive bitrate streaming based on network conditions was also implemented, thereby enhancing the overall streaming experience.
Home Screen
Video Player
Adaptive Bit Rate
Conclusions:
IPFS offers advantages over traditional HTTP streaming, such as reduced buffering and latency, scalability, and decentralized content distribution. The project demonstrates the feasibility of utilizing IPFS for building efficient and scalable streaming platforms, with potential for further enhancements such as smart contract integration and live streaming support.
References:
- IPFS Documentation - https://docs.ipfs.io/
- Streaming Over IPFS - https://medium.com/@jessgreb01/what-is-ipfs-how-does-it-work-let-s-build-something-d0eb18c68b10
- FFmpeg - https://ffmpeg.org/documentation.html
- NodeJS - https://nodejs.org/en/docs/
- IPFS video streaming - https://blog.goodaudience.com/building-a-peer-to-peer-video-streaming-app-with-ipfs-and-webrtc-b8f2d207ae5f
- How Video Streaming Works - https://www.sciencedirect.com/science/article/pii/S2212017313004417
Report Information
Team Members
Team Members
Report Details
Created: March 21, 2024, 8:57 p.m.
Approved by: None
Approval date: None
Report Details
Created: March 21, 2024, 8:57 p.m.
Approved by: None
Approval date: None