Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Video streaming 节点红色html5流媒体视频_Video Streaming_Node Red - Fatal编程技术网

Video streaming 节点红色html5流媒体视频

Video streaming 节点红色html5流媒体视频,video-streaming,node-red,Video Streaming,Node Red,我对node red和javascript都是新手,我希望有人能帮助我。我一直在尝试使用node red流式传输视频。我已使用此流成功显示图像 [{ "id": "c2701738.8bfcb", "type": "http response", "z": "6a1a7f76.b846d8", "name": "", "statusCode": "", "headers": {}, "x": 1118.170166015625, "

我对node red和javascript都是新手,我希望有人能帮助我。我一直在尝试使用node red流式传输视频。我已使用此流成功显示图像

[{
    "id": "c2701738.8bfcb",
    "type": "http response",
    "z": "6a1a7f76.b846d8",
    "name": "",
    "statusCode": "",
    "headers": {},
    "x": 1118.170166015625,
    "y": 3207,
    "wires": []
  },

  {
    "id": "4d34db55.ad8834",
    "type": "function",
    "z": "6a1a7f76.b846d8",
    "name": "Set Content-Type header",
    "func": "msg.headers = { \"Content-Type\":\"image/png\"};\nreturn msg;",
    "outputs": 1,
    "noerr": 0,
    "x": 882.170166015625,
    "y": 3207,
    "wires": [
      ["c2701738.8bfcb"]
    ]
  }, {
    "id": "21504cc0.71adcc",
    "type": "http in",
    "z": "6a1a7f76.b846d8",
    "name": "",
    "url": "/image1",
    "method": "get",
    "upload": false,
    "swaggerDoc": "",
    "x": 145.17022705078125,
    "y": 3206,
    "wires": [
      ["aa24fb51.7861f"]
    ]
  }, {
    "id": "aa24fb51.7861f",
    "type": "file in",
    "z": "6a1a7f76.b846d8",
    "name": "Picture Selector",
    "filename": "/home/pi/.node-red/lee.png",
    "format": "",
    "sendError": true,
    "x": 596.1702270507812,
    "y": 3207.000244140625,
    "wires": [
      ["4d34db55.ad8834"]
    ]
  }
]
我尝试使用此流来流式传输视频

[{
  "id": "47af46de.9382d8",
  "type": "http in",
  "z": "6a1a7f76.b846d8",
  "name": "",
  "url": "/video3",
  "method": "get",
  "upload": false,
  "swaggerDoc": "",
  "x": 139,
  "y": 3369,
  "wires": [
    ["9da4e018.797ce8"]
  ]
}, {
  "id": "f7318675.c876a",
  "type": "function",
  "z": "6a1a7f76.b846d8",
  "name": "Set Content-Type header",
  "func": "msg.headers = { \"Content-Type\":\"video/mp4\"};\nreturn msg;",
  "outputs": 1,
  "noerr": 0,
  "x": 869.9999389648438,
  "y": 3370,
  "wires": [
    ["2e33de98.3a55da"]
  ]
}, {
  "id": "2e33de98.3a55da",
  "type": "http response",
  "z": "6a1a7f76.b846d8",
  "name": "",
  "statusCode": "",
  "headers": {},
  "x": 1110.9999389648438,
  "y": 3371,
  "wires": []
}, {
  "id": "9da4e018.797ce8",
  "type": "file in",
  "z": "6a1a7f76.b846d8",
  "name": "Video Selector",
  "filename": "/home/pi/.node-red/1.mp4",
  "format": "stream",
  "sendError": false,
  "x": 592,
  "y": 3369.000244140625,
  "wires": [
    ["f7318675.c876a"]
  ]
}]
还有这个

[{
  "id": "28aa7076.b2c0e",
  "type": "http in",
  "z": "6a1a7f76.b846d8",
  "name": "",
  "url": "/video4",
  "method": "get",
  "upload": false,
  "swaggerDoc": "",
  "x": 145,
  "y": 3525,
  "wires": [
    ["898878ed.61ff48"]
  ]
}, {
  "id": "866daf6f.5eb068",
  "type": "http response",
  "z": "6a1a7f76.b846d8",
  "name": "",
  "statusCode": "",
  "headers": {},
  "x": 874.5,
  "y": 3528,
  "wires": []
}, {
  "id": "a1babcbf.9ecac8",
  "type": "template",
  "z": "6a1a7f76.b846d8",
  "name": "",
  "field": "payload",
  "fieldType": "msg",
  "format": "handlebars",
  "syntax": "mustache",
  "template": "<!DOCTYPE html>\n<html>\n<body>\n\n<video width=\"640\" height=\"480\" autoplay>\n  <source src=\"{{msg.payload}}\" type=\"video/mp4\">\n  Your browser does not support the video tag.\n</video>\n\n</body>\n</html>\n\n",
  "output": "str",
  "x": 732,
  "y": 3528,
  "wires": [
    ["866daf6f.5eb068"]
  ]
}, {
  "id": "898878ed.61ff48",
  "type": "file in",
  "z": "6a1a7f76.b846d8",
  "name": "videoSelector",
  "filename": "/home/pi/.node-red/1.mp4",
  "format": "stream",
  "sendError": true,
  "x": 483,
  "y": 3528,
  "wires": [
    ["a1babcbf.9ecac8"]
  ]
}]
[{
“id”:“28aa7076.b2c0e”,
“类型”:“http输入”,
“z”:“6a1a7f76.b846d8”,
“名称”:“,
“url”:“/video4”,
“方法”:“获取”,
“上传”:false,
“大摇大摆的医生”:“,
“x”:145,
“y”:3525,
“电线”:[
[“898878ed.61ff48”]
]
}, {
“id”:“866daf6f.5eb068”,
“类型”:“http响应”,
“z”:“6a1a7f76.b846d8”,
“名称”:“,
“状态代码”:“,
“标题”:{},
“x”:874.5,
“y”:3528,
“电线”:[]
}, {
“id”:“a1babcbf.9ecac8”,
“类型”:“模板”,
“z”:“6a1a7f76.b846d8”,
“名称”:“,
“字段”:“有效载荷”,
“字段类型”:“msg”,
“格式”:“把手”,
“语法”:“胡须”,
“模板”:“\n\n\n\n\n\n您的浏览器不支持视频标记。\n\n\n\n\n\n”,
“输出”:“str”,
“x”:732,
“y”:3528,
“电线”:[
[“866daf6f.5eb068”]
]
}, {
“id”:“898878ed.61ff48”,
“类型”:“文件输入”,
“z”:“6a1a7f76.b846d8”,
“名称”:“视频选择器”,
“文件名”:“/home/pi/.node red/1.mp4”,
“格式”:“流”,
“sendError”:正确,
“x”:483,
“y”:3528,
“电线”:[
[“a1babcbf.9ecac8”]
]
}]
两个视频流都会抛出一条“无响应对象”消息

提前感谢您的帮助


Mike

您不能将流模式与
http in
http response
节点一起使用,因为在此模式下,节点中的
文件会为文件的每个区块创建新消息


尝试
buffer
模式。

使用节点红色中的文件节点只会给我以下选择:单个utf8字符串、每行一条消息、单个缓冲区对象和缓冲区流。我尝试使用两个缓冲区选项。单个缓冲区对象没有任何作用。页面只是继续加载,从不停止,并且不显示任何消息。缓冲区流是给出“无响应对象”消息的流。您不能使用缓冲区流。单个缓冲区应该可以工作。视频有多大?浏览器开发工具中的“网络”选项卡显示了什么?