Watch P2P Television on Linux with Sopcast and VLC player

On Windows I was used to watching on-line television with the software Sopcast. On linux I had to spend about an hour to setup everything to correctly view P2P Tv, so I believe that this post may be useful to other people.

First of all, find and download the file sopcast-3.0.1-1.pkg.tar.gz or a more recent version if available. Then unzip it on your disk and change directory going into its bin folder

tar xfvz sopcast-3.0.1-1.pkg.tar.gz
cd sopcast-3.0.1-1.pkg/usr/bin/

It’s now time to run the service that will connect to a p2p television stream, and will stream that video on your PC.

./sp-sc-auth sop://your.favouritetv.com:3912/6002 3908 8908 > /dev/null

Obviously replace the URL sop://your.favouritetv.com:3912/6002 with the URL of the television you want to watch (on MyP2P.eu there are some good channel listings) Be careful to pick an URL for Sopcast (there are many other kind of p2p softwares such as TvAnts and so on that uses different protocols).

Now there is a background service on your system that streams that TV on the chosen port 8908

The final step is to run VLC Media Player to view that stream on your monitor. This is the command:

vlc http://localhost:8908/tv.asf

Enjoy the show 🙂

Copying Files between Clients and Servers over ssh using scp

It’s quite common to need to upload or download file between one or more servers and the local computer.

If it’s available a ssh access on the servers, using scp to transfer file from and to the server could be a very good option.

Here’s its syntax:

usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
           [-l limit] [-o ssh_option] [-P port] [-S program]
           [[user@]host1:]file1 ... [[user@]host2:]file2

A very simple example:

scp localfilename.txt remoteuser@www.remotehost.com:remotefilename.txt

The previous example copies localfilename.txt from the local directory to the server www.remotehost.com using remoteuser as the ssh account to authenticate on the remote server. On the remote server the transferred file will be stored as remotefilename.txt in the default login directory of remoteuser.

Copying file from and to specific directories:

scp /localdir/localfilename.txt remoteuser@www.remotehost.com:/remotedir/remotefilename.txt

Compared to the previous example, in this case, the file is taken from /localdir/localfilename.txt and stored remotely on /remotedir/remotefilename.txt.
Obviously remoteuser should have write permission on the remote directory where the file is going to be written.

In the next case, the authentication is made through a keyfile, this is the syntax:

scp -i keyfile /localdir/localfilename.txt remoteuser@www.remotehost.com:/remotedir/remotefilename.txt

In this case to login as remoteuser there will not be a prompt for password, but keyfile is used as identity file.

It’s even possible to copy directly files from one server to another

scp firstremoteuser@www.firstserver.com:/filename.txt anotherremoteuser@www.anotherserver.com:/remotedir/remotefilename.txt

Finally one of the best features is to copy recursively directory trees to the remote server:

scp -r /localdirectory remoteuser@www.remoteserver.com:/remotedirectory

In this case, the whole content of localdirectory is recursively copied into remotedirectory. This can be very useful for moving quickly website structures.
I hope you’ve found some useful information in this tutorial.