GithubHelp home page GithubHelp logo

p2psp / i-want-to-use-it Goto Github PK

View Code? Open in Web Editor NEW
5.0 7.0 6.0 15 KB

Minimal, basic and always (we try) updated information about how to use P2PSP

License: Creative Commons Zero v1.0 Universal

i-want-to-use-it's Introduction

I-want-to-use-it

Join the chat at https://gitter.im/P2PSP/I-want-to-use-it

Minimal, basic and always updated information about how to use P2PSP.

Debians

sudo apt-get install libboost-all-dev

Mac

brew install boost

Arch

sudo pacman -S boost

Install OpenSSL

Debians

sudo apt-get install libssl-dev

Mac

brew install openssl

Arch

sudo pacman -S openssl

Install cmake

Debians

sudo apt-get install cmake

Mac

brew install cmake

Arch

sudo pacman -S cmake
git clone https://github.com/P2PSP/core.git
git clone https://github.com/P2PSP/p2psp-console.git

Compile

cd core
./make.py
cd ../p2psp-console
./make.py

Run a peer

cd bin
./peer --splitter_addr 150.214.150.68 --splitter_port 4552 > /dev/null &
vlc http://localhost:9999 &

Run a local team

cd bin
./splitter --source_addr 150.214.150.68 --source_port 4551 --splitter_port 8001 --channel BBB-134.ogv --header_size 30000 > /dev/null &
./monitor --splitter_addr 127.0.0.1 --splitter_port 8001 > /dev/null &
vlc http://localhost:9999 &
./peer --splitter_addr 127.0.0.1 --splitter_port 8001 --player_port 10000 &
vlc http://localhost:10000 &

Run a source and a local team

cd bin
wget https://upload.wikimedia.org/wikipedia/commons/7/79/Big_Buck_Bunny_small.ogv
cvlc Big_Buck_Bunny_small.ogv --sout "#http{mux=ogg,dst=:8080/BBB.ogv}" :sout-keep &
./splitter --source_addr 127.0.0.1 --source_port 8080 --splitter_port 8001 --channel BBB.ogv --header_size 30000 > /dev/null &
./monitor --splitter_addr 127.0.0.1 --splitter_port 8001 > /dev/null &
vlc http://localhost:9999 &
./peer --splitter_addr 127.0.0.1 --splitter_port 8001 --player_port 10000 &
vlc http://localhost:10000 &

Run a smart source client based local team

cd bin
wget https://upload.wikimedia.org/wikipedia/commons/7/79/Big_Buck_Bunny_small.ogv
./splitter --source_addr 127.0.0.1 --source_port 32000 --splitter_port 8001 --channel BBB.ogv --header_size 30000 --smart_source_client 1 > /dev/null &
./monitor --splitter_addr 127.0.0.1 --splitter_port 8001 --smart_source_client 1 > /dev/null &
vlc http://localhost:9999 &
cvlc Big_Buck_Bunny_small.ogv --sout "#http{mux=ogg,dst=:8080/BBB.ogv}" :sout-keep &
node ./../src/vlc-sourceClient.js 32000 BBB.ogv 8080 &
./peer --splitter_addr 127.0.0.1 --splitter_port 8001 --player_port 10000 --smart_source_client 1 &
vlc http://localhost:10000 &

Run a simple Icecast structure

echo "Killing all VLC instances (sources and listeners)"
killall vlc
sleep 1

echo "Create two sources"
cvlc ~/Videos/Big_Buck_Bunny_small.ogv --sout "#std{access=shout,mux=ogg,dst=source:hackme@localhost:8000/BBBs.ogv}" --loop &
sleep 1
cvlc ~/Videos/chi84_14_m4.ogv --sout "#std{access=shout,mux=ogg,dst=source:hackme@localhost:8000/LLL.ogv}" --loop &
sleep 1

echo "Check the infrastructure"
firefox http://localhost:8000 2> /dev/null &

sleep 10

echo "Create two listeners"
cvlc http://localhost:8000/BBBs.ogv 2> /dev/null &
cvlc http://localhost:8000/LLL.ogv 2> /dev/null &

Run a relayed Icecast structure

sleep 1
cvlc ~/Videos/chi84_14_m4.ogv --sout "#std{access=shout,mux=ogg,dst=source:hackme@localhost:8000/LLL.ogv}" --loop &
sleep 1

