Kurento WebRTC not recording

I am trying to record video using a Kurento Media server with nodejs nodes. I used the hello-world example here . I connected recorderEndpoint to webrtcEndpoint and was able to run all this, but I get this error message on the server:

0: 37: 59.122469563 7003 0xaf5500 ERROR KurentoMediaPipelineImpl / build / buildd / kms-core-5.0.3 / src / server / implementation / objects / MediaPipelineImpl.cpp: 32: busMessage: bus error: error message: 0x7f11c0330ea0, time 99: 99: 99.999999999, seq-num 514729, element 'kmsrecorderendpoint10', GstMessageError, gerror = (GError) NULL, debug = (string) "/build/buildd/kms-elements-5.0.3/src/gst-plugins/kmsrecorderendpoint. c (876): \ sink_required_cb \ (): \ / GstPipeline: pipe8 / KmsRecorderEndpoint: kmsrecorderendpoint10 ";

I don't think his record is correct, but I'm not sure what happened. I was able to run the original example so that the server was ok.

The code is here:

https://gist.github.com/poliu2s/2cd3fc2a5dc929062481

+6
source share
1 answer

You need to fix a few problems before working properly with your code. I created a fork for your code, and I added some changes that you need to enable to record the WebRTC stream. The fork is here . Also, let me provide you some comments:

  • The example you selected ("Hello World") cannot be stopped (it does not have a "Stop" button in the graphical interface). Therefore, you cannot stop recording. You should use a more advanced example with the "start" and "stop" buttons so that you can stop recording in order to access and view the saved media. You should probably better use the Magic Mirror Tutorial as a pointer, because it uses WebSockets for signaling and allows you to stop recording.
  • You should avoid race conditions. In your code, you use the "recorderEndpoint" parameter, which has a race condition, because it is initialized in a callback and used in another callback, being both callbacks executed in parallel and having race conditions.

Edit: the example does have a stop button that, when clicked, releases the pipeline and thereby stops recording. Therefore, comment 1 is really not applicable.

+12
source

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


All Articles