6
votes

I am using Kurento media server for video streaming, I have h264 video source over RTSP. I am creating PlayerEndpoint using below code.

pipeline.create('PlayerEndpoint', {uri: 'rtsp://hostaddress:8554/stream', useEncodedMedia: false}, function(error, _playerEndpoint) {

But still it converts/encodes h264 into VP8, It needs more processing for encoding. So I am getting delay in video stream. I just want to stream h264 video directly without conversion/encoding into VP8. I think Firefox support for H264 video codec.

Is it possible to disable encoding in Kurento media server? If yes, then please help me for same or suggest any more code changes if needed.

Can Firefox able to play such h264 stream form KMS?

1
Did you get this working? If so, please accept the answer.igracia
@igracia It doesn't totally work.Alston

1 Answers

10
votes

You can't disable transcodifications in Kurento. What you can do is prevent them. If you are transcoding to VP8, I take it you are connecting the player to a WebRTC endpoint. In order to do this, your WebRTC must be negotiated to use h264. This can be done in FF, and also in Chrome. You'll need

  • openh264-gst-plugins-bad-1.5 installed in your KMS (please restart after installing)
  • make sure the SDP sent by the client only announces h264

With that, you should get h264 in the whole pipeline.


UPDATE

You can force the use of h264 in WebRtcEndpoints by modifying the file /etc/kurento/modules/kurento/SdpEndpoint.conf.json. At the bottom of that config file, there's a section for the video codecs. If you comment out VP8, you'll be forcing the other peer to use h264

"videoCodecs" : [
//    {
//      "name" : "VP8/90000"
//    },
    {
      "name" : "H264/90000"
    }
]