Git Product home page Git Product logo

webtorrent-cli's Introduction


WebTorrent
WebTorrent

The streaming torrent client. For node.js and the web.

discord ci npm version npm downloads Standard - JavaScript Style Guide

Sponsored by    Socket - JavaScript open source supply chain security    Wormhole

WebTorrent is a streaming torrent client for node.js and the browser. YEP, THAT'S RIGHT. THE BROWSER. It's written completely in JavaScript – the language of the web – so the same code works in both runtimes.

In node.js, this module is a simple torrent client, using TCP and UDP to talk to other torrent clients.

In the browser, WebTorrent uses WebRTC (data channels) for peer-to-peer transport. It can be used without browser plugins, extensions, or installations. It's Just JavaScript™. Note: WebTorrent does not support UDP/TCP peers in browser.

Simply include the webtorrent.min.js script on your page to start fetching files over WebRTC using the BitTorrent protocol, or import WebTorrent from 'webtorrent' with browserify or webpack. See demo apps and code examples below.

jsdelivr download count

To make BitTorrent work over WebRTC (which is the only P2P transport that works on the web) we made some protocol changes. Therefore, a browser-based WebTorrent client or "web peer" can only connect to other clients that support WebTorrent/WebRTC.

To seed files to web peers, use a client that supports WebTorrent, e.g. WebTorrent Desktop, a desktop client with a familiar UI that can connect to web peers, webtorrent-hybrid, a command line program, or Instant.io, a website. Established torrent clients like Vuze have already added WebTorrent support so they can connect to both normal and web peers. We hope other clients will follow.

Network

Features

  • Torrent client for node.js & the browser (same npm package!)
  • Insanely fast
  • Download multiple torrents simultaneously, efficiently
  • Pure Javascript (no native dependencies)
  • Exposes files as streams
    • Fetches pieces from the network on-demand so seeking is supported (even before torrent is finished)
    • Seamlessly switches between sequential and rarest-first piece selection strategy
  • Supports advanced torrent client features
  • Comprehensive test suite (runs completely offline, so it's reliable and fast)
  • Check all the supported BEPs here

Browser/WebRTC environment features

  • WebRTC data channels for lightweight peer-to-peer communication with no plugins
  • No silos. WebTorrent is a P2P network for the entire web. WebTorrent clients running on one domain can connect to clients on any other domain.
  • Stream video torrents into a <video> tag (webm, mkv, mp4, ogv, mov, etc (AV1, H264, HEVC*, VP8, VP9, AAC, FLAC, MP3, OPUS, Vorbis, etc))
  • Supports Chrome, Firefox, Opera and Safari.

Install

To install WebTorrent for use in node or the browser with import WebTorrent from 'webtorrent', run:

npm install webtorrent

To install a webtorrent command line program, run:

npm install webtorrent-cli -g

To install a WebTorrent desktop application for Mac, Windows, or Linux, see WebTorrent Desktop.

Ways to help

Who is using WebTorrent today?

Lots of folks!

WebTorrent API Documentation

Read the full API Documentation.

Usage

WebTorrent is the first BitTorrent client that works in the browser, using open web standards (no plugins, just HTML5 and WebRTC)! It's easy to get started!

In the browser

Downloading a file is simple:
import WebTorrent from 'webtorrent'

const client = new WebTorrent()
const magnetURI = '...'

client.add(magnetURI, torrent => {
  // Got torrent metadata!
  console.log('Client is downloading:', torrent.infoHash)

  for (const file of torrent.files) {
    document.body.append(file.name)
  }
})
Seeding a file is simple, too:
import dragDrop from 'drag-drop'
import WebTorrent from 'webtorrent'

const client = new WebTorrent()

// When user drops files on the browser, create a new torrent and start seeding it!
dragDrop('body', files => {
  client.seed(files, torrent => {
    console.log('Client is seeding:', torrent.infoHash)
  })
})

There are more examples in docs/get-started.md.

Browserify

WebTorrent works great with browserify, an npm package that lets you use node-style require() to organize your browser code and load modules installed by npm (as seen in the previous examples).

Webpack

WebTorrent also works with webpack, another module bundler. However, webpack requires extra configuration which you can find in the webpack bundle config used by webtorrent.

Or, you can just use the pre-built version via import WebTorrent from 'webtorrent/dist/webtorrent.min.js' and skip the webpack configuration.

Script tag

WebTorrent is also available as a standalone script (webtorrent.min.js) which exposes WebTorrent on the window object, so it can be used with just a script tag:

<script type='module'>
  import WebTorrent from 'webtorrent.min.js'
</script>

The WebTorrent script is also hosted on fast, reliable CDN infrastructure (Cloudflare and MaxCDN) for easy inclusion on your site:

<script type='module'>
  import WebTorrent from 'https://esm.sh/webtorrent'
</script>
Chrome App

If you want to use WebTorrent in a Chrome App, you can include the following script:

<script type='module'>
  import WebTorrent from 'webtorrent.chromeapp.js'
</script>

Be sure to enable the chrome.sockets.udp and chrome.sockets.tcp permissions!

In Node.js

WebTorrent also works in node.js, using the same npm package! It's mad science!

NOTE: To connect to "web peers" (browsers) in addition to normal BitTorrent peers, use webtorrent-hybrid which includes WebRTC support for node.

As a command line app

WebTorrent is also available as a command line app. Here's how to use it:

$ npm install webtorrent-cli -g
$ webtorrent --help

To download a torrent:

$ webtorrent magnet_uri

To stream a torrent to a device like AirPlay or Chromecast, just pass a flag:

$ webtorrent magnet_uri --airplay

There are many supported streaming options:

--airplay               Apple TV
--chromecast            Chromecast
--mplayer               MPlayer
--mpv                   MPV
--omx [jack]            omx [default: hdmi]
--vlc                   VLC
--xbmc                  XBMC
--stdout                standard out [implies --quiet]

In addition to magnet uris, WebTorrent supports many ways to specify a torrent.

Talks about WebTorrent

Modules

Most of the active development is happening inside of small npm packages which are used by WebTorrent.

The Node Way™

"When applications are done well, they are just the really application-specific, brackish residue that can't be so easily abstracted away. All the nice, reusable components sublimate away onto github and npm where everybody can collaborate to advance the commons." — substack from "how I write modules"

node.js is shiny

Modules

These are the main modules that make up WebTorrent:

module tests version description
webtorrent torrent client (this module)
bittorrent-dht distributed hash table client
bittorrent-peerid identify client name/version
bittorrent-protocol bittorrent protocol stream
bittorrent-tracker bittorrent tracker server/client
bittorrent-lsd bittorrent local service discovery
create-torrent create .torrent files
magnet-uri parse magnet uris
parse-torrent parse torrent identifiers
torrent-discovery find peers via dht, tracker, and lsd
ut_metadata metadata for magnet uris (protocol extension)
ut_pex peer discovery (protocol extension)

Enable debug logs

In node, enable debug logs by setting the DEBUG environment variable to the name of the module you want to debug (e.g. bittorrent-protocol, or * to print all logs).

DEBUG=* webtorrent

In the browser, enable debug logs by running this in the developer console:

localStorage.setItem('debug', '*')

Disable by running this:

localStorage.removeItem('debug')

License

MIT. Copyright (c) Feross Aboukhadijeh and WebTorrent, LLC.

webtorrent-cli's People

Contributors

allanlw avatar alxhotel avatar astro avatar cagriulas avatar cybershadow avatar diegorbaquero avatar fabiospampinato avatar feross avatar gillesdemey avatar greenkeeper[bot] avatar grunjol avatar iovis avatar jashandeep-sohi avatar josephfrazier avatar ksnikiforov avatar osmanaltun avatar pandres95 avatar renovate-bot avatar renovate[bot] avatar rohithill avatar rom1504 avatar semantic-release-bot avatar silentbot1 avatar sindresorhus avatar sitebase avatar solderzzc avatar transitive-bullshit avatar utlime avatar valeriangalliat avatar vrde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

webtorrent-cli's Issues

Add equivalent of peerflix's --no-quit option

Peerflix has this option:

  -n, --no-quit      do not quit peerflix on vlc exit             

This is useful when e.g. used with the --mpv switch, and the user needs to restart mpv to apply a configuration file change.

Error: stderr maxBuffer exceeded

After streaming a torrent to mpv for a few minutes, webtorrent-cli crashes with the following output:

... and 44 more
Error: stderr maxBuffer exceeded

UNEXPECTED ERROR: If this is a bug in WebTorrent, report it!
OPEN AN ISSUE: https://github.com/webtorrent/webtorrent-cli/issues

DEBUG INFO: webtorrent-cli 1.10.1, webtorrent 0.98.18, node v8.3.0, linux x64, exit 1

The invocation:

webtorrent -t --keep-seeding --no-quit --not-on-top --mpv --out "$PWD" 'magnet:...'

An in-range update of webtorrent is breaking the build 🚨

Version 0.98.23 of webtorrent was just published.

Branch Build failing 🚨
Dependency webtorrent
Current Version 0.98.21
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

webtorrent is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 28 commits.

  • ebd4fdb build
  • 6e7d5d8 authors
  • 1317158 0.98.23
  • f685c0b Merge pull request #1304 from webtorrent/greenkeeper/bitfield-2.0.0
  • 0921e24 Merge pull request #1305 from pldubouilh/add-live-torrent-faq
  • 45e5c01 Add live-torrent to FAQ
  • 84b2169 fix(package): update bitfield to version 2.0.0
  • bc6f1cd Merge pull request #1294 from webtorrent/add-jsdelivr-badge
  • c29e02c standard
  • b89afaa Merge pull request #1299 from deadblackclover/master
  • e7db463 build
  • eb87114 0.98.22
  • 652dab4 authors
  • dd35087 torrent-discovery@^8.3.1
  • 2fece42 Update faq.md

There are 28 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

UNEXPECTED ERROR

~$ webtorrent download [REDACTED]
Error: not a number: buffer[0] = 60

UNEXPECTED ERROR: If this is a bug in WebTorrent, report it!
OPEN AN ISSUE: https://github.com/webtorrent/webtorrent-cli/issues

DEBUG INFO: webtorrent-cli 1.11.0, webtorrent 0.98.20, node v9.2.1, linux x64, exit 1
I don't understand. Why doesn't work ?

where can i find the cache file ?

Thanks webtorrent-cli, but when i Download so many torrent, It seems store so much cache file in my mac, where can i find them and delete?

Playlist

Would it be possible to get playlist support for torrents with multiple video files?

option --out isn't consitent across subcommands

The help says --out is a path. However only the subcommand download expect the option's value to be a path, create and info assume it's a file.

It can cause some errors:

webtorrent-cli info sintel.torrent --out ./

UNEXPECTED ERROR: If this is a bug in WebTorrent, report it!
OPEN AN ISSUE: https://github.com/webtorrent/webtorrent-cli/issues

DEBUG INFO: webtorrent-cli 1.11.1, webtorrent 0.99.4, node v6.14.3, linux x64, exit 1
fs.js:642
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: EISDIR: illegal operation on a directory, open '/home/bricewge/tmp'
    at Error (native)

DLNA Subtitles

I'd need to add a path to the server created here to serve the subtitles via DLNA.

At the moment the server only admits requests to / and /[number] and obviously this would be needed in rare occasions so maybe we could add a method to add a path or something like that?

DLNA Support

I made some advances on DLNA streaming on my own a while ago and I even use it in a fork I did from peerflix for my content discovery tool, peerflixrb. The idea is easier to follow in a little script I made called dlnast.

Disclaimer: I'm probably a terrible node developer and I have a very little understanding of DLNA, expect weird things.

The gist of it would be reusing the server to serve the content and subtitles and use something like nodecast-js and upnp-mediarenderer-client to discover clients and send them the content.

It works for LG TVs, at least the two I tested it with. Can't say anything about other brands nor what happens when there's more than one smart TV.

Thoughts?

Add IINA support

IINA is getting a lot of traction recently.

It would be nice to have an option for streaming to it.

It also supports Picture in Picture which I think is not supported by VLC.

cli doesn't seem to support WebRTC

It doesn't seem to connect to peers on the web. I've tried the same thing with the desktop application and it works perfectly fine, so it's nothing to do with my network. I'm using the latest version (1.6.0 (0.97.1)) and latest node LTS version 6.9.1

Buffer.alloc is not a function on ubuntu 16.04

cant run webtorrent on ubuntu 16.04

root@vps383796:/home# webtorrent xyz
/usr/local/lib/node_modules/webtorrent-cli/node_modules/parse-torrent/index.js:110
;(function () { Buffer.alloc(0) })()
                       ^

TypeError: Buffer.alloc is not a function
    at /usr/local/lib/node_modules/webtorrent-cli/node_modules/parse-torrent/index.js:110:24
    at Object.<anonymous> (/usr/local/lib/node_modules/webtorrent-cli/node_modules/parse-torrent/index.js:110:35)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/webtorrent-cli/bin/cmd.js:16:20)
    at Module._compile (module.js:410:26)

                       ^

Detect portable VLC

It seems that in Windows platform, WebTorrent gets the VLC path from the registry. Is there any way to make it work if I add the VLC location to the environment variable 'PATH'?

I actually don't want to install VLC. I just want to use the portable VLC.

Airplay Subtitles

I cannot get subtitles to work on my Apple TV.
I've tried srt, vtt, and i get nothing.

Thanks

How can i seed downloaded filed for instant.io using webtorrent-cli

ubuntu 16.04 / nodejs 8 / webtorrent cli

i download a movie file via bittorrent seeding file
using below command line

webtorrent "magnet:?xt=urn:btih:0f7bc8453d143159220d691e92ffbe7b81c0fdc0" --keep-seeding --quiet

webtorrent is seeding 46255 port and it open.

file download complete but instant.io can't download and stream video from magnet:?xt=urn:btih:0f7bc8453d143159220d691e92ffbe7b81c0fdc0

what can i do for stream video?

usage for seeding lots of torrent files

I have a lot of .torrent files in ./torrents/todo

i want the files to download and save to ./torrents/done and keep seeding.

how do I do this?

I tried webtorrent-hybrid seed ./todo/ -o ./done/ --keep-seeding but it looks like its only seeding one file with no progress. Also what ports do I need to allow?

UNEXPECTED ERROR

Attempting to open a file using --chromecast or --vlc so far generates this error.

Error: not a number: buffer[0] = 26

UNEXPECTED ERROR: If this is a bug in WebTorrent, report it!
OPEN AN ISSUE: https://github.com/webtorrent/webtorrent-cli/issues

DEBUG INFO: webtorrent-cli 1.11.0, webtorrent 0.98.20, node v9.3.0, linux x64, exit 1

UNEXPECTED ERROR: If this is a bug in WebTorrent, report it!

webtorrent is exiting...
Select a file to download:

To select a specific file, re-run webtorrent with "--select [index]"
Example: webtorrent download "magnet:..." --select 0

webtorrent is exiting...

UNEXPECTED ERROR: If this is a bug in WebTorrent, report it!
OPEN AN ISSUE: https://github.com/webtorrent/webtorrent-cli/issues

DEBUG INFO: webtorrent-cli 1.11.0, webtorrent 0.98.20, node v9.2.1, win32 ia32, exit
1
D:\apps\node-v9.2.1-win-x86\node_modules\webtorrent-cli\node_modules\webtorrent\index
.js:407
if (this.destroyed) throw new Error('client already destroyed')
^

Error: client already destroyed
at WebTorrent.destroy (D:\apps\node-v9.2.1-win-x86\node_modules\webtorrent-cli\no
de_modules\webtorrent\index.js:407:29)
at gracefulExit (D:\apps\node-v9.2.1-win-x86\node_modules\webtorrent-cli\bin\cmd.
js:703:10)
at Torrent.onReady (D:\apps\node-v9.2.1-win-x86\node_modules\webtorrent-cli\bin\c
md.js:417:14)
at Object.onceWrapper (events.js:254:19)
at Torrent.emit (events.js:164:20)
at Torrent._onStore (D:\apps\node-v9.2.1-win-x86\node_modules\webtorrent-cli\node
_modules\webtorrent\lib\torrent.js:631:8)
at D:\apps\node-v9.2.1-win-x86\node_modules\webtorrent-cli\node_modules\webtorren
t\lib\torrent.js:612:10
at end (D:\apps\node-v9.2.1-win-x86\node_modules\webtorrent-cli\node_modules\run-
parallel-limit\index.js:17:15)
at done (D:\apps\node-v9.2.1-win-x86\node_modules\webtorrent-cli\node_modules\run
-parallel-limit\index.js:21:10)
at each (D:\apps\node-v9.2.1-win-x86\node_modules\webtorrent-cli\node_modules\run
-parallel-limit\index.js:28:7)

An in-range update of standard is breaking the build 🚨

Version 11.0.0 of standard was just published.

Branch Build failing 🚨
Dependency standard
Current Version 10.0.3
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

standard is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 50 commits.

There are 50 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

verbose CLI references non-existent property 'numQueued'

In verbose mode, the CLI references numQueued property which does not exist. This used to work, but broke with webtorrent version v0.97.2 (see this commit), as the property was renamed to _numQueued.

Either this property should be referenced even though it's "private", or this section of the display should be removed. Happy to submit a PR either way, but seems more like a design decision with respect to package coupling, so decided to file a bug for discussion instead.

New release

It's been a while since we release a new version and there's been some meaningful changes since our latest one.

Cannot seed torrent created from folder with webtorrent cli

This issue is related to and run on the same setup as:
webtorrent/webtorrent#1417

Here I created a simple example with a single 50MB file in ~/Downloads/test_dataset/file.h5f

I then ran:
webtorrent create ~/Downloads/test_dataset/ --private -o ~/Downloads/test_dataset.torrent

This appeared to create the torrent file successfully.

I then tried

  1. webtorrent seed test_dataset.torrent
  2. webtorrent seed ~/Downloads/test_dataset
  3. webtorrent seed ~/Downloads/test_dataset.torrent

I also copied the test_dataset.torrent file into ~/Downloads/test_dataset switched to the test_dataset directory, and ran
4. webtorrent seed test_dataset.torrent

None of these allowed the torrent to appear on another machine, and all but 2 indicated 0/50MB was downloaded.

  1. cd ~/Downloads && webtorrent seed test_dataset.torrent resulted in the following:

torrent downloaded successfully from 0/0 peers in 0s!

webtorrent is exiting...

Not ideal when I'm trying to seed!

The following command appeared to actually start seeding:
6. cd ~/Downloads && webtorrent seed test_dataset.torrent --keep-seeding

I then saw the following output:

Seeding: test_dataset
Info hash: [hash edited out]
Server running at: http://localhost:8000/0
Downloading to: ~/Downloads
Speed: 0 B/s  Downloaded: 50 MB/50 MB  Uploaded: 0 B
Running time: 6 minutes  Time remaining: N/A  Peers: 0/0

However when I copied the torrent file to another machine on the same network and ran webtorrent download test_dataset.torrent no other seeders could be found.

I'm at a university so there may be blocking going on, but I was able to download and watch the video on https://webtorrent.io/ which is why I decided to give webtorrent a try, then ran into the issues above without much error feedback.

Seed multiple files at once

Hi, I'm using webtorrent-hybrid on a headless server to seed multiple files. I'm seeding each file in its own screen (as the CLI can only seed one file at a time) and with 5+ files I find myself constantly switching screens to control seeding of each file. It would be awesome if I could pass an array of files to the CLI as a param. Thanks a lot!

An in-range update of tape is breaking the build 🚨

Version 4.9.0 of tape was just published.

Branch Build failing 🚨
Dependency tape
Current Version 4.8.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

tape is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 27 commits.

  • ea6d91e v4.9.0
  • 6867840 [Deps] update object-inspect, resolve
  • 4919e40 [Tests] on node v9; use nvm install-latest-npm
  • f26375c Merge pull request #420 from inadarei/global-depth-env-var
  • 17276d7 [New] use process.env.NODE_TAPE_OBJECT_PRINT_DEPTH for the default object print depth.
  • 0e870c6 Merge pull request #408 from johnhenry/feature/on-failure
  • 00aa133 Add "onFinish" listener to test harness.
  • 0e68b2d [Dev Deps] update js-yaml
  • 10b7dcd [Fix] fix stack where actual is falsy
  • 13173a5 Merge pull request #402 from nhamer/stack_strip
  • f90e487 normalize path separators in stacks
  • b66f8f8 [Deps] update function-bind
  • cc69501 Merge pull request #387 from fongandrew/master
  • bf5a750 Handle spaces in path name for setting file, line no
  • 3c2087a Test name with spaces

There are 27 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Using quite alot memory, says "Possible EventEmitter memory leak detected"

Hello,

it is around 2 weeks i am trying to seed a torrent using webtorrent-cli

webtorrent --keep-seeding --verbose seed "magnet:?xt=urn:btih:HashHere&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&tr=wss%3A%2F%2Ftracker.webtorrent.io"

and it happened 2 times already that after a few days of the Webtorrent process runtime, it start using 90%+ memory on my 512MB RAM VPS.

Here is how RAM usage looks like when the process is running: https://snag.gy/lk6A1w.jpg

The process is running inside Linux "screen":

root 6339 0.0 0.0 21920 96 ? Ss 2017 0:00 SCREEN
root 6343 0.0 0.0 11444 64 pts/2 Ss 2017 0:00 _ /bin/bash
root 20140 0.6 86.3 1814328 452588 pts/2 Sl+ Jan04 59:46 _ WebTorrent

Also this is what appears as a result of webtorrent command runtime, during high memory usage:
(node:20140) Warning: Possible EventEmitter memory leak detected. 11 ready listeners added. Use emitter.setMaxListeners() to increase limit

It may be problem that OpenVZ virtualization do not allocate guaranteed memory but shared memory resources, i do not know, but maybe Webtorrent-cli can be made so this issue can be prevented?

The OS is CentOS 6.9 64bit, 2.6.32-042stab125.3

Can don't download files through magnet link

The new webtorrent-cli version can't download files through magnet link.

The terminal show can't connect peer node.

fetching torrent metadata from 0 peers

but the webtorrent-desktop app work fine. I guess the new version has some issues.

system info:
OS: Mac OS 10.13

and how to uninstall webtorrent-cli on mac?

fetching torrent metadata from 2 peers

What version of WebTorrent Desktop? (See the 'About WebTorrent' menu)
webtorrent-cli 1.2.3, webtorrent 0.95.2

What operating system and version?
CentOS 6.x

What did you do?
Linux command: webtorrent download "magnetlinkhere" --verbose

What did you expect to happen?
Download complete

What actually happened?
it just print: fetching torrent metadata from 2 peers
and nothing

Is there any log or more verbosity? I see no log path when i do command: webtorrent --help and cant find nothing in /var/log

RangeError: offset out of bounds

UNEXPECTED ERROR: If this is a bug in WebTorrent, report it!
OPEN AN ISSUE: https://github.com/webtorrent/webtorrent-cli/issues

DEBUG INFO: webtorrent-cli 1.10.1, webtorrent 0.98.18, node v8.3.0, linux x64, exit 1
fs.js:708
    return binding.writeBuffer(fd, buffer, offset, length, position, req);
                   ^

RangeError: offset out of bounds
    at Object.fs.write (fs.js:708:20)
    at onwrite (/home/vladimir/.npm-packages/lib/node_modules/webtorrent-cli/node_modules/random-access-file/index.js:187:8)
    at FSReqWrap.wrapper [as oncomplete] (fs.js:691:5)

Torrent is [REDACTED]

Crash occurred while playing file 0 with mpv.

Streaming to omx can't quit player

Using a raspberry pi 2 with raspbian jessie, I run webtorrent --omx=hdmi "some magnet link". The stream looks OK but I can't quit the application neither kill it because is in full screen mode.

Cant stream to Chromecast

When i try to stream to chromecast, i get: getaddrinfo ENOTFOUND e98e8263-c4ea-48f4-3c10-873dce91fc3e.local e98e8263-48f4-3c10-873dce91fc3e.local:8009, any solution? Streaming from the desktop version works fine, but im working on a node app and I need the cli version

Seeding won't work

on seeding:

Seeding: localhost.sql
Info hash: e37a3144c5f5c31534d55209fc1a100aee820adf
Speed: 0 B/s  Downloaded: 17 KB/17 KB  Uploaded: 0 B
Running time: 222 seconds  Time remaining: N/A  Peers: 0/0

on trying to download the same:

webtorrent download e37a3144c5f5c31534d55209fc1a100aee820adf
fetching torrent metadata from 0 peers

on same machine as well as different machines.

An in-range update of webtorrent is breaking the build 🚨

The dependency webtorrent was updated from 0.102.4 to 0.103.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

webtorrent is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 20 commits.

  • e5c1603 build
  • c28ac18 0.103.0
  • 2f844aa merge
  • 5c120ec Update dependencies
  • c32790d Merge pull request #1398 from KayleePop/seed-verify
  • 0b2ddda Merge pull request #1541 from tnoevry/master
  • d9f5f1d Merge pull request #1540 from tnoevry/patch-1
  • 1134892 Update AUTHORS.md
  • e87a390 Update faq.md
  • 96cd0fb Merge pull request #1523 from webtorrent/greenkeeper/electron-3.0.2
  • d058d82 Merge pull request #1514 from webtorrent/greenkeeper/babel-minify-0.5.0
  • e9b209c Merge pull request #1513 from Chocobozzz/patch-3
  • fe89037 chore(package): update electron to version 3.0.2
  • 5b7c5ee Use a update wire wrapper instead
  • bd61851 chore(package): update babel-minify to version 0.5.0

There are 20 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of mime is breaking the build 🚨

The dependency mime was updated from 2.3.1 to 2.4.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

mime is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 7 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

webtorrent command fails with "Cannot read property 'toString' of undefined"

When trying to download Open Office via its magnet link, the operation fails as follows.

Link: https://www.openoffice.org/distribution/p2p/magnet.html
Example:

webtorrent -o ~/Downloads magnet:?xt=urn:sha1:a95f45d3913b748fa91e4bb00799d69a55e063ee&dn=OOo_2.1.0_Solarisx86_install_en-US.tar.gz&xs=http://mirror.switch.ch/ftp/mirror/OpenOffice/stable/2.1.0/OOo_2.1.0_Solarisx86_install_en-US.tar.gz

Output:

UNEXPECTED ERROR: If this is a bug in WebTorrent, report it!
OPEN AN ISSUE: https://github.com/webtorrent/webtorrent-cli/issues

DEBUG INFO: webtorrent-cli 1.11.0, webtorrent 0.98.24, node v8.10.0, darwin x64, exit 1
/Users/iadar/.nvm/versions/node/v8.10.0/lib/node_modules/webtorrent-cli/node_modules/webtorrent/lib/torrent.js:229
    self._debugId = parsedTorrent.infoHash.toString('hex').substring(0, 7)
                                           ^

TypeError: Cannot read property 'toString' of undefined
    at Torrent._onTorrentId (/Users/iadar/.nvm/versions/node/v8.10.0/lib/node_modules/webtorrent-cli/node_modules/webtorrent/lib/torrent.js:229:44)
    at new Torrent (/Users/iadar/.nvm/versions/node/v8.10.0/lib/node_modules/webtorrent-cli/node_modules/webtorrent/lib/torrent.js:124:32)
    at WebTorrent.add (/Users/iadar/.nvm/versions/node/v8.10.0/lib/node_modules/webtorrent-cli/node_modules/webtorrent/index.js:260:17)
    at runDownload (/Users/iadar/.nvm/versions/node/v8.10.0/lib/node_modules/webtorrent-cli/bin/cmd.js:344:24)
    at /Users/iadar/.nvm/versions/node/v8.10.0/lib/node_modules/webtorrent-cli/bin/cmd.js:198:5
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/Users/iadar/.nvm/versions/node/v8.10.0/lib/node_modules/webtorrent-cli/bin/cmd.js:197:14)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)

on-done script not executing and process hangs

Hello guys, I have several magnet links I want to download at once so and in order to have them download in the background I've decided to run the webtorrent-cli command as a pm2 job. I have a simple shell script with the following webtorrent download $1 --on-done ../scripts/downloadFinished.js where download finished is basically this

`var execSync = require("child-process").execSync;
var cmd = "curl " + options;

var stdout = execSync(cmd);

console.log(stdout);`

The problem is that I am not seeing any output from the script and most importantly the script seems to not be executing at all since the curl request isn't going through while it executes just fine on its own. The other thing is that the torrent will download fine but the webtorrent job hangs with the message
webtorrent is exiting... but it never actually exits and that happens whether or not I pass it the on-done option. I've also tried passing a shell script that executes node passing it the actual script to execute, and that doesnt work either.

webtorrent --version : 1.10.1 (0.98.19)

RFE | add automatic --subtitles-search -S

webtorrent-cli is pure awesomeness! It has mostly replaced popcorntime for me! One feature I'm sorely missing however, is searching online resources for subtitles automatically and using them. So ideally the behavior is:
• If a subtitles file is found inside the torrent, it should be used
• If not, an automatic search for subtitles will be done. Some tools claim to perform a fingerprint (hash) of the movie so that it accurately finds subtitles!

  • If multiple subtitles are found, it would be awesome to flip through them via a hot-key (while playback is happening)

Thanks!

Chromecast controls?

Is there anyway to control the stream pause/play when going to a chrome cast?

Passing `--chromecast` plays to every chromecast on the network

Feature proposal

When you pass the --chromecast flag, it currently queries and plays to all chromecast on the network.

It would be nice to allow to pass the name of a chromecast device on the network and play to a specific one.

Is this a piece of work that would be welcomed?

Show hashing progress

