Statistics
| Branch: | Tag: | Revision:

streamers-build / README @ 7be88db2

History | View | Annotate | Download (3.63 KB)

1
This is PeerStreamer, a P2P Media Streaming framework written in C.
2

    
3
Quick Start
4
===========
5

    
6
Building
7
--------
8

    
9
Run "make". A new folder will be created with the name
10
PeerStreamer-<version>. You will find all the executables in this
11
folder. PeerStreamer-<version>.tgz  and
12
PeerStreamer-<version>.tgz-stripped.tgz is also created to ease
13
distribution of binaries.
14

    
15
See the built-in help ("./streamer -h") for usage examples and options.
16

    
17

    
18
Running a source
19
----------------
20

    
21
To run a source, the only thing you need is a media stream.
22

    
23
If the stream is a video file, run is as e.g.
24
./source.sh -f video.avi
25

    
26
If the stream is "live", coming from a device with its own timing, run
27
it with the "-l" parameter as e.g.
28
./source.sh -l -f /dev/dvb/adapter0/dvr0
29

    
30
For more options, see the help
31
./source.sh -h
32

    
33
Create a channels.conf file, distribute it to the users, and enjoy. As
34
an alternative, you can also send the channels.conf to peerstreamer.org
35
for inclusion in the channel list.
36

    
37
Running a peer
38
--------------
39

    
40
Start the player with
41

    
42
./player.sh
43

    
44
You can also use your custom channels.conf. In this case, copy the
45
channels.conf in this folder, and run the player as follows:
46

    
47
./chunker_player
48

    
49

    
50
Detailed instructions
51
=====================
52

    
53
PeerStreamer can be compiled in several ways, e.g. in a simple
54
configuration that creates only one binary. It can also be compiled in
55
more complex versions that include a streamer linked with a number of
56
external libraries, as well as a custom made player application.
57

    
58
Below we provide instructions for two versions, the simplest case and
59
the most complex one. The first one is useful for developers to
60
understand the system. The second one is more useful as an end-user
61
version.
62

    
63

    
64
Building and running the simple version (GRAPES I/O)
65
----------------------------------------------------
66

    
67
Compilation
68
- - - - - -
69
Create executables by running:
70
make simple
71

    
72
Running the source
73
- - - - - - - - -
74
1, Start the source peer in one shell:
75
Streamers/streamer-grapes -f ~/video/big_bunny_orig/big_buck_bunny_480p_stereo.avi -m 3
76
or
77
ffmpeg -i ~/video/myvideo.avi -f nut -vcodec mpeg4 -b 500000 -o /dev/stdout | Streamers/streamer-grapes -f /dev/stdin -m 3
78

    
79
Running a peer
80
- - - - - - -
81

    
82

    
83
Building and running the complex version (chunkstream I/O)
84
----------------------------------------------------------
85

    
86
The complex version contains a separate chunker and player application.
87
It also integrates with a number of external libraries, providing
88
additional functionalities and performance.
89

    
90
Compilation
91
- - - - - -
92
Create executables by running:
93
make
94

    
95
Running the source
96
- - - - - - - - -
97
The easiest way to start a source is to use the provided wrapper script:
98
source.sh. See the Quick Start instructions for examples.
99

    
100
If more control is needed, follow this procedure:
101

    
102
1, Start the source peer in one shell:
103
Streamers/streamer-ml-monl-chunkstream-static -f tcp://127.0.0.1:7777 -m 3
104

    
105
2, In another shell, go to the Chunker's folder
106
cd ChunkerPlayer/chunker_streamer
107

    
108
3, Start the chunker (after the source peer has been started!):
109
./chunker_streamer -i ~/video/big_bunny_orig/big_buck_bunny_480p_stereo.avi -a 128000 -v 500000
110
or
111
./chunker_streamer -i /dev/stdin -l -a 128000 -v 500000
112

    
113
Running a peer
114
- - - - - - -
115
The only think a peers needs to run is a channel list. This can either
116
come from peerstreamer.org, or you can create and use your own.
117

    
118
In the first case, just start the included wrapper script:
119
./player.sh
120
This will download the most recent channel list and start playing.
121

    
122
You can also create your own channel list (see the provided example
123
channels.conf), and distribute it with the player. In this case, start
124
the player with the following command:
125
./chunker_player