Kurento媒体服务器录制是静默的

时间:2015-01-27 10:35:31

标签: webrtc kurento

基于魔镜示例我尝试将结果MP4保存到文件中。视频保存得很好,但音频静音。

如何在kurento中启用音频流?

更新 创建端点和管道的服务器代码:

 ...
 MediaPipeline pipeline = kurento.createMediaPipeline();
 ...

String createWebRTCEndpoint(MediaPipeline pipeline, String uri, String exchange, String sdp) {
    RecorderEndpoint rep = new RecorderEndpoint.Builder(pipeline, uri)
        .stopOnEndOfStream()
        .withMediaProfile(MediaProfileSpecType.MP4)
        .build();
    WebRtcEndpoint webRtcEndpoint = new WebRtcEndpoint.Builder(pipeline)
        .build();
    webRtcEndpoint.connect(rep);
    rep.connect(webRtcEndpoint);
    rep.record();
    final String result = webRtcEndpoint.processOffer(sdp);
    synchronized (pipelinesAcc) {
        pipelines.put(exchange, new Tuple<>(pipeline, new Date()));
    }
    return result;
}

SDP:

v=0
o=Mozilla-SIPUA-35.0.1 15423 0 IN IP4 0.0.0.0
s=SIP Call
t=0 0
a=ice-ufrag:358ccbc2
a=ice-pwd:c40707c14349a6eb2b7fabb670c06c9c
a=fingerprint:sha-256 B2:B5:89:8A:44:B9:BB:E6:EA:7A:AD:54:75:66:3C:B2:4A:89:CE:EA:22:81:BA:18:83:96:2D:A4:C3:87:E1:63
m=audio 9 RTP/SAVPF 109 9 0 8 101
c=IN IP4 0.0.0.0
a=rtpmap:109 opus/48000/2
a=ptime:20
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=setup:actpass
a=rtcp-mux
a=candidate:0 1 UDP 2128609535 172.28.151.12 62452 typ host
a=candidate:0 2 UDP 2128609534 172.28.151.12 62454 typ host
a=candidate:2 1 UDP 1692467199 195.234.75.189 62452 typ srflx raddr 172.28.151.12 rport 62452
a=candidate:2 2 UDP 1692467198 195.234.75.189 62454 typ srflx raddr 172.28.151.12 rport 62454
m=video 9 RTP/SAVPF 120 126 97
c=IN IP4 0.0.0.0
a=rtpmap:120 VP8/90000
a=rtpmap:126 H264/90000
a=fmtp:126 profile-level-id=42e01f;packetization-mode=1
a=rtpmap:97 H264/90000
a=fmtp:97 profile-level-id=42e01f
a=sendonly
a=rtcp-fb:120 nack
a=rtcp-fb:120 nack pli
a=rtcp-fb:120 ccm fir
a=rtcp-fb:126 nack
a=rtcp-fb:126 nack pli
a=rtcp-fb:126 ccm fir
a=rtcp-fb:97 nack
a=rtcp-fb:97 nack pli
a=rtcp-fb:97 ccm fir
a=setup:actpass
a=rtcp-mux
a=candidate:0 1 UDP 2128609535 172.28.151.12 51748 typ host
a=candidate:0 2 UDP 2128609534 172.28.151.12 60009 typ host
a=candidate:2 1 UDP 1692467199 195.234.75.189 51748 typ srflx raddr 172.28.151.12 rport 51748
a=candidate:2 2 UDP 1692467198 195.234.75.189 60009 typ srflx raddr 172.28.151.12 rport 60009

UPDATE-2

kurento-media-server -v
Version: 5.0.4
Found modules:
    Module: 'core' version '5.0.4'
    Module: 'elements' version '5.0.4'
    Module: 'filters' version '5.0.4'

0 个答案:

没有答案