简体   繁体   English

在 webRTC 中录制视频通话并将其上传到服务器以进行监控

[英]Record video-call in webRTC and upload it to server for monitoring purposes

I have build a webRTC video calling app, very simple entirely in JS.我已经构建了一个 webRTC 视频通话应用程序,完全在 JS 中非常简单。

Now the call is between our executives and customers, and for monitoring purposes we need to record the stream on both end.现在通话是在我们的高管和客户之间进行的,出于监控目的,我们需要在两端记录流。
Is there any way i can get most of the video: two solutions came to my mind was (Using MediaRecorder for the JOB ...)有什么办法可以让我获得大部分视频:我想到了两个解决方案(使用 MediaRecorder for the JOB ...)

  1. Every 3-4 seconds update the recorded stream to server to append it, to some temporary file.每 3-4 秒将记录的流更新到服务器以将其附加到某个临时文件。 and on server i check if an hour goes by, and still there is no new blog, upload it to permanent servers.在服务器上我检查一个小时是否过去了,仍然没有新博客,将其上传到永久服务器。
    Problem i am using amazon s3 as storage server, which doesn't allow appending files, so i have to store it locally, i have to run a cronjob, and still system will be complicated, i also have to manage, network drops.问题我使用 amazon s3 作为存储服务器,它不允许附加文件,所以我必须将它存储在本地,我必须运行一个 cronjob,但系统仍然会很复杂,我还必须管理,网络掉线。
    Even if everything works out, there is still chances that 1-2 seconds of footage will be lost.即使一切顺利,仍有可能丢失 1-2 秒的镜头。

  2. Save the file in localStorage and update it next time, one of my page opens, or through some background JOB.将文件保存在 localStorage 中并在下次更新它时,打开我的一个页面,或者通过一些后台 JOB。
    Problem Once the tab closes there is no background job i can rely on.问题一旦选项卡关闭,我就没有可以依赖的后台工作。 Even ServiceWorkers have very limited scope.甚至 ServiceWorkers 的范围也非常有限。 and they cannot access AJAX or LocalStorage ( as i know, for the best of my knowledge )并且他们无法访问 AJAX 或 LocalStorage (据我所知,据我所知)

Any new solution with any prespective is appreciated.任何新的解决方案都值得赞赏。 Anything i can do silently is acceptable.我可以默默做的任何事情都是可以接受的。 and if you have any comments about my existing approaches, then it works as well.如果你对我现有的方法有任何意见,那么它也有效。

Thanks in Advance.提前致谢。

For your solution #1, consider uploading the blobs to different files in s3.对于您的解决方案 #1,考虑将 blob 上传到 s3 中的不同文件。 At the end of the session, merge the files into a new file for permanent storage and delete the temporary files.在会话结束时,将文件合并为一个新文件以进行永久存储并删除临时文件。

使用 WebSocket 静默上传 blob,然后与 FFMPEG 合并

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM