Digital Video Hacks: Tips & Tools for Shooting, Editing, and Sharing (OReillys Hacks Series)

 < Day Day Up > 

Use BitTorrent to Distribute Your Video Using BitTorrent, a peer-to-peer network application, you can have other people distribute your movie for you.

Digital video files can be quite large. If you plan on distributing your movie online, you might wind up paying more than you expect, or you might even have your distribution stopped due to exceeding your bandwidth allocation.

BitTorrent is a peer-to-peer (P2P) network application created by Bram Cohen. What sets BitTorrent apart from other P2P applications is the method it uses to distribute files. In most P2P applications, when you request to download a file, that file is obtained from only one machine. By downloading from one machine, you are limited to that machine's connection to the Internet, whether it is fast or slow, reliable or not.

BitTorrent, in contrast, attempts to download a file from many machines at the same time. This torrent method allows people to obtain files both faster and more reliably, because the requested file is delivered in pieces. Some machines will have faster connections than others, but combined, they can all deliver a specific file faster than a single machine by itself. Additionally, the more popular a file is, the more quickly it can be distributed.

BitTorrent uses .torrent files, which are usually small, to represent a complete file that exists in the network. Once someone has obtained a .torrent file, she can then download the complete file from the network. This is akin to browsing a movie rental store and taking the DVD cover to the front of the store so that the clerk can give you the actual DVD.

Given the design of BitTorrent, it is a terrific method to distribute video files. To quote the BitTorrent web page:

The key to cheap file distribution is to tap the unutilized upload capacity of your customers. It's free. Their contribution grows at the same rate as their demand, creating limitless scalability for a fixed cost.

7.12.1. Downloading a BitTorrent Client

The official BitTorrent client is available for Windows, Mac OS X, and Linux and can be downloaded from the official BitTorrent web site at http:// bittorrent.com/download.html, but there are also many other BitTorrent clients available on the Internet. One client of particular interest is Azureus (http:// azureus.sourceforge.net; free), which includes a tracker (explained later) and is expandable through third-party plug-ins.

