Created
April 4, 2020 14:52
-
-
Save guest271314/c38042935db4e0131c1e0b68ca59f4ac to your computer and use it in GitHub Desktop.
Why is video not playing on recording of remote stream?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://stackoverflow.com/questions/61022341/why-is-video-not-playing-on-recording-of-remote-stream | |
This works without a problem. If I replace the local stream with a remote stream, same code, only received over webRTC, I see the first frame and nothing more... No errors... jsut one Frame. |
WebRTC, the standard way (Client->Server->Client), is all working fine (Video and Audio). Only problem is the server load on video on many people.
So to solve this I record the video on the server with mediaRecorder,send the chunks back to the clients via websockets, (this way I avoid webRTC video transcoding), and render it via MediaSource. That is working but with two little problems atm:
- If someone joins the session while the video is already running, he is not able to render the stream (because he is not starting on a keyframe or so)
- If I start the video (everything is woking), stop it, and start again I'll get somthing like "MediaStream is closed" on the client even if I did a "new MediaStream" on every new stream start. (but will change that to the canvas solution anyway I think).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not certain what is being described?
Joined how? Video and audio? You can use
OfflineAudioContext
orChannelMerger
andChannelSplitter
to result in multiple audio streams that are all recorded https://stackoverflow.com/questions/40570114/is-it-possible-to-mix-multiple-audio-files-on-top-of-each-other-preferably-with.If a user exists and another user enters the communication, one approach could be to have one
MediaStream
that is recorded and useRTCRtpSender.replaceTrack()
to replace audio and video tracks in "midstream".