{"id":26252971,"url":"https://github.com/nabedkhan/node-video-streaming-app","last_synced_at":"2025-12-28T00:23:32.733Z","repository":{"id":281554712,"uuid":"871678645","full_name":"nabedkhan/node-video-streaming-app","owner":"nabedkhan","description":"Simple node.js video streaming application using node fs, path, url and http module","archived":false,"fork":false,"pushed_at":"2025-03-09T21:18:47.000Z","size":32984,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T22:24:17.679Z","etag":null,"topics":["filesystem","fs","http","nodejs","stream","url","video-streaming"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nabedkhan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-12T16:26:22.000Z","updated_at":"2025-03-09T21:18:50.000Z","dependencies_parsed_at":"2025-03-09T22:34:24.524Z","dependency_job_id":null,"html_url":"https://github.com/nabedkhan/node-video-streaming-app","commit_stats":null,"previous_names":["nabedkhan/node-video-streaming-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabedkhan%2Fnode-video-streaming-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabedkhan%2Fnode-video-streaming-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabedkhan%2Fnode-video-streaming-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nabedkhan%2Fnode-video-streaming-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nabedkhan","download_url":"https://codeload.github.com/nabedkhan/node-video-streaming-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243447601,"owners_count":20292455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filesystem","fs","http","nodejs","stream","url","video-streaming"],"created_at":"2025-03-13T17:29:07.793Z","updated_at":"2025-12-28T00:23:32.669Z","avatar_url":"https://github.com/nabedkhan.png","language":"JavaScript","readme":"# Node.js Video Streaming Application\n\nA lightweight video streaming application built with raw Node.js, demonstrating how to implement video streaming functionality using only core Node.js modules.\n\n\u003cimg title=\"Node.js video streaming app\" alt=\"node video streaming app\" src=\"https://github.com/nabedkhan/node-video-streaming-app/blob/main/screenshot.png\"\u003e\n\n## Features\n\n- ✅ Stream video content with adaptive buffering\n- ✅ Support for different video formats\n- ✅ Range requests support for seeking within videos\n- ✅ Simple and clean HTML5 video player interface\n- ✅ Built with zero external dependencies\n- ✅ Demonstrates core Node.js concepts like streams and file system operations\n\n## Technologies Used\n\n- **Node.js**: Core runtime environment\n- **Core Node.js Modules**:\n  - `fs`: File system operations for reading video files\n  - `http`: Creating HTTP server to handle requests\n  - `path`: Working with file and directory paths\n  - `url`: Parsing URL parameters\n  - `stream`: Handling streaming data\n- **HTML5**: Frontend video player interface\n\n## How It Works\n\nThis application demonstrates several important concepts:\n\n1. **HTTP Range Requests**: Supports partial content delivery allowing users to seek within videos\n2. **Streaming**: Uses Node.js streams to efficiently transfer video data\n3. **Content-Type Detection**: Sets appropriate MIME types based on video file extensions\n4. **Error Handling**: Gracefully handles missing files and invalid requests\n\n## Project Setup\n\n### Prerequisites\n\n- Node.js (v14 or higher)\n\n### Installation\n\n1. Clone the repository:\n   ```\n   git clone https://github.com/nabedkhan/node-video-streaming-app.git\n   cd node-video-streaming-app\n   ```\n\n2. Start the server:\n   ```\n   node app.mjs\n   ```\n\n3. Open your browser and navigate to:\n   ```\n   http://localhost:3000\n   ```\n\n## How to Add Your Own Videos\n\n1. Place your video files in the `videos` directory\n2. Update the video source in `index.html` if needed\n3. Restart the server\n\n## Technical Implementation\n\nThe application works by:\n\n1. Creating an HTTP server using the `http` module\n2. Parsing incoming request URLs to determine the requested video\n3. Reading video file stats to get file size\n4. Supporting range requests to allow video seeking\n5. Streaming video data in chunks using `fs.createReadStream()`\n6. Setting appropriate HTTP headers for content type and length\n\n## Learning Outcomes\n\nThis project demonstrates:\n- How to implement video streaming without external libraries\n- Working with Node.js Buffer and Stream APIs\n- Handling HTTP headers for content streaming\n- Basic understanding of video delivery concepts\n\n## License\n\nThis project is open source and available under the [MIT License](LICENSE).\n\n## Contact\n\nNabed Khan - [GitHub Profile](https://github.com/nabedkhan)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnabedkhan%2Fnode-video-streaming-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnabedkhan%2Fnode-video-streaming-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnabedkhan%2Fnode-video-streaming-app/lists"}