When resuming a download of a large torrent, there is no progress indication for rehashing already-downloaded content. This is the only output:

(node:17893) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ready listeners added. Use emitter.setMaxListeners() to increase limit

How to download individual file by using webtorrent cli ?

I want to download a file from a torrent, but by default webtorrent cli download the whole files when running. How do I download a specified file by using webtorrent ? I just saw a paramater -s. But I don't know how to list the index of the torrent file. Anyone have ideas ? Thanks in advance.

How create and seed own torrent throught own webtorrent-tracker? Step by step.

Begin want download some exist file such from tracker.btorrent.xyz for example - https://webseed.btorrent.xyz/timedrift-alpine-4k-timelapse.mp4

but it can't:
http://clip2net.com/clip/m455449/38c52-clip-12kb.png

Create webtorrent-tracker with default port.. its work good.. stats show zero..

ok.. I'm trying to create a torrent myself with command like:
webtorrent create /usr/src/mvs/test.mp4.torrent --announce http://somedomain
okay, got that:

root@dxp: usr/src/mvs# webtorrent create /usr/src/mvs/test.mp4.torrent --announce http://somedomain
d8:announce16:http://somedomain13:announce-listll16:http://somedomainee10:created by34:WebTorrent https://webtorrent.io13:creation datei1494531671e8:encoding5:UTF-84:infod6:lengthi10521e4:name16:test.mp4.torrent12:piece lengthi16384e6:pieces20:▒F▒▒4TԖ M(h▒

How can I make everything work so that the torrent through the preview is visible at http://somedomain/stats and could I further specify on a separate page to show visitors?
What am I doing wrong?

p.s. webseed work correctly use this manual: https://hackernoon.com/how-to-create-a-swarm-cdn-for-free-with-webtorrent-bfa09d193f71
but own torrents..

All files are being downloaded even after using --select index

Suppose a torrent has multiple files and I am trying to stream/download a particular file.

I used webtorrent download 'magnet URI' -s 22 --mpv

I expected that only relevant file (say 200 MB) will be downloaded. The selected video started streaming but in the background, the full torrent with all files (about 2.7 GB) was downloaded.

I have also tried downloading a single file without streaming and observed similar behaviour.

Webtorrent has file.select(), file.deselect() APIs. Still, why do all the files are being downloaded?

capture

Error when seeding

Hello, i'm create own tracker with webtorrent-tracker, try seed file with command line or webtorrent-webui app but not working.

UNEXPECTED ERROR: If this is a bug in WebTorrent, report it!
OPEN AN ISSUE: https://github.com/webtorrent/webtorrent-cli/issues

DEBUG INFO: webtorrent-cli 1.11.0, webtorrent 0.98.24, node v9.9.0, linux x64, exit 1
events.js:165
throw er; // Unhandled 'error' event
^

Error: write EPIPE
at WriteWrap.afterWrite [as oncomplete] (net.js:844:14)
Emitted 'error' event at:
at Socket.onerror (/usr/lib/node_modules/webtorrent-hybrid/node_modules/readable-stream/lib/_stream_readable.js:640:52)
at Socket.emit (events.js:180:13)
at onwriteError (_stream_writable.js:427:12)
at onwrite (_stream_writable.js:449:5)
at _destroy (internal/streams/destroy.js:39:7)
at Socket._destroy (net.js:548:3)
at Socket.destroy (internal/streams/destroy.js:32:8)
at WriteWrap.afterWrite [as oncomplete] (net.js:846:10)
root@debian-2gb-nbg1-dc3-2 ~ # webtorrent-hybrid seed asdasd.mp4 --announce ws://...*:8000/announce

can not get magent url peers

run webtorrent webtorrent_uri in terminal, but it can not find any peer for a long time, then I copy the uri in other torrent client, it can be downloaded. why?
run webtorrent info command the announce and urlList are empty.

-o and --out deosn't work

hi there, i really like your cli torrent client, but
I type something like:
$ webtorrent download magnet:xxx --out(or -o) ~/Downloads/
none of this works and gives output like:

[1] 6897
[2] 6898
-o: command not found
[2]+  Done
... 
...
[3] 7725
[4] 7726

Command '--out' not found, did you mean:

  command 'lout' from deb lout
  command 'gout' from deb scotch

Try: sudo apt install <deb name>
...

running Ubuntu 18.04 LTS, webtorrent version 1.12.3 (0.100.0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.