如何在发布流上应用过滤器

发布于 2024-10-06 02:48:08 字数 178 浏览 6 评论 0原文

我开发了一个 Flash 视频录像机(使用 AS3、Flex),它可以捕获实时网络摄像头并流式传输到 Wowza 媒体服务器。

我正在尝试对捕获的实时视频应用锐度、对比度、饱和度和锐度滤镜。

我可以对屏幕上捕获的视频应用滤镜效果。我们如何应用过滤器以便它反映在正在发布的流中?

先感谢您 拉杰什

I've developed a Flash video recorder(using AS3, Flex) which captures live web cam and streams to Wowza media server.

I am trying to apply sharpness, contrast, saturation and sharpness filters on the live video being captured.

I am able to apply filter effects on the video being captured on the screen. How do we apply the filters so that it reflects in the stream being published ?

Thank you in advance
Rajesh

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

玉环 2024-10-13 02:48:08

此代码来自测试应用程序,该应用程序是为了研究 adobe stratus 功能而制作的,并且重复了 Skype 的基本功能

这是处理类:

public class RecievingObject extends Object
    {        
        public function RecievingObject(){

        }        
        public function message(str: String):void {
            ChatWindow.addText('>> ' + str);
        }
    }

以及它如何附加到流(整个类,除了不执行任何操作的 NetStatusEvent 处理程序):

    public final class Streams
    {

        private static var streamOut: NetStream;
        private static var streamIn: NetStream;

        public static function initIn(id: String): void {
            streamIn = new NetStream(Main.connection, id);
            streamIn.client = new RecievingObject();
            streamIn.addEventListener(NetStatusEvent.NET_STATUS, onInStatus);
            streamIn.receiveVideo(true);
            streamIn.receiveAudio(true); 
            streamIn.play('media');
            VideoWindow.initIn(streamIn);
            Mixer.initSound(streamIn);
        }

        public static function initOut(): void {
            streamOut = new NetStream(Main.connection, NetStream.DIRECT_CONNECTIONS);
            var peerConnected:Object = new Object();
                peerConnected.onPeerConnect = function(subscriberStream : NetStream) : Boolean {
                    var oo:RecievingObject = new RecievingObject();
                    subscriberStream.client = oo;
                    if(!streamIn){ initIn((subscriberStream as NetStream).farID); }                    
                    return true;
                }
            streamOut.client = peerConnected;            
            streamOut.addEventListener(NetStatusEvent.NET_STATUS, onOutStatus);            
            streamOut.attachCamera(Camera.getCamera());
            streamOut.attachAudio(Microphone.getMicrophone());
            streamOut.publish('media'); 
        }


        public static function send(data: String): void {
            if(streamOut) { streamOut.send('message', data); }
            ChatWindow.addText('<< ' + data);
        }
   }

this code is from the test app that was made to research adobe stratus features and that repeats basic functionality of skype

here's the handling class:

public class RecievingObject extends Object
    {        
        public function RecievingObject(){

        }        
        public function message(str: String):void {
            ChatWindow.addText('>> ' + str);
        }
    }

and how it's attached to the stream (the whole class except NetStatusEvent handlers that do nothing):

    public final class Streams
    {

        private static var streamOut: NetStream;
        private static var streamIn: NetStream;

        public static function initIn(id: String): void {
            streamIn = new NetStream(Main.connection, id);
            streamIn.client = new RecievingObject();
            streamIn.addEventListener(NetStatusEvent.NET_STATUS, onInStatus);
            streamIn.receiveVideo(true);
            streamIn.receiveAudio(true); 
            streamIn.play('media');
            VideoWindow.initIn(streamIn);
            Mixer.initSound(streamIn);
        }

        public static function initOut(): void {
            streamOut = new NetStream(Main.connection, NetStream.DIRECT_CONNECTIONS);
            var peerConnected:Object = new Object();
                peerConnected.onPeerConnect = function(subscriberStream : NetStream) : Boolean {
                    var oo:RecievingObject = new RecievingObject();
                    subscriberStream.client = oo;
                    if(!streamIn){ initIn((subscriberStream as NetStream).farID); }                    
                    return true;
                }
            streamOut.client = peerConnected;            
            streamOut.addEventListener(NetStatusEvent.NET_STATUS, onOutStatus);            
            streamOut.attachCamera(Camera.getCamera());
            streamOut.attachAudio(Microphone.getMicrophone());
            streamOut.publish('media'); 
        }


        public static function send(data: String): void {
            if(streamOut) { streamOut.send('message', data); }
            ChatWindow.addText('<< ' + data);
        }
   }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文