Stefan2902
Posts: 27
Joined: Thu Mar 10, 2016 5:33 pm

Stream live TV to remote location

Sun Apr 10, 2016 8:14 am

Dear all,

I have set up a home media center using openelec and kodi on a Raspberry Pi 3. It all works out fine in my home network via wifi.

Now I am on vacation in South East Asia and I would have thought that I can also stream live TV to my android phone. Therefore I have set up a VPN connection to my home network. I am using tvheadend client and kodi on my phone but when I start streaming it seems as if the bandwidth is too low?! Do you have any idea on how I could improve the situation so that I may be able to watch live TV on my phone even during vacation?

Thanks in advance for any suggestion.

Stefan

gkreidl
Posts: 6092
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Stream live TV to remote location

Sun Apr 10, 2016 9:51 am

You have to transcode the TV stream (video & audio) to lower bit rates (and that includes a lower video size).
This can be done with the help of the GPU. I'm doing that all the time.
I've published some software for it viewtopic.php?f=38&t=123876
But it requires Raspbian and some work on your side.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Stefan2902
Posts: 27
Joined: Thu Mar 10, 2016 5:33 pm

Re: Stream live TV to remote location

Tue Apr 12, 2016 3:36 am

Thanks so much for your swift reply.

Since it looks as if it requires quite some change on my setup (e. G. Changing operating system) I was wondering if there is any easier way to continue with my setup:

- Openelec 6.0.4
- Ths headend 4.0.8

I would like to be able to stream via VPN to an android smartphone. Transcoding on the client (smartphone) doesn't seem to work (tested tvhguide). I read about different streaming profiles in tvheadend server and found them but I even don't know what transcoding I need!

Any suggestion on how to change my current setting would be great.

Thanks Stefan

gkreidl
Posts: 6092
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Stream live TV to remote location

Tue Apr 12, 2016 5:08 am

Stefan2902 wrote:Thanks so much for your swift reply.

Since it looks as if it requires quite some change on my setup (e. G. Changing operating system) I was wondering if there is any easier way to continue with my setup:

- Openelec 6.0.4
- Ths headend 4.0.8

I would like to be able to stream via VPN to an android smartphone. Transcoding on the client (smartphone) doesn't seem to work (tested tvhguide). I read about different streaming profiles in tvheadend server and found them but I even don't know what transcoding I need!

Any suggestion on how to change my current setting would be great.

Thanks Stefan
You do need GPU support for real time transcoding, which is not supported by tvheadend, AFAIK.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Stefan2902
Posts: 27
Joined: Thu Mar 10, 2016 5:33 pm

Re: Stream live TV to remote location

Tue Apr 12, 2016 5:18 am

Right, if that is the case than my current setup (tvheadend) wouldn't work in any case, I guess!

So, please allow me to ask openly then: what setup would you recommend me if I'd like to be able to stream and transcode live TV from my Raspberry Pi 3 to my android smartphone?? Would I still look for a kodi solution or would you recommend a plex solution?

Sorry for asking so basic but I am new to this topic ;-)
Stefan

HiroProtagonist
Posts: 212
Joined: Sat Jun 29, 2013 9:45 am

Re: Stream live TV to remote location

Tue Apr 12, 2016 5:24 am

Do you really need live streaming?

A simpler solution might be to record the programs you want on TVHeadend, then transfer to your local device & watch at your leisure.

Stefan2902
Posts: 27
Joined: Thu Mar 10, 2016 5:33 pm

Re: Stream live TV to remote location

Tue Apr 12, 2016 5:30 am

Problems with that are:

1) downloading ~1,5gb for a 45 min series is pretty heavy especially when it goes via VPN.

2) smartphone is rather old and does not have that many spare gb; however could add another SD card

3) always dependent on recordings and never watching live ;-)

I guess I would prefer live streaming but I am open in setting something up from scratch if it would work?!

Stefan2902
Posts: 27
Joined: Thu Mar 10, 2016 5:33 pm

Re: Stream live TV to remote location

Tue Apr 12, 2016 6:13 am

I have read about using kodi and PleXBMC at the same time (source: http://www.htpcbeginner.com/kodi-and-pl ... bmc-addon/). Do you think that would do the job to transcode live TV and any recordings to the smartphone?

Stefan2902
Posts: 27
Joined: Thu Mar 10, 2016 5:33 pm

Re: Stream live TV to remote location

Tue Apr 12, 2016 1:58 pm

Right, I have done some research now. Well I now understand that the PleXBMC client is not an option since I do not have a plex Media server installed anywhere.

However I wanted to investigate two things:

A) is it possible to activate transcoding on the tvheadend server v4.0.8?

B) is it an option to define a tvheadend stream profile which does not require such a high bandwidth?