echo "Run a relay Icecast server listening at port 9000"
/usr/bin/icecast2 -b -c ~/icecast/icecast.xml
sleep 1

echo "Feed the second (9000) icecast server"
cvlc ~/Videos/hcil2003_01.ogv --sout "#std{access=shout,mux=ogg,dst=source:hackme@localhost:9000/hcil.ogv}" --loop &
sleep 1

echo "Check the infrastructure"
firefox http://localhost:8000 2> /dev/null &
sleep 10
firefox http://localhost:9000  2> /dev/null
sleep 2

echo "Run the listeners, one for the 8000 and two for the 9000"
cvlc http://localhost:8000/BBBs.ogv 2> /dev/null &
sleep 1
cvlc http://localhost:9000/LLL.ogv 2> /dev/null &
sleep 1
cvlc http://localhost:9000/hcil.ogv 2> /dev/null &

Run a hybrid (Iceast/P2PSP) structure

echo "Killing all VLC instances"
killall vlc
sleep 1

echo "Killing all user Icecast2 instances"
killall icecast2

echo "Run a second Icecast2 server listening at port 9000"
/usr/bin/icecast2 -b -c ~/icecast/icecast.xml
sleep 1

echo "Feed all icecast servers (2 movies for 8000 and 1 for 9000)"
cvlc ~/Videos/Big_Buck_Bunny_small.ogv --sout "#std{access=shout,mux=ogg,dst=source:hackme@localhost:8000/BBBs.ogv}" --loop &
sleep 1
cvlc ~/Videos/chi84_14_m4.ogv --sout "#std{access=shout,mux=ogg,dst=source:hackme@localhost:8000/LLL.ogv}" --loop &
sleep 1
cvlc ~/Videos/hcil2003_01.ogv --sout "#std{access=shout,mux=ogg,dst=source:hackme@localhost:9000/hcil.ogv}" --loop &
sleep 1

#echo "Check the infrastructure"
#firefox http://localhost:8000 2> /dev/null &
#sleep 10
#firefox http://localhost:9000 2> /dev/null
#sleep 5

echo "Run a listener connected to the master Icecast server"
cvlc http://localhost:8000/BBBs.ogv 2> /dev/null &
sleep 1

echo "Run a listener connected to the relay Icecast server"
cvlc http://localhost:9000/hcil.ogv 2> /dev/null &
sleep 1

echo "Create a P2PSP team"
xterm -e "~/P2PSP/p2psp-console/bin/splitter --source_addr 127.0.0.1 --source_port 8000 --splitter_port 8001 --channel BBBs.ogv --header_size 30000" &
sleep 1
xterm -e "~/P2PSP/p2psp-console/bin/monitor --splitter_addr 127.0.0.1 --splitter_port 8001" &
sleep 1
cvlc http://localhost:9999 & # The monitor
sleep 1
xterm -e "~/P2PSP/p2psp-console/bin/peer --splitter_addr 127.0.0.1 --splitter_port 8001 --player_port 10000" &
sleep 1
cvlc http://localhost:10000 & # The first peer

i-want-to-use-it's People

Contributors

agauniyal avatar cristobalmedinalopez avatar vicente-gonzalez-ruiz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

i-want-to-use-it's Issues

Unable to run a peer

While trying to use the library to run a peer using this one command mentioned in Readme
./peer --splitter_addr 150.214.150.68 --splitter_port 4552 > /dev/null &
vlc http://localhost:9999 &

I tried mpv http://localhost:9999 &

I kept getting these errors -

Playing: http://localhost:9999
[ytdl_hook] ERROR: Unable to download webpage: <urlopen error [Errno 111] Connection refused> (caused by URLError(error(111, 'Connection refused'),))
[ytdl_hook] youtube-dl failed, trying to play URL directly ...
[ffmpeg] tcp: Connection to tcp://localhost:9999 failed: Connection refused
Failed to open http://localhost:9999.

Exiting... (Errors when loading file)

Add Boost download and compilation before use it

There is a problem using Boost from the package repositories in some OS (for example, Ubuntu 16.04.2 LTS). We think that a good solution could be to include in the file make.py an option to compile p2psp-console using downloaded (and compiled) version of Boost. The compilation of Boost could be stored in a temporal directory inside p2psp-console.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.