kurento 中记录的文件为空

The recored file is empty in kurento

Kurento无法录制视频,我的代码如下,

 WebRtcEndpoint webrtcEndpoint =..;   
 RecorderEndpoint recorderEndpoint = new RecorderEndpoint.Builder(getPipeline(), "file:///tmp/test.webm")
            .withMediaProfile(MediaProfileSpecType.WEBM)  //I also tried MP4
            .stopOnEndOfStream()
            .build();

    recorderEndpoint.addRecordingListener(new EventListener<RecordingEvent>() {

        @Override
        public void onEvent(RecordingEvent event) {
            log.info("start recording for userId: {}, live:{}", getUserId(), getLiveId());
        }

    });

    recorderEndpoint.addStoppedListener(new EventListener<StoppedEvent>() {

        @Override
        public void onEvent(StoppedEvent event) {
            log.info("stopped recording for userId: {}, live:{}", getUserId(), getLiveId());
        }

    });

    recorderEndpoint.addPausedListener(new EventListener<PausedEvent>() {

        @Override
        public void onEvent(PausedEvent event) {
            log.info("Pause recording for userId: {}, live:{}", getUserId(), getLiveId());
        }

    });

    recorderEndpoint.addErrorListener(new EventListener<ErrorEvent>() {
        @Override
        public void onEvent(ErrorEvent event) {
            log.info("record error: {}, live:{}, event:{}", getUserId(), getLiveId(),event.getType()+ "|" +  event.getErrorCode() + ":" + event.getDescription());
        }
    });

    webrtcEndpoint.connect(recorderEndpoint);

    log.info("recorderEndpoint.record() called!");
    recorderEndpoint.record();

我确定 webrtcEndpoint 已连接并正常制作视频。

问题是在目录 /tmp 中创建的文件 test.webm;但它是空的!

当我的 android 连接到服务器时出现问题。如果我使用浏览器,则没有问题。有什么理由可以吗?

终于,我得到了答案。原因是服务端尝试同时连接视频和音频,而客户端(设备)只发送视频,因此无法开始录制。该问题实际上已在客户端修复。