Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/340.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
Python无法安装github脚本(HLS服务器循环)_Python_Github_Stream_Live_Http Live Streaming - Fatal编程技术网

Python无法安装github脚本(HLS服务器循环)

Python无法安装github脚本(HLS服务器循环),python,github,stream,live,http-live-streaming,Python,Github,Stream,Live,Http Live Streaming,我的目标是安装一个HLS服务器来流式传输实时视频。 所以我找到了这个脚本。 但是我的安装失败了。 我使用的是Linux Ubuntu 14.04 apt get install python dev->一切正常 pip安装烧瓶->没问题 python hls-loop.py->ERROR python:无法打开文件“hls loop.py”:[Errno 2]没有这样的文件或目录 我还找到了这个包https://github.com/dayvson/hls-endless 但构建也会失败: 如果

我的目标是安装一个HLS服务器来流式传输实时视频。 所以我找到了这个脚本。 但是我的安装失败了。 我使用的是Linux Ubuntu 14.04

apt get install python dev->一切正常

pip安装烧瓶->没问题

python hls-loop.py->ERROR python:无法打开文件“hls loop.py”:[Errno 2]没有这样的文件或目录

我还找到了这个包https://github.com/dayvson/hls-endless 但构建也会失败: 如果您找到另一个脚本来安装HLS live stream server,我将不胜感激


Thx

您将需要git克隆https://github.com/jbochi/hls-loop,然后是cd hls loop,然后您可以在使用以下命令将存储库克隆到本地目录后运行python hls loop.py.

git clone https://github.com/jbochi/hls-loop.git
您的目录结构将类似于:

| - <current_dir> /
|   | -- hls-loop /
|   |    | -- hls-loop.py
|   |    | -- ...
如果需要,您可以为此创建修复程序,这样无论从何处运行应用程序,您都可以执行以下操作:

import os


def read_file_durations():
    basedir = os.path.abspath(os.path.dirname(__name__))
    file_durations = os.path.join(basedir, "static/bipbop_4x3/gear1/prog_index.m3u8")
    with open(file_durations) as f:
       ...

希望这能为你澄清一些事情

我认为您已经混合了第一个脚本hls循环和hls无尽。同样的错误,我不知道pip install flask命令在哪里安装脚本
import os


def read_file_durations():
    basedir = os.path.abspath(os.path.dirname(__name__))
    file_durations = os.path.join(basedir, "static/bipbop_4x3/gear1/prog_index.m3u8")
    with open(file_durations) as f:
       ...