So I have got this working on my android phone and I thought I would write a small guide for anyone who wanted to know about it. This takes the freeview stream from the TV tuner, transcodes it and sends it to an android app either over home network/wifi or 4G/mobile data.
Things you will need:
TV Tuner
Mediaportal (I am using version 1.12 I have not tested this on newer versions)
MPExtended (Download link: https://github.com/puenktchen/MediaPortalTVPlugin/blob/master/sources/MPExtended-Service-0.6.0.4-Emby.zip)
Android device
aMPdroid app (found on Google Play Store)
Router with Dynamic DNS feature or sign up to a service that can do this (you only need this for 4G/mobile data viewing. Wifi streaming at home will not need this)
You will need to know the MAC address of the PC the tv tuner is installed.
Step 1
Install Mediaportal and scan and set up TV channels as per usual also make sure your EPG is working. For this to work easily it is best for the PC this will be installed on to have a static ip address on your home network.
Step 2 (only do this step if you want to view over 4G/mobile data)
Set up a Dynamic DNS. This will allow you to connect to your home network from outside even when the public ip address of your home internet connect changes (restarting router etc). I have an Asus AC66U router and it has this feature built in. Basically I can set up a public web address (Example: androidtvstream.asuscomm.com) and when I connect to it from anywhere in the world it will redirect me to my home network. You will need to google how to set this up.
Step 3
On your router you will need to forward one port. The default port MPExtended uses is 4322 but you can change this but it will need to be forwarded. Google "port forwarding" and your router make/model to find out how to do this.
Step 4
Install MPExtended. Open the MPExtended Configurator and towards the bottom on the left you should see green text that says "Service started". Please make sure when setting this all up that it always says that otherwise you might have problems when trying to link your android device to the PC. There is a "Stop" button under this if you want to stop the service. Next we have to configure it. In MPExtended Configurator under the "Configuration" tab you will see the option to change the port if you want to.
-For mobile data viewing:
While in the "Configuration" tab you will see the "External address" setting. In this section uncheck "Automatically detect external IP" and in the "Custom" text box you will put your public web domain you have created with Dynamic DNS.
-For Wifi:
While in the "Configuration" tab you will see the "External address" setting. The "Automatically detect external IP" will be checked by default and it should auto detect the ip address of your PC on your home network. If you have a static ip address then it should auto default to put the ip address in the "Custom" text box otherwise you will have to manually input the ip address of the machine into this.
Step 4.5
In MPExtended Configurator go to the "Authentication" tab. Here you can set up accounts credentials that the aMPdroid app uses. The default usename is "admin" and the default password is "admin". I highly recommend making a new user and password and not to use the admin. Also make sure that "Enable authentication (recommended!)" is checked.
Step 5
Install aMPdroid on your android device. In the app at the top you will see an icon which looks like volume sliders. This is the settings menu. Go into the settings menu and you will see and option called "Clients".
Go into "Clients" and tap "Add new client". I recommend for the next step you select "Manual" and input everything. However if you would like to use the "QR Scan" you are able to you which I will explain later. If you want to watch over your home network/wifi AND have 4G/mobile viewing your will need to set up TWO clients.
-aMPdroid client setup for wifi (manual)
Select "Manual" from the "Add new client" setting. Under the "Name" setting you can put whatever you like but if you are going to set up two clients for home network/wifi and 4G/mobile viewing then I recommend calling one Wifi and one Mobile. This will help you choose between when you need to switch from home network to mobile data.
For the "Host or IP Address" setting you need to put the ip address of the PC which is running the TV tuner/MPExtended.
Under "MAC Address" put the MAC Address of the PC which is running the TV tuner/MPExtended.
Check the box that says "Use Authentication" and type in the username and password you set up in MPExtended Configurator. Then tap the "Request access to service" button and if everything is set up right on your PC you should see a pop up from MPExtended asking you to granted access to your android device. Select your username from the drop down menu and click "Grant access". On the aMPdroid app then tap "OK".
-aMPdroid client setup for 4G/mobile data (manual)
Select "Manual" from the "Add new client" setting. Under the "Name" setting you can put whatever you like but if you are going to set up two clients for home network/wifi and 4G/mobile viewing then I recommend calling one Wifi and one Mobile. This will help you choose between when you need to switch from home network to mobile data.
For the "Host or IP Address" setting you need to put the Dynamic DNS web address you have created.
Under "MAC Address" put the MAC Address of the PC which is running the TV tuner/MPExtended.
Check the box that says "Use Authentication" and type in the username and password you set up in MPExtended Configurator. Then tap the "Request access to service" button and if everything is set up right on your PC you should see a pop up from MPExtended asking you to granted access to your android device. Select your username from the drop down menu and click "Grant access". On the aMPdroid app then tap "OK".
-aMPdroid client setup (QR Scan)
For "QR Scan" you will need to go into the MPExtended Configurator on your PC and click the "QR-Code" tab and it will display the QR Code and then tap "QR Scan" on the app and use the camera on your android device to take a picture of the QR Code. On my phone I had to turn it landscape for it to recognise the code. Once the QR Code has been scanned a list will pop up. Select the ip address of your machine. Then select the MAC address of your machine. At the next screen you should have the "Name", "Host or IP Address", and "MAC Address" fields filled in automatically. Check the box that says "Use Authentication" and type in the username and password you set up in MPExtended Configurator. Then tap the "Request access to service" button and if everything is set up right on your PC you should see a pop up from MPExtended asking you to granted access to your android device. Select your username from the drop down menu and click "Grant access". On the aMPdroid app then tap "OK".
Step 6
In aMPdroid go back to the main menu. At the top you should see the "Name" you put as the "Client name". If you have set up two clients you can tap this to switch between them. Now tap the "TV" button. Here you will see everything that you can access from Mediaportal. For an initial test I recommend going into the "Channel" option. Here it should say "Loading channels". If you get a pop up about not finding channel groups then go back into the aMPdroid settings and check the box that says "Show "All Channel" group". Then go back into the "Channel" option. All the freeview channels should show up. It make take a while for the channels to show up and for me at first it didn't work but I just restarted my phone and did the "Grant access" option again and then it worked. Tap on a channel you will see the EPG showing whats on schedule. The currently playing program will be shown in green. Tap on it. You will see the option to "record" or "stream" it. Pressing "record" will automatically start recording the show on your PC. Clicking the "stream" button will take you to the options for streaming to your android device. For this next part on my phone to get it to work I had to go into "Streaming Quality" setting and choose an option from the "FFmpeg HTTP Live Streaming" setting. All the options from HD down to ultra LQ settings work on my phone. These are all the quality options for streaming and you may have to try a different setting to get it to work on your device. After selecting your Streaming Quality just scroll up to the top and click "Play". It should say "Preparing video..." then after a bit it should say "Starting video..." and then it should play. This may take about 10-30 seconds so be paitent. For some reason on my device the initial stream will play for about 5 seconds then it will pause for another 5 seconds and then from then the stream will continue with no stuttering. So now you should have a live stream on your phone!
Some final notes:
-This does use CPU resources. When streaming on an AMD FX-8320 @ 4.0Ghz it has about 25% CPU usage.
-If you use this over mobile network remember it will use your mobile data. My initial test found that at the "FFmpeg HTTP Live Streaming HD" setting on the android app the PC will transcode the stream to about 300 KB/s. Thats kilobytes per second not kilobits. So it looks like its transcoding it to a 3 megabit stream. But please do your own tests to find out how much bandwidth it is using.
-I recommend trying to get this to work over wifi before attempting to get it to work over mobile data.
Pretty much everything I know about how to set this up is in this guide. So I don't know how much help I can be if you run into trouble. The main things I could think that go wrong are setting the clients up in aMPdroid and actually getting Mediaportal setup initially. For Mediaportal you may have to google any troubleshooting. If you have problems getting aMPdroid and MPExtended linked please make sure you have forwarded the port on your router and also I strongly advise having a static ip on your PC for wifi viewing. Also make sure you double check all your settings in the client setup page.
I hope if you try this you get it working!
Good luck!