Azureus is available for Windows, Mac OS X, and Linux. Installation instructions for all three operating systems are available on the Azureus web site. You need Java installed on your computer; download it for free from Sun (http:// www.java.com/en/download/manual.jsp).

After installing Azureus, you're ready to download your first torrent.

7.12.2. Downloading a .torrent File

There are essentially two steps to downloading a file using BitTorrent. The first is to obtain a .torrent file. The second is to open the .torrent file in yourBitTorrent client (in this case, Azureus), which begins downloading the specific file.

To find .torrent files, you can use a BitTorrent tracker. A tracker keeps a list of available torrents and distributes the .torrent files required to obtain the complete files they represent.

Two of the better-known trackers are the etree.org Community BitTorrent Tracker (http://bt.etree.org) and Legal Torrents (http://www.legaltorrents.com).

Once you have located a tracker to use, simply select a file you would like to download. The file you get from the tracker should be a .torrent file. Using Azureus, open the torrent file and your download will proceed. Figure 7-40 shows a download in progress of movie called Panorama Ephera.

Figure 7-40. Downloading a movie in Azureus

When using BitTorrent, you are cross-loading: both uploading and downloading files. If you restrict your uploading, your download will be extremely slow. BitTorrent is a "tit for tat" system.

Depending on the size of the file you are downloading, your Internet speed, and the speed of the people who are sharing the file with you, your download might take some time to complete. You will more than likely want to work on something else while the download occurs perhaps something like creating a torrent of your own to share with the world!

7.12.3. Sharing a File

If you want to make a file available in the BitTorrent network, you need to create a .torrent file. Unlike other P2P networks, which allow only one file, a .torrent file can be composed of many files. Most BitTorrent applications make this process painless, and Azureus is no exception.

The easiest way to create a torrent and share a file is simply to choose File Share File…. Depending on the size of your movie, the process might take a while. During the process, a window will display the current status. Upon completion, the Once you have begun the process of sharing your file, you might notice that your movie's Status is listed as Queued in the My Torrents tab. If you find your movie is queued for a long period of time, right-click on it and select Force Start. This will force your movie to begin seeding, which is the process of injecting your movie file into the BitTorrent network.

If your computer is behind a firewall, you need to open ports 6969 and 6881 6889. Otherwise, people will not be able to contact Azureus to download the .torrent file or the actual movie. You will also want either a static IP address, or a dynamic DNS pointing to your computer. A dynamic DNS can be obtained from Dynamic Network Services (http://www.dyndns.org) or No-IP (http://www.no-ip.com).

Sharing a file this way both creates the .torrent file needed for your viewers to obtain the movie and adds the .torrent file to the built-in tracker. Figure 7-41 shows the Azureus BitTorrent Client Tracker in action, as someone downloads a file.

Figure 7-41. Azureus enabling a viewer to download a movie

People can access the tracker at http://your.host.name:6969. They can then download the .torrent file and load it into their BitTorrent client in order to download the actual movie. If you choose to, you can also download the file for yourself and then email it out to your friends, family, and groupies.

7.12.4. Using a Public Tracker.

If you would prefer to use a public tracker to announce your file, you need to create a .torrent file for the tracker to use. Azureus makes creating such .torrent files easy.

7.12.4.1. Using the creation wizard.

While running Azureus, choose File Create a Torrent. The creation wizard window will present a set of options for your torrent file. Figure 7-42 shows the first section of the creation wizard.

Figure 7-42. Creating a torrent file

If you would like to have multiple trackers handle your .torrent file, check the appropriate checkbox. If you select this option, you will be able to add additional trackers in the following window.

If you decide you would like to add more trackers after you've created your .torrent file, you can use Azureus's Add Tracker feature by right-clicking on your file and choosing Tracker Add Tracker URL. There are many public trackers available, at no charge, to help announce your Unless you plan on using the other P2P networks, such as Gnutella2 or eDonkey2, you can safely deselect the "Add hashes for other networks" checkbox.

If you plan on creating a .torrent with multiple files, select the Directory radio button. Otherwise, keep the "Single file" radio button selected. Unless you plan on breaking your movie into multiple, smaller movies, you should keep the "Single file" button selected.

Finally, if you would like to add a comment to your .torrent file, you can enter it in the Comment text field.

When you have entered your information, click the Next button.

7.12.4.2. Selecting a file.

Obviously, if you want to share a movie, you need to select the movie so that Azreus can create the torrent. Upon selecting your movie, click the Next button. You then have the option to configure the Piece Size for distribution. It is recommended that you allow Azureus to figure the size for you automatically. Figure 7-43 shows the File section and configuration window.

When you click the Finish button, Azureus begins the process of creating your .torrent file. This can take a while, depending on the size of your file and the speed of your computer. The final .torrent file will be substantially smaller than your original movie, which will help to distribute your movie quickly. Figure 7-44 shows a .torrent file with the file size of 24KB created from a 573. 1MB original file.

Once you have created your torrent file, you should upload it to the tracker you entered in the first screen.

The small .torrent file is not your movie. It is simply a locator for your movie, so people can download it.

Figure 7-43. Finalizing the creation of a .torrent file

Figure 7-44. Displaying the small size of a torrent file

You still need to share the entirety of your movie by seeding it. Make sure Azureus remains running for a while after you've announced your torrent. This will allow Azureus to seed your movie to other people so they can continue to distribute it.

7.12.5. See Also

  • BlogTorrent (http://www.blogtorrent.com; free, open source) is an easy-to-install tracker and client, distributed by Downhill Battle (http://www.downhillbattle.org).

  • Prodigem (http://www.prodigem.com; free) is a tracker and hosting service for BitTorrent files.

     < Day Day Up > 

    Категории

    © amp.flylib.com,