简体   繁体   English

在媒体服务器上录制时将图像用作视频流

[英]Use image as video stream while recording on media server

I'm creating application where user can record voice message, problem is that recorded file is passed to other encoding servers, that requires both video and audio streams to be present. 我正在创建一个应用程序,用户可以在其中录制语音消息,问题是录制的文件被传递到其他编码服务器,这需要同时显示视频和音频流。

So my question is how can I use static image to emulate webcam and attach it to NetStream? 所以我的问题是如何使用静态图像模拟网络摄像头并将其附加到NetStream?

ns = new NetStream(nc);
ns.addEventListener(NetStatusEvent.NET_STATUS, watchRecording);

//ns.attachCamera(cam);
ns.attachAudio(mic);
ns.publish(fileName.text, "record");

[+] [+]

Although I don't have access to application on WOWZA server I can negotiate with some one to add few lines and recompile it. 尽管我无权访问WOWZA服务器上的应用程序,但我可以与某人协商添加几行并重新编译它。 So server-side solution in java is also an option here. 因此,这里的Java服务器端解决方案也是一个选择。

I'd recommend you use a server side solution, as creating a client side solution would involve sending more packets than is actually needed. 我建议您使用服务器端解决方案,因为创建客户端解决方案将涉及发送比实际需要更多的数据包。 Plus, I'm sure Java has better tools to emulate 'video'. 另外,我确信Java有更好的工具来模拟“视频”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM