How to record video using a webcam and save to a server using RubyOnRails

I want to record a user’s video with a webcam and save the recorded video to the server using Ruby On Rails, which should work in all browsers. I tried the following approaches that did not help solve my problem.

Please let me know if any authority has a standard solution for this (which works in all / most browsers, preferably open source).

Any help would be greatly appreciated. Thanks at Advance!

+6
source share
2 answers

This is a rather old question, but just came across it and thought that I would at least offer a solution for all future visitors who stumble on this issue:

The MediaStreamRecorder API is not currently implemented in chrome , however, some users have found alternative ways to make it work by stitching .webp images in a .webm video. Now, it may not be the best idea to use this experiment, but other projects have significantly advanced this idea by introducing a cross-platform library that implements this idea (and another specific browser solution), of which the first is definitely called MediaStreamRecorder . Another option of RecordRTC that I used in the past, one of the advantages of which is that they have specific Ruby server-side code to make it work neatly (not what you need if you want to do a simple download, but sometimes you may need to do more).

+2
source

Video recording in the browser is mainly related to the client side, so the fact that you are using the Ruby server side will not affect the solution.

The only solution that works consistently in desktop and mobile browsers will be this:

  • desktop: video recording client + media server
  • Mobile: HTML Media Capture

Some notes on your links:

  • HTML5Rocks article mentions HTML Media Capture project / standard that works only in mobile browsers
  • The jQuery webcam plugin uses Flash to access the webcam, but cannot record video (it does not connect to the media server).
  • Commercial hosted solutions include nimbb , pipe and ziggeo
  • Commercial standalone solutions include HDFVR ( which supports Ruby )
0
source

Source: https://habr.com/ru/post/946618/


All Articles