LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   IPTV streaming server on Debian (http://www.linuxquestions.org/questions/linux-server-73/iptv-streaming-server-on-debian-895155/)

shorto 08-02-2011 03:01 PM

IPTV streaming server on Debian
 
Hello all!

Well here's the thing my ISP offers IPTV that can we watched via VLC, but I was wandering how would I "restream" this for personal use?

I know VLC offeres a streaming option, but is there a simpeler way for me to just use the m3u script on my server and it rebroadcasts the signal, so converting or anything what so ever?

16pide 08-02-2011 03:51 PM

Hi, Which ISP and which country is this in?
Is the content encrypted?
Is this live TV? or VoD? so is the stream a multicast, or a unicast?

Then I'd like to know why you need to restream it. If it's a multicast, then you can have several pcs watching the same multicast, and only that one multicast comes into your home, so no bandwidth bottleneck there.

vlc can be run from the command line, so it's easy to script its use once you know exactly what you want to achieve

shorto 08-02-2011 04:05 PM

It's in Slovenia, Europe, the content is not encrypted and it's a multicast stream. I would would say multicast rebroadcast would be the best choice.

EDIT: forgot to anwser it's live TV.

16pide 08-02-2011 04:18 PM

if it's a live multicast, then why don't all your devices listen to that multicast?
That would help understand what you need your rebroadcast program to do

shorto 08-03-2011 02:29 AM

Well here is my plan basically; I'm moving to a location where this operator does not offer it's services. The only thing available there is 10/4mbit internet from another operator and that is that, so I'm keeping my apartment with my FTTH cables and a TV subscription with a server that rebroadcasts this TV programs to me so that I can watch them on my new location (the stream is 7-8mbit so with a 10mbit internet connection it shouldn't be a problem).

16pide 08-03-2011 03:40 AM

ok, so outputing a multicast won't be an option. I don't expect those 2 operators to let multicasts flow between each other. actually, your ftth router probably prevents multicasts from exiting your home.

Getting the multicast into your home and resending it as unicast means roughly 15Mb/s given your input above. you may want to consider transcoding to a lower bitrate, using codec such as h264, divx, etc ... any codec that is bandwidth efficient will do.

You'll need to manage a way to reach your new home. http://icanhazip.com/ can be used to know your current IP address. Use wget to automate this in a script.

VLC can work as a server providing unicast using rtsp protocol. You'll need to research this, I did not dig deep into it.

Then you'll also need to manage the firewall on your new home's router so that the video unicast can come in.

kalinski 08-04-2011 07:03 AM

use FreeBSD to restream
 
I use a FreeBSD 8.1 and converts 40 multicast channels to unicast with VLC - running on the HP d530 machine Pentium4 3GHz HT

shorto 08-06-2011 04:43 PM

Could you tell me how you did that, if a P3 can handle it my 2x Xeon 3.0 should do the job. So basically I get it I apt VLC since I'm using Debian and the what exactly (please not that I don't have a graphical interface), so basically I have a m3u list and that is it :).

kalinski 08-07-2011 12:43 AM

very simple, use the command screen / you need to install / and following lines:

#!/bin/bash
/usr/bin/killall -9 screen
/usr/bin/killall -9 vlc
/usr/bin/screen -A -m -d -S test-1 /usr/bin/cvlc udp://@239.255.0.30:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2000}'
/usr/bin/screen -A -m -d -S test-2 /usr/bin/cvlc udp://@239.255.0.17:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2010}'
/usr/bin/screen -A -m -d -S test-3 /usr/bin/cvlc udp://@239.255.0.50:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2020}'
/usr/bin/screen -A -m -d -S test-4 /usr/bin/cvlc udp://@239.255.0.101:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2040}'
/usr/bin/screen -A -m -d -S test-5 /usr/bin/cvlc udp://@239.255.0.103:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2050}'
/usr/bin/screen -A -m -d -S test-6 /usr/bin/cvlc udp://@239.255.0.104:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2060}'
/usr/bin/screen -A -m -d -S test-7 /usr/bin/cvlc udp://@239.255.0.106:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2070}'
/usr/bin/screen -A -m -d -S test-8 /usr/bin/cvlc udp://@239.255.0.63:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2080}'
/usr/bin/screen -A -m -d -S test-9 /usr/bin/cvlc udp://@239.255.0.40:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2090}'

script must be run under the user account. I use Linux and FreeBSD, and for different purposes, tests and trials have shown that what you want to do is best to use FreeBSD or OpenBSD.
I wish you luck,
if they are interested in something else ask!

p.s. - scripts first run is on Ubuntu server 7 :)

shorto 09-12-2011 01:21 PM

Nice thank you it worked :).

Now how about if I want to stream a playlist of local files to the net? Can I use a m3u playlist for local files or not?

neo74 09-16-2011 09:36 PM

to kalinski
 
Quote:

Originally Posted by kalinski (Post 4435716)
very simple, use the command screen / you need to install / and following lines:

#!/bin/bash
/usr/bin/killall -9 screen
/usr/bin/killall -9 vlc
/usr/bin/screen -A -m -d -S test-1 /usr/bin/cvlc udp://@239.255.0.30:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2000}'
/usr/bin/screen -A -m -d -S test-2 /usr/bin/cvlc udp://@239.255.0.17:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2010}'
/usr/bin/screen -A -m -d -S test-3 /usr/bin/cvlc udp://@239.255.0.50:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2020}'
/usr/bin/screen -A -m -d -S test-4 /usr/bin/cvlc udp://@239.255.0.101:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2040}'
/usr/bin/screen -A -m -d -S test-5 /usr/bin/cvlc udp://@239.255.0.103:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2050}'
/usr/bin/screen -A -m -d -S test-6 /usr/bin/cvlc udp://@239.255.0.104:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2060}'
/usr/bin/screen -A -m -d -S test-7 /usr/bin/cvlc udp://@239.255.0.106:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2070}'
/usr/bin/screen -A -m -d -S test-8 /usr/bin/cvlc udp://@239.255.0.63:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2080}'
/usr/bin/screen -A -m -d -S test-9 /usr/bin/cvlc udp://@239.255.0.40:5500 -vvv input_stream --sout '#duplicate{dst=standard{access=http,mux=ts,dst=10.1.45.222:2090}'

script must be run under the user account. I use Linux and FreeBSD, and for different purposes, tests and trials have shown that what you want to do is best to use FreeBSD or OpenBSD.
I wish you luck,
if they are interested in something else ask!

p.s. - scripts first run is on Ubuntu server 7 :)

Hello friends, I have the same problem, on Debian server to re-stream 40 live TV's. Kalinski, how to start this script? how to customise 1 channel from this script? Kalinski, P.M me please. Thank you!

Shorto, just put links to your channels in a html with names of TV's


All times are GMT -5. The time now is 05:57 AM.