视频直播网站

发布于 2024-08-23 09:10:59 字数 429 浏览 4 评论 0原文

我们期待开发一个非常有趣的社区门户,帮助用户在社区中广播他们的实时视频。 我一直在检查 ustream.tv、justin.tv 等网站,想知道他们使用什么/如何技术来做到这一点。

在过去的几天里,我做了很多研究,检查了媒体,以有效地做到这一点,并找出该领域的一些领先公司,例如 Ooyala.com、brightcove.com,它们提供服务器/技术来在全球范围内无缝地播放视频。 我很快就会与这些提供商中的任何一个签约。

所以我的问题是,我的网站究竟如何捕获用户摄像头的实时反馈,将流发送到 ooyala/brightcove 并进一步将其广播给其他社区用户。

到目前为止,我已经发现 Flash 8/ Flex 确实提供了一些从用户摄像头获取流的输入。

我想知道你们中是否有人以前从事过这个工作/可以阐明我的方法到底应该如何。

提前致谢。 开发 Drupal

we are looking forward towards developing a very interesting community portal that would help the user to broadcast their live videos across the community.
I've been checking over sites like ustream.tv, justin.tv and wondering what/how Technology they been using to do so.

I am doing a lot of research over the last few days checking over the medium to do this effectively and figure out some of the leading companies in the domain like Ooyala.com, brightcove.com providing servers/technology to broadcast videos seamlessly across the globe.
I will be signing up with any of these providers soon.

So my question is , how exactly would my website be catching with the live feed from the users cam, send the stream to ooyala/brightcove and further broadcast it to rest of the community users.

till now, I've figured out that Flash 8/ Flex does provide some inputs on fetching stream from users cam.

I would like to know if any of you guys have worked on this before/can throw some light on how exactly my approach should be.

Thanks in advance.
dev-drupal

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

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

发布评论

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

