{"id":17651846,"url":"https://github.com/diegovictor/code-streamer","last_synced_at":"2025-07-13T20:05:01.718Z","repository":{"id":98963923,"uuid":"375195158","full_name":"DiegoVictor/code-streamer","owner":"DiegoVictor","description":"Nodejs Video Streaming Study Case ","archived":false,"fork":false,"pushed_at":"2025-01-02T23:48:35.000Z","size":112976,"stargazers_count":29,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-04T03:42:07.631Z","etag":null,"topics":["javascript","js","node","nodejs","stream","streaming","streaming-video","video"],"latest_commit_sha":null,"homepage":"https://code-streamer.onrender.com","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DiegoVictor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2021-06-09T01:53:14.000Z","updated_at":"2025-03-16T00:37:54.000Z","dependencies_parsed_at":"2025-05-07T07:25:07.380Z","dependency_job_id":null,"html_url":"https://github.com/DiegoVictor/code-streamer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DiegoVictor/code-streamer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiegoVictor%2Fcode-streamer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiegoVictor%2Fcode-streamer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiegoVictor%2Fcode-streamer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiegoVictor%2Fcode-streamer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DiegoVictor","download_url":"https://codeload.github.com/DiegoVictor/code-streamer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiegoVictor%2Fcode-streamer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265198349,"owners_count":23726447,"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":["javascript","js","node","nodejs","stream","streaming","streaming-video","video"],"created_at":"2024-10-23T11:43:54.785Z","updated_at":"2025-07-13T20:05:01.687Z","avatar_url":"https://github.com/DiegoVictor.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Code Streamer\n[![nodemon](https://img.shields.io/badge/nodemon-2.0.7-76d04b?style=flat-square\u0026logo=nodemon)](https://nodemon.io/)\n[![eslint](https://img.shields.io/badge/eslint-7.28.0-4b32c3?style=flat-square\u0026logo=eslint)](https://eslint.org/)\n[![airbnb-style](https://flat.badgen.net/badge/style-guide/airbnb/ff5a5f?icon=airbnb)](https://github.com/airbnb/javascript)\n[![MIT License](https://img.shields.io/badge/license-MIT-green?style=flat-square)](https://raw.githubusercontent.com/DiegoVictor/code-streamer/main/LICENSE)\n\nStudy Case to learn about streaming video in Node.js\n\nLive Demo: https://code-streamer.onrender.com\n\n## Table of Contents\n* [Requirements](#requirements)\n* [Installing](#installing)\n* [Usage](#usage)\n  * [Choosing another videos](#choosing-another-videos)\n    * [CODEC String](#codec-string)\n\n# Requirements\n* [Node.js](https://nodejs.org) ^15.14.0\n* npm or [yarn](https://yarnpkg.com)\n\n# Installing\nAfter clone the repo, just install dependencies:\n```shell\nnpm install\n```\nOr:\n```shell\nyarn\n```\n\n# Usage\nFirst of all start up the server:\n```shell\nnpm run dev:server\n```\nOr:\n```shell\nyarn dev:server\n```\n\nThen access through the browser the `http://localhost:3000` page (if you are using the default configuration), if everything is OK you should see the player loading and playing the video:\n\n![Demo](https://media.githubusercontent.com/media/DiegoVictor/code-streamer/main/screenshots/demo.gif)\n\n## Choosing another videos\nIf you would like to choose another videos make sure to fragment them or the [Media Source Extensions](https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API) may not deal it properly.\n\n* [Checking Fragmentation](https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API/Transcoding_assets_for_MSE#checking_fragmentation)\n* [Fragmenting](https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API/Transcoding_assets_for_MSE#fragmenting)\n\nAlternatively you can use [mp4fragment](http://www.bento4.com/documentation/mp4fragment/) from [Bento4](https://github.com/axiomatic-systems/Bento4) toolkit:\n```\n$ mp4fragment input.mp4 output.mp4\n```\n\n### CODEC String\nTo [add a Source Buffer to Media Source](https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/addSourceBuffer) is necessary to set video's mimetype and codecs:\n```\nmediaSource.addSourceBuffer(\n  'video/mp4; codecs=\"avc1.640028, mp4a.40.2\"'\n);\n```\nTo retrieve this information you can also use the [Checking Fragmentation](https://developer.mozilla.org/en-US/docs/Web/API/Media_Source_Extensions_API/Transcoding_assets_for_MSE#checking_fragmentation) page:\n\n![codecs](https://raw.githubusercontent.com/DiegoVictor/code-streamer/main/screenshots/codecs.png)\n\nOr use [mp4info](http://www.bento4.com/documentation/mp4info/) from [Bento4](https://github.com/axiomatic-systems/Bento4) toolkit:\n```shell\n$ mp4info big-buck.mp4 | grep Codec\n  Codec String: mp4a.40.2\n  Codec String: avc1.42E01E\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegovictor%2Fcode-streamer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiegovictor%2Fcode-streamer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiegovictor%2Fcode-streamer/lists"}