VLC BitTorrent Plugin Streams Video Torrents Without Waiting For The Complete Download (PPA For Ubuntu And Linux Mint)

VLC BitTorrent plugin

Want to stream video torrent files with VLC media player without having to download the complete torrent and only then start playing it? There's a VLC plugin, called vlc-bittorrent, that's able to do just that, which was added to the Debian repositories about a month ago.

The VLC BitTorrent plugin supports both .torrent files and magnet links, and it's developed for Linux. The developer says the plugin may work on Windows or macOS, but it was not tested.

Petter Reinholdtsen, the Debian maintainer of the VLC BitTorrent plugin package, says that since the package was first uploaded in Debian, it was improved, and the package now allows opening VLC (and start streaming) when the user clicks on torrent files or magnet links in browsers like Firefox or Chromium.

On my Ubuntu 18.10 system, this clicking on .torrent files in web browsers to stream using VLC works... to some extent. In Firefox I had to select "VLC media player (bittorrent)" when asked what application I'd like to use to open .torrent files, while in Chromium the .torrent file is downloaded and not opened with VLC when clicked (but clicking on the downloaded file from the Chromium download statusbar opens VLC and starts streaming the video). I did not try this with magnet links.

When VLC is streaming a torrent, it's also seeding it so keep that in mind if when using it.

There are a couple of known issues:

  • VLC can't be closed until the torrent streaming starts (you can force it to close with killall -9 vlc though)
  • In case you're trying to play a torrent file that has multiple files, the VLC BitTorrent plugin will play a random file from that torrent, and it may not be the correct file. The Debian package uses a patch to try and play the largest file in multi-file torrents.

To this I'd also add that the plugin creates a vlc-bittorent folder in the Downloads directory where it stores the files it downloads, and it doesn't automatically clear any downloaded files. Some may prefer this, but I'd like it to store these files in /tmp so they are automatically removed on reboot.

The plugin receives constant improvements, so these quirks will probably be fixed at some point.

How to stream video torrents using the VLC Bittorrent plugin


Firefox open torrent in VLC

Like I mentioned above, the VLC BitTorrent plugin should support clicking on .torrent or magnet links using Firefox or Chromium to open them in VLC. But that may not always work.

Another way of playing torrents with VLC is to copy the .torrent file link or magnet link (right click the link in your web browser and select Copy link address or similar), and in VLC select Media > Open Location from clipboard. You may also open a downloaded .torrent file in VLC by going to Media > Open File.

You can also run VLC from the command line with a torrent file or torrent link (either .torrent or magnet link) as an argument:

vlc video.torrent
vlc http://example.com/video.torrent
vlc "magnet:?xt=urn:btih:...&dn=...&tr=..."

How to install vlc-bittorrent


The vlc-bittorent code can be downloaded from here.

Debian Testing and Unstable has vlc-bittorrent package under the vlc-plugin-bittorrent name. You can install it using this command:

sudo apt install vlc-plugin-bittorrent

vlc-bittorrent was not imported in Ubuntu 18.10 from Debian, so it's not available in the Ubuntu archive yet. But, like I was telling you earlier, I plan to upload PPA packages I use myself to a PPA, so others can make use of them as well. This is the PPA, and I just uploaded vlc-plugin-bittorrent to it. As a side note, I only plan to publish packages that are not available in Ubuntu already, so adding the PPA shouldn't cause any conflicts or break anything.

The vlc-plugin-bittorrent PPA package is taken from Debian Unstable, and it was packaged by Petter Reinholdtsen.

You can add the PPA and install the VLC BitTorrent plugin in Ubuntu 18.04, Ubuntu 18.10 or Linux Mint 19 (and Linux distributions based on them, like elementary OS 5.0 Juno) using the commands below:

sudo add-apt-repository ppa:linuxuprising/apps
sudo apt-get update
sudo apt install vlc-plugin-bittorrent

You also have the option to download the DEBs produced by the PPA by clicking on this link.

To use this plugin you need to install VLC from the repositories, and not from Flatpak or Snap packages! You can install VLC in Debian, Ubuntu or Linux Mint using:

sudo apt install vlc

You should now be able to stream video torrents using VLC media player. To try it out, go to the Internet Archive video section and try to stream some video torrents. Here's a link to the video I used to try this VLC plugin.

1 comment:

Powered by Blogger.