评论(1

ぽ尐不点ル 2024-08-30 09:10:59

最简单的方法是结合使用 Flash/Flex 客户端和 Red5 http://osflash.org/red5

Flash Player 有一种使用摄像机的方法,Red5 服务器是一个开源 Flash 服务器,可以记录客户端流。

我建议设置 Red5 并使用它。它可以满足您所需的一切。只需查看 API 并开始编写测试应用程序即可。

如何从用户摄像机获取视频:

package {
    import flash.display.Sprite;
    import flash.media.Camera;
    import flash.media.Video;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import flash.events.StatusEvent;
    import flash.events.MouseEvent;
    import flash.system.SecurityPanel;
    import flash.system.Security;

    public class Camera_getCameraExample extends Sprite {
        private var myTextField:TextField;
        private var cam:Camera;
        private var t:Timer = new Timer(1000);

        public function Camera_getCameraExample() {
            myTextField = new TextField();
            myTextField.x = 10;
            myTextField.y = 10;
            myTextField.background = true;
            myTextField.selectable = false;
            myTextField.autoSize = TextFieldAutoSize.LEFT;    

            cam = Camera.getCamera();

            if (!cam) {
                myTextField.text = "No camera is installed.";

            } else if (cam.muted) {
                myTextField.text = "To enable the use of the camera,\n"
                                 + "please click on this text field.\n" 
                                 + "When the Flash Player Settings dialog appears,\n"
                                 + "make sure to select the Allow radio button\n" 
                                 + "to grant access to your camera.";

                myTextField.addEventListener(MouseEvent.CLICK, clickHandler);

            }else {
                myTextField.text = "Connecting";
                connectCamera(); 
            }

            addChild(myTextField);

            t.addEventListener(TimerEvent.TIMER, timerHandler);
        }

        private function clickHandler(e:MouseEvent):void {
            Security.showSettings(SecurityPanel.PRIVACY);

            cam.addEventListener(StatusEvent.STATUS, statusHandler);

            myTextField.removeEventListener(MouseEvent.CLICK, clickHandler);
        }

        private function statusHandler(event:StatusEvent):void {

            if (event.code == "Camera.Unmuted") {
                connectCamera(); 
                cam.removeEventListener(StatusEvent.STATUS, statusHandler);
            }
        }

        private function connectCamera():void {
                var vid:Video = new Video(cam.width, cam.height);
                vid.x = 10;
                vid.y = 10;
                vid.attachCamera(cam);
                addChild(vid);    

                t.start();
        }

        private function timerHandler(event:TimerEvent):void {
            myTextField.y = cam.height + 20;
            myTextField.text = "";
            myTextField.appendText("bandwidth: " + cam.bandwidth + "\n");
            myTextField.appendText("currentFPS: " + Math.round(cam.currentFPS) + "\n");
            myTextField.appendText("fps: " + cam.fps + "\n");
            myTextField.appendText("keyFrameInterval: " + cam.keyFrameInterval + "\n");
        }
    }
}

如何将视频发送到 BRIGHT COVE

他们有一个 API,只需读取它即可。

The easy way is to use a Flash/Flex Client with Red5 http://osflash.org/red5

The Flash Player has a method for using a video camera and the Red5 server is an open source Flash server that will record client streams.

I recommend setting up Red5 and playing with it. It does everything you need. Just look over the API and start writing test apps.

HOW TO GET VIDEO FROM USER CAMERA:

package {
    import flash.display.Sprite;
    import flash.media.Camera;
    import flash.media.Video;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import flash.events.StatusEvent;
    import flash.events.MouseEvent;
    import flash.system.SecurityPanel;
    import flash.system.Security;

    public class Camera_getCameraExample extends Sprite {
        private var myTextField:TextField;
        private var cam:Camera;
        private var t:Timer = new Timer(1000);

        public function Camera_getCameraExample() {
            myTextField = new TextField();
            myTextField.x = 10;
            myTextField.y = 10;
            myTextField.background = true;
            myTextField.selectable = false;
            myTextField.autoSize = TextFieldAutoSize.LEFT;    

            cam = Camera.getCamera();

            if (!cam) {
                myTextField.text = "No camera is installed.";

            } else if (cam.muted) {
                myTextField.text = "To enable the use of the camera,\n"
                                 + "please click on this text field.\n" 
                                 + "When the Flash Player Settings dialog appears,\n"
                                 + "make sure to select the Allow radio button\n" 
                                 + "to grant access to your camera.";

                myTextField.addEventListener(MouseEvent.CLICK, clickHandler);

            }else {
                myTextField.text = "Connecting";
                connectCamera(); 
            }

            addChild(myTextField);

            t.addEventListener(TimerEvent.TIMER, timerHandler);
        }

        private function clickHandler(e:MouseEvent):void {
            Security.showSettings(SecurityPanel.PRIVACY);

            cam.addEventListener(StatusEvent.STATUS, statusHandler);

            myTextField.removeEventListener(MouseEvent.CLICK, clickHandler);
        }

        private function statusHandler(event:StatusEvent):void {

            if (event.code == "Camera.Unmuted") {
                connectCamera(); 
                cam.removeEventListener(StatusEvent.STATUS, statusHandler);
            }
        }

        private function connectCamera():void {
                var vid:Video = new Video(cam.width, cam.height);
                vid.x = 10;
                vid.y = 10;
                vid.attachCamera(cam);
                addChild(vid);    

                t.start();
        }

        private function timerHandler(event:TimerEvent):void {
            myTextField.y = cam.height + 20;
            myTextField.text = "";
            myTextField.appendText("bandwidth: " + cam.bandwidth + "\n");
            myTextField.appendText("currentFPS: " + Math.round(cam.currentFPS) + "\n");
            myTextField.appendText("fps: " + cam.fps + "\n");
            myTextField.appendText("keyFrameInterval: " + cam.keyFrameInterval + "\n");
        }
    }
}

HOW TO SEND VIDEO TO BRIGHT COVE

They have an API just read over it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文