Total Pageviews

Friday, 9 June 2017

peerflix-server,流媒体的torrent客户端

支持边下载,边播放,我就喜欢这一点。)
Streaming torrent client for Node.js with web ui. 

NPM Version NPM Downloads Node.js Version
Build Status

Usage

  1. npm install -g peerflix-server
  2. peerflix-server
  3. Open your browser at http://localhost:9000/
  4. Enjoy!

Configuration

You can configure the application using ~/.config/peerflix-server/config.json file (doesn't exist by default). The options are passed to all torrent-stream instances. Here's an example that overrides the defaults:
{
  "connections": 50,
  "tmp": "/mnt/torrents"
}
You can also change the default port by setting PORT environment variable:
PORT=1234 peerflix-server

# or on windows
SET PORT=1234
peerflix-server
The application stores its current state (list of torrents) in ~/.config/peerflix-server/torrents.json

Daemon

If you want to run peerflix-server as a daemon, you can do it using forever:
npm install -g forever
forever start $(which peerflix-server)
You might also want to enable logging -- see the docs.
 (我的情形:
root@localhost:~# which peerflix-server
/root/.nvm/versions/node/v6.9.0/bin/peerflix-server
root@localhost:~# forever start /root/.nvm/versions/node/v6.9.0/bin/peerflix-server  )

FAQ

How do I add password protection?

Development

See Development.md

REST API

See REST.md

Docker

See Docker.md

from https://github.com/asapach/peerflix-server
-----------

peerflix-server的docker版

docker pull asapach/peerflix-server

from https://hub.docker.com/r/asapach/peerflix-server/
https://hub.docker.com/r/asapach/peerflix-server/~/dockerfile/

镜像:docker pull  fish/peerflix-server
端口:9000 TCP

---------------

peerflix
Streaming torrent client for Node.js

npm install -g peerflix
build status

Usage

Peerflix can be used with a magnet link or a torrent file. To stream a video with its magnet link use the following command.
peerflix "magnet:?xt=urn:btih:ef330b39f4801d25b4245212e75a38634bfc856e" --vlc
Remember to put " around your magnet link since they usually contain &. peerflix will print a terminal interface. The first line contains an address to a http server. The --vlc flag ensures vlc is opened when the torrent is ready to stream.
peerflix
To stream music with a torrent file use the following command.
peerflix "http://some-torrent/music.torrent" -a --vlc
The -a flag ensures that all files in the music repository are played with vlc. Otherwise if the torrent contains multiple files, peerflix will choose the biggest one. To get a full list of available options run peerflix with the help flag.
peerflix --help
Examples of usage of could be
peerflix magnet-link --list # Select from a list of files to download
peerflix magnet-link --vlc -- --fullscreen # will pass --fullscreen to vlc
peerflix magnet-link --mplayer --subtitles subtitle-file.srt # play in mplayer with subtitles
peerflix magnet-link --connection 200 # set max connection to 200

Programmatic usage

If you want to build your own app using streaming bittorent in Node you should checkout torrent-stream

Chromebook users

Chromebooks are set to refuse all incoming connections by default - to change this:
sudo iptables -P INPUT ACCEPT

Chromecast

If you wanna use peerflix on your chromecast checkout peercast or castnow.

from https://github.com/mafintosh/peerflix
-----------

demo : https://peerflix.arukascloud.io/#/

No comments:

Post a Comment