Get p2ptube

Introduction

p2ptube is a program to stream movies on the internet. Its completely free and its open source. Once you start the program you will get a menu with movies that you can search and filter. Once you have picked a movie, click on it, and the movie will start playing in a matter of seconds. The movies available are the ones that are available in the bitorrent network, in other words, almost all movies that you might be interested in watching.

Features

uses the bittorrent distributed network for the downloads, which means that there is no central point of failure. It also means that it is virtually impossible to take it down.

starts playing the movie file in a few seconds, while the file is still downloading. I'm not aware of any other software with this feature.

uses imdb to get the movie information, so the interface is very clean.

automatically searches for torrent files for the movie selected and chooses the one with the highest availability.

written in python, so it supports multiple platforms

open source

Future releases

Now playing : we will add the option to list only the movies that are currently on the cinemas. yes, we can play those too! although they usually have a lower quality.

: we will add the option to list only the movies that are currently on the cinemas. yes, we can play those too! although they usually have a lower quality. TV Series : p2ptube will play tv series as well.

: p2ptube will play tv series as well. Dubbed or subtitled versions : we will add the option to watch the movies in your language if it is available.

: we will add the option to watch the movies in your language if it is available. Music: the same idea can be used for music. you will choose an artist, an album and p2ptube will take care of the rest.

Keyboard shortcuts

Space: pause/unpause

f: toggle fullscreen

q: quit

The core of p2ptube is a very small program called btcat. It's a python program that downloads a bittorrent file sequentially. You can use it to watch video files as they download.

Install (Ubuntu)

sudo apt-get install python-libtorrent mplayer sudo wget http://p2ptube.sourceforge.net/btcat.py -O /usr/local/bin/btcat sudo chmod +x /usr/local/bin/btcat

Use

to list the contents of a torrent file btcat 'http://www.clearbits.net/get/53-star-wreck---in-the-pirkinning.torrent' to play a specific file run the command again appending the file id as the second argument btcat 'http://www.clearbits.net/get/53-star-wreck---in-the-pirkinning.torrent' 1

How it works

In the BitTorrent protocol, big files are divided into small sections. Different sections don't always have the same availability, it is possible for instance that 10 users have section A while only 3 users have section B, even if both sections belong to the same file. For this reason BitTorrent clients tend to download sections with high availability first so that it can use as much bandwith as possible. This means that usually we wont download the file from the beginning to the end consecutively, but instead we will dowload (aparently) random pieces (the ones with higher availability) until the file is complete. This is a problem if we want to stream the file while we are downloading, as we can't start streaming until the first section has been completed. And after the first section has been completed, we won't be able to continue until the second has been finished too and so on. If we don't change the strategy, this process can be quite slow at the beginning as its very unlikely that the "efficient algorithm" is going to choose to download the next section we need to stream.

p2ptube uses a different strategy which prioritizes the first sections over later ones. This will ensure that we can read the file from the beginning and start processing it (playing it in this case) as soon as possible before the whole download has been completed. This comes at some price of course, that is a slighty lower download rate. But do we really care about high download rates if the rate is high enough to watch the movie as it downloads?

Contact