How to disable video encoding In Kurento Media Server?

狂风中的少年 提交于 2019-12-21 01:39:10

问题


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:


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"
    }
]


来源:https://stackoverflow.com/questions/36564536/how-to-disable-video-encoding-in-kurento-media-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!