WebTorrent Desktop – Open source streaming torrent client
webtorrent.io
webtorrent.io
* Electron is surprisingly nice to work with. It is simple, pragmatic, and thorough. System tray integrations, desktop notifications, launcher progress bar in OSX, installers for all three platforms, seamless auto updaters for Mac and Windows, a crash reporter, and so on --- all built in. Many of the little things that an app needs to feel native and professional have clean cross-platform APIs.
* Shout out to Cheng Zhao, aka zcbenz. He's incredibly prolific and seems to be nearly single-handedly developing the Electron project. Every single page of Electron docs or code I've looked at on Github, the latest commit on it is zcbenz.
* Peer-to-peer is moving very fast. WebRTC support in browsers was flaky and buggy until very recently. Even today, Chrome has a few big bugs left ( eg https://bugs.chromium.org/p/chromium/issues/detail?id=392651 ) and WebRTC is not yet supported in Web Workers ( https://bugs.chromium.org/p/chromium/issues/detail?id=302019 ). But things are improving quickly. Edge is getting Data Channel support soon. Safari is almost certainly gonna get WebRTC support as well -- it's already in WebKit, just not enabled in Safari yet.
Tons of cool new uses of the web are just at the edge of becoming possible.
I'm really excited about the way WebTorrent Desktop bridges the WebTorrent and BitTorrent networks. If enough people end up running it, BitTorrent in the browser will really happen. Projects like the Internet Archive can make huge files available for immediate streaming on their website, without paying for bandwidth. It's going to be interesting times.
We want to be good citizens and keep the swarms healthy.
* It's surprisingly fun and liberating working on a completely noncommercial project.
I have no problem at all with commercial software -- especially if it's free of ads and "microtransactions" and is simply sold to the user for a clear up-front price.
That said, it's fun just shipping something that anybody can work on, with no boss, no formal user requirements, no worries about whether the app will sell or whether the client will pay you.
The only goal here is to make something we're proud of and which users enjoy.
* It's really fun to share project ownership with all the contributors.
From CONTRIBUTING.md:
> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project. (https://github.com/feross/webtorrent-desktop/blob/master/CON...)
The first time I witnessed this in action was on the LevelUp project (https://github.com/Level/levelup). Since the days of the iojs fork, Node.js itself has adopted the same model.
Sharing commit access liberally is awesome for project health, because:
- The project can move forward even when the project owner is busy.
- It empowers contributors. It makes them feel like owners, because, well, they are. They end up contributing a lot more code.
- In the worst cast, it's Git, so bad commits can be backed out. But I've NEVER had to do this, or ever seen anyone else need to do it.
So you could download movies and never have to bother unzipping them.
It worked for multipart rars too.
The lore is that they implemented a custom rar algorithm but anyway, that was 14 years ago and its an open source project so I should see this somewhere else by now!
Since you guys are doing something over the torrent network where these kind of video releases are common (multipart rar, reminiscent of the release group's newsgroup roots), could you implement this functionality too:
When streaming, discover the sequence of the rar files in the torrent, prioritize the file downloads by rar number, and play the video file within?
(http://freedownloadmanager.org/ is a bit Softonic-esque, probably because of the program's heritage; the code's over at https://sourceforge.net/p/freedownload/code/HEAD/tree/trunc/, last checkin 2 weeks ago - and the project description says "we also plan to port it to Linux/OS X," which is cool)
Incidentally, I can't find any archives with audio hosted on a server that supports Accept-Ranges on the open web. I'd appreciate a link if anyone finds one.
Update: AVFS [3] seems to be an all-in-one solution that handles HTTP, FTP, WebDAV, Zip/RAR/Bzip, SSH, and others. Also see "podfuk" [4], though it looks pretty ancient.
[1] http://httpfs.sourceforge.net/ [2] http://www.cybernoia.de/software/archivemount/ [3] http://avf.sourceforge.net/ [4] http://atrey.karlin.mff.cuni.cz/~machek/podfuk/podfuk.html
Well, it would be possible but only if the video format in the torrent allowed for this is a way compatible with the way torrent transfers are split into blocks - i.e. it has a block structure that lines up with the torrent block structure such that block X is enough to play a given set of frames at the lowest quality, block X+1 for better quality, and so forth.
The blocks wouldn't have to be sequential: as torrent transfers are essentially random access you could have the content required for lowest quality display at the start of the file and the extra data further on, similar to how FLIF supports almost immediate low quality with progressive improvement as the rest of the file arrives (http://flif.info/ - see the video demo part way down that page, or https://uprootlabs.github.io/poly-flif/ for a more interactive look at how it copes with truncated files).
I'm not aware of any video formats that are arranged this way though. Those that are designed for adaptive streaming have a more dynamic structure that would not align well with the torrent protocols blocks.
Torrents are usually one file, which would not allow Adaptive Bitrate Streaming.
What really sucks is that Opera added native BitTorrent support almost 10 years ago (June 2006 in Opera 9), and no other browser has had the guts since. Something to think about.
You might have run into this Chrome bug. WebTorrent Desktop is an Electron app, which uses Chromium, so we inherit this bug. Chrome's WebRTC internals sometimes use 100% CPU on one core: https://bugs.chromium.org/p/chromium/issues/detail?id=392651
It will hopefully be fixed soon.
There's also built-in support for WebTorrent (and IPFS for that matter) in the Playback video player: https://mafintosh.github.io/playback/
EDIT: Here you go, data from 2015
http://lifehacker.com/5813348/five-best-bittorrent-applicati...
Azureus was something but 10 years ago. Things changed.
I'm optimistic about WebTorrent Desktop adoption.
You're right that we need lots more hybrid client adoption to bridge the BitTorrent and WebTorrent networks and really make it work in the browser.
I hope WebTorrent Desktop can be that client.
Finally, libtorrent is open source. Here's the discussion about adding WebTorrent support: https://github.com/arvidn/libtorrent/issues/223
I am not so optimistic, this client has 15-30 times more ram usage and couple of times more CPU usage. You can just install qBittorrent set sequential downloading and watch the movie..
I'm pretty sure the install base of WebRTC data channels is far higher than BitTorrent (Chrome, Firefox, Opera and soon Edge and Safari), so existing Torrent clients providing support only helps out the existing torrents out there.
Down the line I'm willing to bet that WebTorrent grows to be more widely used than BitTorrent, just off of the lack of friction to get started for both users and developers.
"Which means that you do not have almost any sources of seeders"
All it takes for someone to seed a file is to open a web page. Think about it.
At any point if I wanted to promote a song via WebTorrent, I could build WebTorrent into an audio player and encourage my user base to click a checkbox and seed the track (toss in IndexedDB support for storing it offline and it's even better).
Complete serverless resharing with almost every benefit of BitTorrent to boot.
The only thing WebTorrent needs the existing BitTorrent install base for is the existing torrents, which don't matter as much as you might think they do (most torrents are pirated content anyways).
So yes, WebRTC adoption does matter.
You're missing the point.
Think of it this way.
Check out this video: https://fastcast.nz/videos/cityscape-chicago-ii.html
Once you're done viewing even a second of it, just know you've just adopted WebTorrent.
You don't even need to know WebTorrent exists or was used and BitTorrent wasn't needed in any way.
That's a pretty big hurdle considering most regular torrent users don't even realize WebTorrent exists, and these users contribute the vast majority of the content available on BitTorrent.
Of course in the ideal world where WebTorrent has significant market share, this wouldn't be nearly as much of a problem. But I agree with lossolo that without interop with libtorrent at the very least (if not uTorrent as well), that ideal world is probably never going to come into existence.
They don't need to. That's the point.
If I send a user to https://file.pizza/ to transfer a file to them. Not once to I have to mention that it uses WebTorrent. IMO that's the killer feature.
I already said "the forest" doesn't matter.
Seriously, if I were building something with WebTorrent. Let's say Netflix (Note: https://torrentfreak.com/webtorrent-brings-bittorrent-to-the...). And most of the existing BitTorrent seeds are pirated content.
Why would I care?
"there's no guarantee that any of them will ever reach critical mass in terms of adoption"
When you give away tool with a widespread guaranteed userbase like this, someone is bound to build something that people will use. Not to say WebTorrent will be this big, but that's how the internet came to be.
And this is a completely decentralized upload and download library for the web, someone's going to build something popular with it I'm sure and it's not even at version 1.0 yet.
First candidate: Blizzard!
The problem is more that every desktop client, for some reason, has also reimplemented bittorrent. Specifically, Transmission, Deluge, and KTorrent all use their own bittorrent protocol implementations, and none of them are particularly or easily extensible enough to provide webtorrent support easily.
But let it be known eyes are on the prize and have at least looked into it, it is just a hard problem, exacerbated by implementation fragmentation.
This is something many people seem to screw up - just yesterday a similar torrent streaming tool had pirated screenshots. The OpenBazaar guys actually suggested using it for illegal things at one point... Like it or not, courts have recognized a difference between soneone who built a tool for legal uses and someone who built a tool for piracy.
I hope you are communicating that fact properly.
while i personally believe folks should mirror & seed torrents regardless of how others consume these torrents, i'm curious about the developers' perspectives on this issue
in any case, this desktop app looks very slick, thanks webtorrent team for all work pushing webrtc and torrenting forward
* We plan to switch to a hybrid strategy: it will download the blocks it needs, but once enough video is buffered, it will transition to rarest-first.
* It doesn't really matter. This used to be more of an issue back when torrents took hours or days to download and upload speeds were slow. If you download the entire torrent in five minutes and then seed it for days, it doesn't matter for the health of the swarm what order you downloaded the pieces in.
* Remove the notion of two different modes. * Remove the ability to switch between two modes. Because with this capability, people will inevitably switch it to the greedy mode, even if they have no need to, out of an inane fear that they might need to. * Implement your hybrid mode, again without a "switching" mechanism: * In your implementation of "rarest first", artificially apply extra weight to the next N segments that will be needed for the current play point.
I think this will result in very good behavior, in all cases. It is completely hands-off. Users tight on bandwidth will inevitably spend all of their bandwidth downloading the extra weighted segments needed to place soon. Users with any spare bandwidth will easily get past the next and segments, and then the rarest segments will automatically be the next fetched. All without any switches for users to set wrong.
And you're totally right that the user shouldn't need to switch between the modes manually. There's no UI for that option, and I don't think there should be. That's just an option of the underlying WebTorrent torrent engine (https://github.com/feross/webtorrent), though even that should probably be removed. :)
In sequential mode, pieces are fetched with high priority when they're immediately needed for streaming. In rarest-first mode, the traditional approach is used.
We're going to add automatic mode switching to a future release, so rarest-first will be used most of the time. The only time sequential mode is needed is right when streaming begins and every time a seek happens. I think this is a nice balance between helping the local user and keeping the swarm healthy.
Once this gets the standard set of features (file selection being the main one for me, since datacaps exist here, and spending 14 GB to watch the first ep and then decide I don't like whatever I'm watching is a bit of a pain) (also compact mode), I think this might very-well become my go-to client
Do you think running webtorrent under Duktape could work (with appropriate network APIs) ?
If there's any changes you need to make it work for, just open an issue or send a PR!
1) Ability to monitor multiple folders and automatically add torrents (and ideally the ability to specify a different download location for each)
2) Ability to run as a headless service/daemon with a thin management UI like Deluge/Transmission/Hadouken/etc
I don't think this is a bad idea, but that's definitely a feature for v2.
2) Ability to run as a headless service/daemon with a thin management UI like Deluge/Transmission/Hadouken/etc reply
This isn't exactly what you're asking for, but you might appreciate webtorrent-cli: https://github.com/feross/webtorrent-cli which works entirely from the command line.
Guys, would you like to present at the next SF WebRTC Meetup on April 28th? http://www.meetup.com/SF-WebRTC/events/229430038/
Happy to be proven wrong on this of course.
Also showed a rather improbable download speed for my home line.
There's a pull request for that here: https://github.com/feross/webtorrent-desktop/pull/330 It will be in the next release.
> Showed a rather improbable download speed for my home line.
Thanks for the compliment. We try hard ;)