Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/video/2.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
Ios HTTP直播服务,如LiveStream/Ustream/Twitch/Youtube Live_Ios_Video_Video Streaming_Http Live Streaming_Live Streaming - Fatal编程技术网

Ios HTTP直播服务,如LiveStream/Ustream/Twitch/Youtube Live

Ios HTTP直播服务,如LiveStream/Ustream/Twitch/Youtube Live,ios,video,video-streaming,http-live-streaming,live-streaming,Ios,Video,Video Streaming,Http Live Streaming,Live Streaming,我是新来的直播,很难为初学者找到好的信息。除了苹果的文档,还有谁能向HLS推荐资源吗 我正在尝试制作一个类似LiveStream的应用程序,在这个应用程序中,视频可以实时广播给多个用户 我遇到过一些服务,如encoding.com、heywatchencoding.com和wowza,但我对每个平台提供的文档有困难,因为每个平台的文档似乎都是面向中级/有经验的用户的 创建像LiveStream/Ustream/Twitch/Youtube live这样更简单的网站有多困难?我试图从简单的ios设

我是新来的直播,很难为初学者找到好的信息。除了苹果的文档,还有谁能向HLS推荐资源吗

我正在尝试制作一个类似LiveStream的应用程序,在这个应用程序中,视频可以实时广播给多个用户

我遇到过一些服务,如encoding.com、heywatchencoding.com和wowza,但我对每个平台提供的文档有困难,因为每个平台的文档似乎都是面向中级/有经验的用户的

创建像LiveStream/Ustream/Twitch/Youtube live这样更简单的网站有多困难?我试图从简单的ios设备和网络开始,但寻找在线资源比较困难。任何提示都是有用的

顺便问一下,你们中有人知道我是否可以将wowza与Parse.com服务一起使用吗


感谢

这里有一个非常简单的Node.js媒体服务器,它启动了一个HTTP服务器,将大多数视频或音频格式的文件从服务器传输到浏览器。一旦安装了nodejs,只需执行

node file_containing_below_code.js
然后将浏览器指向URL

http://localhost:8888/
您的浏览器已经烘焙了一个用于正向/反向的滑块小部件,它会自动将流量发送回该服务器,以作出相应的响应

享受。。。顺便说一句,不需要医生,只需指点射击即可

var http = require('http'),
    fs = require('fs'),
    util = require('util');


var path = "/path/to/audio/or/video/file/local/to/server/cool.mp4"; // put any audio or video file here


var port = 8888;
var host = "localhost";

http.createServer(function (req, res) {

  var stat = fs.statSync(path);
  var total = stat.size;

  if (req.headers.range) {   // meaning client (browser) has moved the forward/back slider
                                         // which has sent this request back to this server logic ... cool
    var range = req.headers.range;
    var parts = range.replace(/bytes=/, "").split("-");
    var partialstart = parts[0];
    var partialend = parts[1];

    var start = parseInt(partialstart, 10);
    var end = partialend ? parseInt(partialend, 10) : total-1;
    var chunksize = (end-start)+1;
    console.log('RANGE: ' + start + ' - ' + end + ' = ' + chunksize);

    var file = fs.createReadStream(path, {start: start, end: end});
    res.writeHead(206, { 'Content-Range': 'bytes ' + start + '-' + end + '/' + total, 'Accept-Ranges': 'bytes', 'Content-Length': chunksize, 'Content-Type': 'video/mp4' });
    file.pipe(res);

  } else {

    console.log('ALL: ' + total);
    res.writeHead(200, { 'Content-Length': total, 'Content-Type': 'video/mp4' });
    fs.createReadStream(path).pipe(res);
  }
}).listen(port, host);

console.log("Server running at http://" + host + ":" + port + "/");