streamproc / MediaStreamRecorder

Cross browser audio/video/screen recording. It supports Chrome, Firefox, Opera and Microsoft Edge. It even works on Android browsers. It follows latest MediaRecorder API standards and provides similar APIs.
https://www.webrtc-experiment.com/msr/
MIT License
2.62k stars 563 forks source link

Save recording as MPEG-TS #171

Open BrightSoul opened 5 years ago

BrightSoul commented 5 years ago

Hi, I'd like to save recordings in the MPEG-TS format (as a single or a series of .ts files). This way I would also be able to stream the recording via Ffmpeg while it's being encoded. How can I do this?

Thanks, Moreno

JackyM06 commented 3 years ago

我的做法是将记录的每段Blob数据发送的服务端,然后在Node.js服务端通过调用FFmpeg将Buffer转化为.ts文件并进行推流。

BrightSoul commented 3 years ago

@JackyM06 Thanks, that would be a solution (I had to use Google translate but I got your message). However, I'm still convinced MPEG-TS is a better option because I could even do without ffmpeg: I could just upload those files to AWS S3 and serve them via a CloudFront distribution, keeping streaming latency to a minimum. No need to send files to another server first.

rogerbage commented 1 year ago

I'm trying to save as mp4, without convert in the server with FFmpeg. You can load ffmpeg.js to make a convertion in the frontend, but have 17mb. I'm looking for a better solution.