回送上的Kurento Media Pipeline重叠图像不起作用

问题描述 投票:1回答:1

我在将图像叠加层显示在回送视频上时遇到麻烦。我可以使用rtpEndpoint.connect(rtpEndpoint, function....)对脚本进行环回,但是当我尝试添加ImageOverlayFilter时,出现了一些我无法解决的错误。

错误:“ MediaType”的值无效

“错误”:{“代码”:40001,“数据”:{“类型”:“ MARSHALL_ERROR”},“消息”:“'MediaType'的值无效”}

   var overlayparams = {
       id: "TESTTEST",
       uri: "file://tmp/media/sample.png",
       offsetXPercent: 0,
       offsetYPercent: 0,
       widthPercent: 0,
       heightPercent: 0,
       keepAspectRatio: true,
       center: true,
       mediaPipeline: pipeline
    }

    pipeline.create("ImageOverlayFilter", overlayparams, function (error, filter) {
       if (error) return console.log(">>>>>"+ error);

       return callback(null, rtpEndpoint, filter);

    }); 

文件后面


    rtpEndpoint.connect(rtpEndpoint, imageOverlay, rtpEndpoint, function (error) {
        if (error) return onError(error);
        console.log("Added overlay to loopback"); 
    });

    /* 
    // This works for normal loopback
    rtpEndpoint.connect(rtpEndpoint, function (error) {
        if (error) return onError(error);
        console.log("loopback works"); 
    }); 
     */

我也尝试过使用filter.addVideo方法而不是overlayparams对象,但是它会产生相同的结果。

node.js kurento
1个回答
0
投票

[假设imageoverlayfilter类似于Kurento中的faceoverlayfilter,所引用的文件必须为http网址。如果您将文件存储在本地,则需要使用Web服务器将其存储或远程托管。

所以,而不是...“ file://tmp/media/sample.png”

取决于您在哪里拥有http(s)服务器的根目录,您将拥有...“ https://localhost/tmp/media/sample.png

还请注意,在kurento 6.11之前,已确认imageoverlay过滤器存在问题。最新的是6.13,所以可以解决...https://github.com/Kurento/bugtracker/issues/350

© www.soinside.com 2019 - 2024. All rights reserved.