
How to download in p2p networks or a magnet with bitrate
Since such a dance has gone , then I will talk about the new magnet link option.

In a magnet link, it looks like this.
This option allows you to combine the advantages of sequential and random selection of parts to load. Call it the “mixed way of choosing parts." Thus, giving the opportunity of "online" viewing / listening without compromising download speed.
You can calculate the bitrate like this:
It will be more bitrate of the audio file stream and more than the sum of the bitrates of the video file streams.
Recall what download methods exist and what I propose further.
Test file bitrate: 2.6 Mb / s

So download video and audio files on the Internet for viewing online in Flash and HTML5 players. Files are located on servers that are able to provide upload speed for comfortable viewing for each user. In p2p networks, the file source is an ordinary user's computer that cannot provide the necessary speed for comfortable viewing.
Since during sequential download peers will receive the same parts of the file, they will not be able to exchange them with each other to mutually increase speed.
Advantages:
Disadvantages:

This is a survival strategy for p2p networks. Each peer requests different random parts of the file and then exchanges these parts with other peers, which increases the speed. But since the parts are requested randomly, the file is “torn” before the download is complete. When playing such a file, the player will skip the unloaded parts or freeze on the first break.
Advantages:
Disadvantages:

The file is downloaded sequentially at a speed sufficient for online viewing.
In case of lack of speed for comfortable viewing of the file "online" (1) it is downloaded randomly. If the download speed is sufficient, mixed mode is activated (2)
Algorithm:
Advantages:
Disadvantages:
I tried this mode in my version of the Shareaza client. Implemented it a little differently. In the second part, the playback marker is calculated (bit rate * time from the start of the download / 8). Available parts up to the marker are loaded sequentially. If parts are available for download only after the marker, it is selected randomly.
Download this version of Shareaza.
Switch to window mode: in the View menu, first select Experienced Mode , and then Window Mode itself .
Set external player: in the Tools menu, click Settings . In the window that opens, select the Player item . We open the Select manager list and click the (Custom ...) item . Next, look for the VLC or any other player on the disc.
Test magnet 2.6 Mb / s:
big_buck_bunny_720p_stereo.ogg
Test magnet 6.2 Mb / s:
tears_of_steel_1080p.webm
As the download starts, open the context menu (right-click) on the download and select the Open item .
The picture with the rabbit had to be photographed since the image in the player is not copied by the printscreen.
br=192000
In a magnet link, it looks like this.
magnet:?dn=pop_music.mp3...&br=192000
This option allows you to combine the advantages of sequential and random selection of parts to load. Call it the “mixed way of choosing parts." Thus, giving the opportunity of "online" viewing / listening without compromising download speed.
You can calculate the bitrate like this:
br=[размер файла в байтах]*8 / [продолжительность аудио или видео в секундах]
It will be more bitrate of the audio file stream and more than the sum of the bitrates of the video file streams.
Recall what download methods exist and what I propose further.
Test file bitrate: 2.6 Mb / s
Sequential download.
So download video and audio files on the Internet for viewing online in Flash and HTML5 players. Files are located on servers that are able to provide upload speed for comfortable viewing for each user. In p2p networks, the file source is an ordinary user's computer that cannot provide the necessary speed for comfortable viewing.
Since during sequential download peers will receive the same parts of the file, they will not be able to exchange them with each other to mutually increase speed.
Advantages:
- You can watch / listen immediately.
Disadvantages:
- Slow download speed.
Download at random.
This is a survival strategy for p2p networks. Each peer requests different random parts of the file and then exchanges these parts with other peers, which increases the speed. But since the parts are requested randomly, the file is “torn” before the download is complete. When playing such a file, the player will skip the unloaded parts or freeze on the first break.
Advantages:
- High speed
Disadvantages:
- The file is playing in pieces or the player freezes.
Mixed order
The file is downloaded sequentially at a speed sufficient for online viewing.
In case of lack of speed for comfortable viewing of the file "online" (1) it is downloaded randomly. If the download speed is sufficient, mixed mode is activated (2)
Algorithm:
1 Если (скорость загрузки файла меньше заданного битрейта)
то файл загружается случайным порядком;
2 Иначе
Если (скорость загрузки непрерывного участка от начала файла меньше или равна битрейту)
то файл загружается последовательно;
Иначе
файл загружается случайно;
Advantages:
- High speed
- Ability to view online without cliffs
Disadvantages:
- No (relatively)
I tried this mode in my version of the Shareaza client. Implemented it a little differently. In the second part, the playback marker is calculated (bit rate * time from the start of the download / 8). Available parts up to the marker are loaded sequentially. If parts are available for download only after the marker, it is selected randomly.
If you want to try out online viewing in Shareaza
Download this version of Shareaza.
Switch to window mode: in the View menu, first select Experienced Mode , and then Window Mode itself .
Set external player: in the Tools menu, click Settings . In the window that opens, select the Player item . We open the Select manager list and click the (Custom ...) item . Next, look for the VLC or any other player on the disc.
Test magnet 2.6 Mb / s:
Test magnet 6.2 Mb / s:
As the download starts, open the context menu (right-click) on the download and select the Open item .
The picture with the rabbit had to be photographed since the image in the player is not copied by the printscreen.