Streaming Webcam RTMP support

梦想的初衷 提交于 2021-01-28 03:33:48

问题


Okay I'm using this code; and I'm curious to know why it isn't streaming to my RTMP server; I have tried connecting to my Red5 RTMP server through OBS which is a broadcasting program and it works fine but when using this script it doesn't broadcast the webcam I'm just wondering if I'm missing any variables which is preventing me from connecting to the rtmp server or something. Thank you for any help!

    <embed src="webcam.swf"
           flashvars="server=rtmp://ip/path/usertoken"
           bgcolor="#ffffff"
           width="800"
           height="900"
           quality="high"
           allowScriptAccess="always"
           type="application/x-shockwave-flash"
           pluginspage="http://www.macromedia.com/go/getflashplayer" />

In the readme of the setup there are some variables which I didn't understand how to use so I'm going to paste them below:

### FlashVars

* server : rtmp server
* stream : rtmp stream to publish
* token  : (optional)
* camerawidth : default 640
* cameraheight : default 480
* camerafps : default 15

this is the main one that I didn't understand with swfobject:

    var flashvars = {server : "rtmp://localhost/live",
                     stream : "plop"};
    var params = {};
    var attributes = {};
    swfobject.embedSWF("webcam.swf", "myId", "300", "120", "9.0.0","expressInstall.swf", flashvars, params, attributes);

来源:https://stackoverflow.com/questions/35102035/streaming-webcam-rtmp-support

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!