https://github.com/webrtchacks/videofilestream
Experiments in streaming a video file to WebRTC
https://github.com/webrtchacks/videofilestream
capturestream getdisplaymedia mediastream webcodecs webrtc
Last synced: 5 months ago
JSON representation
Experiments in streaming a video file to WebRTC
- Host: GitHub
- URL: https://github.com/webrtchacks/videofilestream
- Owner: webrtcHacks
- Created: 2024-02-02T20:57:41.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-20T12:08:36.000Z (over 1 year ago)
- Last Synced: 2025-05-01T15:08:00.940Z (5 months ago)
- Topics: capturestream, getdisplaymedia, mediastream, webcodecs, webrtc
- Language: HTML
- Homepage: https://webrtchacks.github.io/videoFileStream/
- Size: 48.8 MB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Examples of how to convert a video file to a `MediaStream` where it can be sent via WebRTC.
See [webrtcHacks post](https://webrtchacks.com/all-the-ways-to-…file-over-webrtc) for full details, commentary, and comparisons.### Examples
- [getDisplayMedia of pop-out video file](screenshare/screenshareVideoPC.html) - load a video file into a pop-up and use `getDisplayMedia` for capture.
- [VideoElement Capture Stream](captureStream/captureStream.html) - capture the video and audio directly from a `video` element. The audio is captured using the Web Audio API and combined with the video stream to create a `MediaStream`.
- [VideoElement Capture Stream with WebAudio](captureStream/captureStreamWebAudio.html) - same as above, but experimenting with using WebAudio for local audio control.
- [Canvas Capture + Web Audio](canvas/canvasCapture.html) - write a source video to a canvas and then use `canvas.captureStream()` to capture the video with Web Audio API to capture the audio.
- [WebCodecs](WebCodecs/decodeToVideo.html) - load a video file and use WebCodecs to convert it to a MediaStream### Demos
- [getDisplayMedia of pop-out video file](screenshare/screenshareVideoPC.html) - load a video file into a pop-up and use the `getDisplayMedia` for capture.
- [VideoElement Capture Stream](captureStream/captureStream.html) - capture the video and audio directly from a `video` element. The audio is captured using the Web Audio API and combined with the video stream to create a `MediaStream`.
- [VideoElement Capture Stream with WebAudio](captureStream/captureStreamWebAudio.html) - same as above, but experimenting with using WebAudio for local audio control.
- [Canvas Capture + Web Audio](canvas/canvasCapture.html) - write a source video to a canvas and then use `canvas.captureStream()` to capture the video with Web Audio API to capture the audio.
- [WebCodecs](WebCodecs/decodeToVideo.html) - load a video file and use WebCodecs to convert it to a MediaStream### CREDITS
Big Buck Bunny video converted to 640x360 at 30 fps from [peach.blender.org](https://peach.blender.org/).