Any thoughts on this?

HiroProtagonist
Posts: 212
Joined: Sat Jun 29, 2013 9:45 am

Re: Stream live TV to remote location

Tue Apr 12, 2016 10:23 pm

Have you tried asking in the TVHeadend forums?

Stefan2902
Posts: 27
Joined: Thu Mar 10, 2016 5:33 pm

Re: Stream live TV to remote location

Wed Apr 13, 2016 12:17 am

Understood! You are right. This is a very specific tvheadend question. Will try my best there. Thanks a lot. Stefan

gkreidl
Posts: 6092
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Stream live TV to remote location

Wed Apr 13, 2016 5:02 am

A RPi3 with the right (highly optimized) software is just about able to do real time transcoding of SD video, but that needs all resources (all 4 cores running at 95-100%) and won't leave any resources free to do other things.
Transcoding using the GPU can be done with a single core (30% load) and that includes transcoding full HD.
But this requires a full set of gestreamer1.0 modules including the omx module (not available on OpenElec, AFAIK).
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Stefan2902
Posts: 27
Joined: Thu Mar 10, 2016 5:33 pm

Re: Stream live TV to remote location

Thu Apr 14, 2016 5:35 am

Okay, thanks gkreidl for your explanation. In that case I will switch to the proposal you have made earlier (not based on openelec). Is there a simple tutorial out there which I can use to make the setup required?? Thanks again! Stefan

gkreidl
Posts: 6092
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Stream live TV to remote location

Thu Apr 14, 2016 6:34 am

Stefan2902 wrote:Okay, thanks gkreidl for your explanation. In that case I will switch to the proposal you have made earlier (not based on openelec). Is there a simple tutorial out there which I can use to make the setup required?? Thanks again! Stefan
The only way to combine the HW transcoding solution with kodi, is running Raspbian and installing kodi on top of it.
This is not a turnkey solution. You will have to invest some work to get it to run.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Stefan2902
Posts: 27
Joined: Thu Mar 10, 2016 5:33 pm

Re: Stream live TV to remote location

Thu Apr 14, 2016 6:58 am

Thanks! I fully appreciate to invest some work and I guess it is fun as well.

Installing Raspbian Jessie and configuring Kodi shouldn't be an issue. I was more wondering how I can configure the dvb-c USB stick if I am not using tvheadend server. I'd assume the stick need to be configured before I follow your instructions from viewtopic.php?f=38&t=123876 right? I was just wondering if there is a tutorial out there which describes the bare minimum it takes to configure live TV on Jessie before I can use your blob information?!

gkreidl
Posts: 6092
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Stream live TV to remote location

Thu Apr 14, 2016 7:07 am

Stefan2902 wrote:Thanks! I fully appreciate to invest some work and I guess it is fun as well.

Installing Raspbian Jessie and configuring Kodi shouldn't be an issue. I was more wondering how I can configure the dvb-c USB stick if I am not using tvheadend server. I'd assume the stick need to be configured before I follow your instructions from viewtopic.php?f=38&t=123876 right? I was just wondering if there is a tutorial out there which describes the bare minimum it takes to configure live TV on Jessie before I can use your blob information?!
I'm using mumudvb (and also supply the official mumudvb packages for the RPi). But this is not a turnkey solution like tvheadend or VDR. I've written my own SAT-TV-Server application to manage it (from a web interface), including transcoding.
Because so many people have asked me for the transcoding part, I have extracted it from my software and published it. I know that people have been using it with tvheadend and VDR.
viewtopic.php?f=75&t=108700
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Stefan2902
Posts: 27
Joined: Thu Mar 10, 2016 5:33 pm

Re: Stream live TV to remote location

Thu Apr 14, 2016 12:23 pm

Right! Thanks a lot for your great support. I will try to use tvheadend server then since I know it a bit already.

As soon as I am back from vacation I will try your proposed solution and will let you know.

Vielen Dank für deine Hilfe ;-)
Stefan

Stefan2902
Posts: 27
Joined: Thu Mar 10, 2016 5:33 pm

Re: Stream live TV to remote location

Wed Apr 20, 2016 3:49 am

I have now moved on from my former setup (Openelec, kodi, tvheadend backend) to my new setup (raspbian Jessie, kodi and tvheadend backend)

Unfortunately during configuration of the tvheadend backend (4.0.8jessie) under raspbian I do not find any services related to the muxes selected (scan status failed for all muxes) even though I did the same steps that under openelec?!

Does anybody have an idea how I can fix this?

gkreidl
Posts: 6092
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Stream live TV to remote location

Wed Apr 20, 2016 5:16 am

Stefan2902 wrote:I have now moved on from my former setup (Openelec, kodi, tvheadend backend) to my new setup (raspbian Jessie, kodi and tvheadend backend)

Unfortunately during configuration of the tvheadend backend (4.0.8jessie) under raspbian I do not find any services related to the muxes selected (scan status failed for all muxes) even though I did the same steps that under openelec?!

Does anybody have an idea how I can fix this?
You may have to add the firmware for your TV device.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Stefan2902
Posts: 27
Joined: Thu Mar 10, 2016 5:33 pm

Re: Stream live TV to remote location

Wed Apr 20, 2016 5:54 am

Thanks again for your swift reply. Under the configuration of the TV adapter (DVB-Inputs) I find my DVB-C hardware (Silicon Labs Si2168 : DVB-C #0).

However the USB stick has an LED which is not active (green light) under Raspbian but when I boot under Openelec I see the LED being constantly green. Hence this may support your thesis.

I will google how to add the firmware accordingly and will let you know.

So curious about the transcoding which comes afterwards ;-)

Stefan

Stefan2902
Posts: 27
Joined: Thu Mar 10, 2016 5:33 pm

Re: Stream live TV to remote location

Wed Apr 20, 2016 6:02 am

Worked:

Code: Select all

dmesg | grep firmware
showed: firmware file 'dvb-demod-si2168-02.fw' not found

Code: Select all

sudo wget http://palosaari.fi/linux/v4l-dvb/firmware/Si2168/dvb-demod-si2168-02.fw -O /lib/firmware/dvb-demod-si2168-02.fw
sudo wget http://palosaari.fi/linux/v4l-dvb/firmware/Si2168/Si2168-B40/d8da7ff67cd56cd8aa4e101aea45e052/dvb-demod-si2168-b40-01.fw -O /lib/firmware/dvb-demod-si2168-b40-01.fw
fixed it!

Will now continue.

Stefan2902
Posts: 27
Joined: Thu Mar 10, 2016 5:33 pm

Re: Stream live TV to remote location

Wed Apr 20, 2016 1:06 pm

So I have now installed the transcoding packages and decided to go for the following configuration option:
3) Using the file channels.dat

By default, this file is empty. You have to edit it first (as root) before it can be used. Enter lines of the following form:
channel_name=uri videomode audiomode audiopid [vo]
for example:
ZDF HD=http://192.168.0.34:9082/bysid/11110 hd1 mpeg 6120
(adding "vo" at the end, if you don't want to transcode the audio track).
Sorry for asking that stupid beginners question but where do I find the correct

- uri (in your sample: http://192.168.0.34:9082/bysid/11110)
- audiopid (6120)

per channel??

Stefan

Stefan2902
Posts: 27
Joined: Thu Mar 10, 2016 5:33 pm

Re: Stream live TV to remote location

Wed Apr 20, 2016 1:28 pm

I guess I found it right now:

URI - I found the sender id as service id in tvheadend
audiopid - I found it in tvheadend as info as well

Now I could get it started:
pi@raspberrypi:~/transcoder $ more /usr/local/share/transcode/channels.dat
# channel list for transcode.py
# Enter one line for each channel like this:
# channel_name=uri videomode audiomode audiopid [vo]
ZDF HD=http://192.168.178.71:9981/bysid/11110 hd1 mpeg 6120
# check the README for details
pi@raspberrypi:~/transcoder $ transcode.py
ZDF HD (0)
Enter a channel number or 'q' to quit: 0
Listening on http://127.0.0.1:9080/xyz.mkv
Hopefully last question: what is now the URL I need to open up from VLC in my network?? I have tried
but this doesn't work?! Any idea on the URL?

gkreidl
Posts: 6092
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Stream live TV to remote location

Wed Apr 20, 2016 2:34 pm

If the RPi of your RPi is 192.168.178.71, the default URL is:
http://192.168.178.71:9080/xyz.mkv
You can change the port and path in
/usr/local/share/transcode/config.py
and also bit rate, video size etc.
It's a Python file and many possible values are predefined. Just uncomment the values you want to use.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Stefan2902
Posts: 27
Joined: Thu Mar 10, 2016 5:33 pm

Re: Stream live TV to remote location

Wed Apr 20, 2016 2:47 pm

Thanks! I get the following authorization issue when calling out to

http://192.168.178.71:9080/xyz.mkv via VLC:
transcode.py
ZDF HD (0)
Enter a channel number or 'q' to quit: 0
Listening on http://127.0.0.1:9080/xyz.mkv
New connection 192.168.178.69:58771
Starting to stream to 192.168.178.69:58771
Starting pipeline
Error Unauthorized
Removing connection 192.168.178.69:58771
Do you know how I can provide credentials? Will it always stop the transcoding service after issues?

Return to “Media centres”