Project

General

Profile

HowTO: TVHeadend with PowerVU

Added by B C about 5 years ago

Prerequisites

  • build OSEmu from the tvheadend branche in my repository: https://github.com/L-S-D/OSEmu/tree/tvheadend
  • start OSEmu like this: ./OSEmu -a user:pass -p1234 -s tvheadendhostip -r 9981 17999 -c /path/to/PowerVU_keyfile -b
  • create a PowerVU streaming profile with mpeg-ts passthrough and enable PAT and SDT rewrite
  • create a PowerVU user with PW PowerVU (or whatever) with PowerVU as streaming profile
  • use this script to generate an m3u file for iptv automux creration:
#!/bin/bash
# you must have installed jq (apt-get install jq) 

############### BEGIN CONFIG ###################
tvh_data_path="/home/hts/.hts"                                 
OSEmu="osemuipaddress:17999" 
profile="PowerVU"     
userpass="PowerVU:PowerVU"           
###############  END CONFIG  ###################

echo \#EXTM3U
grep -rnwl $tvh_data_path'/tvheadend/input/dvb/networks' -e '\"caid\": 3584' | while read  -r services      
do
    enabled=$(/usr/bin/jq -c  '.enabled'  $services)
    if [ "$enabled" = "true" ]
    then
        echo \#EXTINF:-1, $(/usr/bin/jq -c -r '.networkname' ${services:0:-81}/config)/$(/usr/bin/jq -c -r '.frequency/1000' ${services:0:-42}/config)$(/usr/bin/jq -c -r '.polarisation' ${services:0:-42}/config)/$(/usr/bin/jq -c -r  '.svcname'  $services)
        echo http://[email protected]$OSEmu/stream/service/$(basename "$services")\?profile=$profile\&descramble=0\&emm=1
    fi
done  

for testing you might strip down the generated m3u just to one channel of interest at the beginnning

  • add an IPTV Automatic Network to tvh (v627 or later), enable Skip Initial Scan, Maximum Input Streams: 1 and set URL to file:///path/filename.m3u

If all succeeded you should have a single channel on each mux automatically created after initial scanning which can be played and added to channels just like any other service. Don't use the service on sat directly as this won't play. start ./OSEmu with -v instead of -b to see some log output which should be like this:

[Emu] stream client connected
[Emu] stream client request /stream/service/f185b1ebb025ce2a32aee936f9e161be?profile=PowerVU&descramble=0&emm=1
[Emu] stream found pmt pid: 15F7 for sid 26F
[Emu] stream found ecm_pid: 19DF
[Emu] stream found video pid: CBC
[Emu] stream found audio pid: CC6
[Emu] stream found audio pid: C94
[Emu] stream found audio pid: C96

Have fun
LSD


Replies (43)

RE: HowTO: TVHeadend with PowerVU - Added by Sean Micklem about 5 years ago

Just out of curiosity, what part of the world are you in? Reason I ask is because I don't think this would be at all useful in certain areas of the world, such as North America.

RE: HowTO: TVHeadend with PowerVU - Added by B C about 5 years ago

well I'm from Europe BUT in NA it makes the most sense :-)

Besides this, this forum and tvh is for people from around the world, good for you as ATSC wouldn't have made it into tvh otherwise.

RE: HowTO: TVHeadend with PowerVU - Added by Sean Micklem about 5 years ago

Never said this forum wasn't for people from around the world, just that as far as I can determine what you are doing here is not applicable in North America. Many things about satellite TV are different here, starting with the fact that we do not have free-to-air channels that are intended for reception directly by the home viewer. There are a few minor exceptions to that (mostly religious channels that want your money) but we do not have the type of free-to-air, direct to home service that you are familiar with in Europe.

Actually part of the problem may be a lack of information on how this would be useful here, but at this point I'm just not seeing how it could possibly work in North America (unless maybe you can receive a transatlantic satellite from your location?).

RE: HowTO: TVHeadend with PowerVU - Added by Sean Micklem about 5 years ago

I think you miss my point. The problem is, as I read the instructions for the program from the repository you mention, the software you mentioned paired with TVheadend and NOTHING ELSE would not have any effect on any signals on North American satellites. I emphasize the "NOTHING ELSE" because if anything else is required, that's the problem, particularly if it has to come from a different site that's not under your control. What's available for Europe is NOT available for North America. Look for yourself and see. And if you don't agree with what I'm telling you, then either you need to rewrite the instructions on the software, or you're choosing to ignore the obvious. And that's all I'm going to say about this because it seems pretty obvious to me that you're not at all familiar with how things work, or in this case, don't work in North America.

RE: HowTO: TVHeadend with PowerVU - Added by B C about 5 years ago

well ok, you need a satellite dish, a c-band lnbc, keys you have to search for with google and you are good (oh, don't forget a computer and cabels, monitor...). and nothing else. PowerVU is the mother of encryption in NA cable backends. I'm not sure if you know there is anything else than Dish and co where you are living....

RE: HowTO: TVHeadend with PowerVU - Added by Sean Micklem about 5 years ago

Really hate having to state the obvious, but you can search for unicorns with Google, too. Doesn't mean you'll find any, and if you do they won't be real.

RE: HowTO: TVHeadend with PowerVU - Added by B C about 5 years ago

this is no site to talk about keys, and the hack of PowerVU makes it easy to search for keys yourself (without Google, with a program on your computer) you just need the knowledge, but also this does not belong here.

RE: HowTO: TVHeadend with PowerVU - Added by Anonymous about 5 years ago

I did everything as instructed and not working. For example. I want to watch the program "TLC Ukraine" from 4.8E.

In OSEmu log i have:

starting thread emu stream client
emu stream client thread started
[Emu] stream client connected
[Emu] stream client request /stream/service/2350b9324dfa65626ba3ab65f1c7d8ca?profile=PowerVU&descramble=0&emm=1
[Emu] stream found pmt pid: 1EA for sid 190
[Emu] stream found ecm_pid: 1E0
[Emu] stream found video pid: 190
[Emu] stream found audio pid: 191
[Emu] stream found audio pid: 192
[Emu] Key not found: P 10190 01
[Emu] Key not found: P 10190 01
[Emu] Key not found: P 10190 01
[Emu] Key not found: P 10190 01
[Emu] Key not found: P 10190 01
[Emu] Key not found: P 10190 01
[Emu] Key not found: P 10190 01
[Emu] Key not found: P 10190 01
[Emu] Key not found: P 10190 01

in SofCam.key i have

P 1900 01 (key) ; TLC Ukraine (ukr), 4.8°E 12226-H-25540
P 1900 00 (key) ; TLC Ukraine (ukr), 4.8°E 12322-V-27500

The file with the keys is read correctly, because other coded programs (BISS) work. This error may be caused by an outdated key?

RE: HowTO: TVHeadend with PowerVU - Added by B C about 5 years ago

basically it means either wrong key (if you have only one entry with P 1900 01) or if you have two of them, you have to change one of them to P 11900 01 (P 21900 01 if you have 3 etc)

RE: HowTO: TVHeadend with PowerVU - Added by B C about 5 years ago

BTW, there are regular key changes on 4.8E, and TLC changed today, as I had it running yesterday but not today, so look out for the right stuff.

RE: HowTO: TVHeadend with PowerVU - Added by Anonymous about 5 years ago

The problem was an old key and wrong srvid. I checked all programs from of 12360V (4,8E) and all are working.

Many thanks for the tutorial.

RE: HowTO: TVHeadend with PowerVU - Added by B C about 5 years ago

happy to hear it's working for you, feel free to pm me (you know what :-))

RE: HowTO: TVHeadend with PowerVU - Added by Sean Micklem about 5 years ago

B C wrote:

this is no site to talk about keys, and the hack of PowerVU makes it easy to search for keys yourself (without Google, with a program on your computer) you just need the knowledge, but also this does not belong here.

[...and then, in your next two posts...]

B C wrote:

basically it means either wrong key (if you have only one entry with P 1900 01) or if you have two of them, you have to change one of them to P 11900 01 (P 21900 01 if you have 3 etc)

B C wrote:

BTW, there are regular key changes on 4.8E, and TLC changed today, as I had it running yesterday but not today, so look out for the right stuff.

Oh, the irony!

Just as a rhetorical question, if someone does not have "the knowledge", how are they supposed to get "the knowledge?" Is this a secret society, where if you're not "in the know" you probably never will be?

So far, you haven't even suggested a search word or phrase that would bring up results that would belie the fact that this won't work in North America (just proving that some broadcasters use PV in NA doesn't count). I don't think this is a site to discuss the "k" word either, but what I'm saying is that the ones that are out there, at least those that can be found using Google, are for satellites in other parts of the world besides North America. All I was originally attempting to establish is that your software is Euro-centric, or at least pretty much limited to the Eastern hemisphere, and even though you don't live in North America you seem to want to argue the point, despite not offering any evidence to the contrary. If you still feel the need to try and refute that, fine - let's see a URL or a search phrase or something. Otherwise, just be happy with the fact that your program is useful to people in some parts of the world, such as Europe and maybe Africa, Asia and Australia, because hardly any software is useful to people at every single place on earth.

RE: HowTO: TVHeadend with PowerVU - Added by gary tan about 5 years ago

anyone get this working with openelec?

RE: HowTO: TVHeadend with PowerVU - Added by gary tan about 5 years ago

@B C, i know you have powervu working directly working with tvheadend now but do you have a guide for using dvbviewer pro (i saw you mention you were using that previously in another thread). I have dvbviewer working but cant get to get stream working in tvheadend. Any guide would be appreciated!

thanks

RE: HowTO: TVHeadend with PowerVU - Added by gary tan about 5 years ago

ignore, figured it out!

RE: HowTO: TVHeadend with PowerVU - Added by Jozef Mehursky almost 5 years ago

Hi,

thank you for this detailed howto.
I made some progress, but still have lot of questions:

I am running Openelec 5.0.8. The tvheadend version is: HTS Tvheadend 3.9.2765~g0294882
is it suitable for setup you are describing?

I added IPTV Network (no URL field there), so then i have added a MUX to this network - there i could enter the URL to the playlist.
It did not accept file path as URL though. So i added an http:// url to the playlist (on my local http server, and it is serving the m3u file, i tested it with wget)

Network scan fails.
But when I start vlc (or mplayer) with http url to m3u as parameter, it connets but doesn't get response.
The osemu log says:
reading key file: /storage/.kodi/userdata/Scripts/osemu/SoftCam.Key
[Emu] info: FFDecsa parallel mode = 128
[Emu] stream client connected
[Emu] stream client disconnected
[Emu] stream client connected
[Emu] stream client disconnected
[Emu] stream client connected

PS:
I had to adopt the automux script because of stripped down bash in the Openelec which doesn't recognize the $(services:0:-81) construct.

Here it is:
-----------------

#!/bin/bash
# you must have installed jq (apt-get install jq) 

############### BEGIN CONFIG ###################
tvh_data_path="/storage/.kodi/userdata/addon_data/service.multimedia.tvheadend"                                 
OSEmu="192.168.1.30:17999" 
profile="PowerVU"     
userpass="PowerVU:PowerVU"  
jq="/storage/.kodi/userdata/Scripts/bin/jq"         
###############  END CONFIG  ###################
echo \#EXTM3U
grep -rnwl $tvh_data_path'/input/dvb/networks' -e '\"caid\": 3584' | while read  -r services      
do
    enabled=$($jq -c  '.enabled'  $services)
    if [ "$enabled" = "true" ]
    then

        s81=`echo $services | awk '{print substr($0,1,length($0)-81)}'`
        s42=`echo $services | awk '{print substr($0,1,length($0)-42)}'`

        echo \#EXTINF:-1, $($jq -c -r '.networkname' ${s81}/config)/$($jq -c -r '.frequency/1000' ${s42}/config)$($jq -c -r '.polarisation' ${s42}/config)/$($jq -c -r  '.svcname'  $services)
        echo http://[email protected]$OSEmu/stream/service/$(basename "$services")\?profile=$profile\&descramble=0\&emm=1
    fi
exit
done 

Thank you again for writing this howto.
I hope to get some hints to be able make some progress

RE: HowTO: TVHeadend with PowerVU - Added by Anonymous almost 5 years ago

Try using profile without user and password.

RE: HowTO: TVHeadend with PowerVU - Added by Jozef Mehursky almost 5 years ago

and @gary, i see you figured out how to make it work with openelec and tvheadend - so please share some information.

Thank you

RE: HowTO: TVHeadend with PowerVU - Added by gary tan almost 5 years ago

@Jozef Mehursky

I only got it working through dvbviewer on windows and adding the dvbviewer channel rtsp link to tvheadend. Not the method BC describes unfortunately.

RE: HowTO: TVHeadend with PowerVU - Added by B C almost 5 years ago

with a little bit more details I'm sure I can help you, so output of OSEmu, tvheadend....

RE: HowTO: TVHeadend with PowerVU - Added by faisaly 1932 almost 5 years ago

My experience 1

donload zip https://github.com/L-S-D/OSEmu/tree/tvheadend

and just make

HTS Tvheadend 4.1-971~g5192186

source

http://localhost:9981/play/stream/service/15dac3d0b73864338ec6ffe98f5814dd?title=Pacific%20%2F%20

http://localhost:9981/play/stream/mux/c384ebdb79939fcada508e35198586bf?title=11804V%20%2F%209E

in vlc

http://localhost:17999/play/stream/mux/c384ebdb79939fcada508e35198586bf?uuid=15dac3d0b73864338ec6ffe98f5814dd

work just one channel service id 1 ===========================================
OSEmu version 720
reading key file: xxxxxxx/SoftCam.Key
[Emu] info: FFDecsa parallel mode = 32
[Emu] stream client connected
[Emu] stream client request /play/stream/mux/c384ebdb79939fcada508e35198586bf?uuid=15dac3d0b73864338ec6ffe98f5814dd
[Emu] stream client disconnected

2015-11-16 23:29:24.280 [ NOTICE] START: HTS Tvheadend version 4.1-971~g5192186 started, running as PID:10359 UID:1001 GID:1001, CWD:/home/xxxxxxx CNF:/home/xxxxxxx/.hts/tvheadend
2015-11-16 23:29:25.120 [ INFO] AVAHI: Service 'Tvheadend' successfully established.
2015-11-16 23:36:30.550 [ INFO] mpegts: 11804V in 9E - tuning on Conexant CX24123/CX24109 : DVB-S #0
2015-11-16 23:36:31.009 [ INFO] subscription: 0001: "HTTP" subscribing to mux "11804V", weight: 10, adapter: "Conexant CX24123/CX24109 : DVB-S #0", network: "9E", service: "Raw PID Subscription", hostname="127.0.0.1", client="Wget/1.16 (linux-gnu)"
2015-11-16 23:36:31.061 [WARNING] linuxdvb: Unable to provide UNC value.
2015-11-16 23:36:48.936 [ INFO] subscription: 0001: "HTTP" unsubscribing, hostname="127.0.0.1", client="Wget/1.16 (linux-gnu)"
2015-11-16 23:38:00.426 [ INFO] mpegts: 11804V in 9E - tuning on Conexant CX24123/CX24109 : DVB-S #0
2015-11-16 23:38:00.869 [ INFO] subscription: 0002: "HTTP" subscribing to mux "11804V", weight: 10, adapter: "Conexant CX24123/CX24109 : DVB-S #0", network: "9E", service: "Raw PID Subscription", hostname="127.0.0.1", client="Wget/1.16 (linux-gnu)"
2015-11-16 23:38:05.851 [ INFO] subscription: 0002: "HTTP" unsubscribing, hostname="127.0.0.1", client="Wget/1.16 (linux-gnu)" ===========================================
vlc 2

http://localhost:17999/stream/service/15dac3d0b73864338ec6ffe98f5814dd?profile=pass&descramble=0&emm=1

nothing work

[Emu] stream client connected
[Emu] stream client request /stream/service/15dac3d0b73864338ec6ffe98f5814dd?profile=pass&descramble=0&emm=1
[Emu] stream client disconnected
Terminated
[email protected]:~$

[Emu] info: FFDecsa parallel mode = 32
[Emu] stream client connected
[Emu] stream client request /stream/service/15dac3d0b73864338ec6ffe98f5814dd?profile=pass&descramble=0&emm=1

2015-11-16 23:47:02.448 [ NOTICE] START: HTS Tvheadend version 4.1-971~g5192186 started, running as PID:10842 UID:1001 GID:1001, CWD:/home/xxxxxxx CNF:/home/xxxxxxx/.hts/tvheadend
2015-11-16 23:47:03.246 [ INFO] AVAHI: Service 'Tvheadend' successfully established.
2015-11-16 23:47:20.830 [ INFO] mpegts: 11804V in 9E - tuning on Conexant CX24123/CX24109 : DVB-S #0
2015-11-16 23:47:21.289 [ INFO] subscription: 0001: "HTTP" subscribing to service "9E/11804V/Pacific", weight: 100, adapter: "Conexant CX24123/CX24109 : DVB-S #0", network: "9E", mux: "11804V", profile="pass", hostname="127.0.0.1", client="Wget/1.16 (linux-gnu)"
2015-11-16 23:47:21.341 [WARNING] linuxdvb: Unable to provide UNC value.
2015-11-16 23:48:01.824 [ INFO] subscription: 0001: "HTTP" unsubscribing, hostname="127.0.0.1", client="Wget/1.16 (linux-gnu)"
2015-11-16 23:48:03.765 [ INFO] epgdb: snapshot start
2015-11-16 23:48:03.766 [ INFO] epgdb: queued to save (size 193)
2015-11-16 23:48:03.766 [ INFO] epgdb: brands 0
2015-11-16 23:48:03.766 [ INFO] epgdb: seasons 0
2015-11-16 23:48:03.766 [ INFO] epgdb: episodes 0
2015-11-16 23:48:03.766 [ INFO] epgdb: broadcasts 0
2015-11-16 23:48:03.766 [ INFO] mpegts: 11804V in 9E (0xa1ba4e8) - deleting
2015-11-16 23:48:03.852 [ INFO] epgdb: save start
2015-11-16 23:48:03.853 [ INFO] epgdb: stored (size 193)
2015-11-16 23:48:04.067 [ NOTICE] STOP: Exiting HTS Tvheadend ===========================================

I think something is missing in OSEmu

RE: HowTO: TVHeadend with PowerVU - Added by Joe User almost 5 years ago

There is no need for a modified osemu anymore. You can use the official oscam-emu or osemu. You just need to change the URL to something like:

http://pvu:[email protected]:17999/stream/service/5207215882cb76f456a5d65ecfba2124?profile=PowerVU&descramble=0&emm=1:0:0:4

Where the last number is the sid(srvid) of the channel in hex.

Here are some modified scripts to create vlc playlists and userbouquets for use with enigma2.

VLC playlist:

#!/bin/bash
# you must have installed jq (apt-get install jq)

############### BEGIN CONFIG ###################
tvh_data_path="/home/hts/.hts" 
OSEmu="192.168.1.10:17999" 
profile="PowerVU" 
userpass="pvu:pvu" 
###############  END CONFIG  ###################

echo \#EXTM3U
grep -rnwl $tvh_data_path'/tvheadend/input/dvb/networks' -e '\"caid\": 3584' | while read  -r services
do
    enabled=$(/usr/bin/jq -c  '.enabled'  $services)
    sid_dec=$(/usr/bin/jq -c  '.sid'  $services)
    sid=$(printf '%x' $sid_dec)
    desc=$(/usr/bin/jq -c -r '.networkname' ${services:0:-81}/config)/$(/usr/bin/jq -c -r '.frequency/1000' ${services:0:-42}/config)$(/usr/bin/jq -c -r '.polarisation' ${services:0:-42}/config)/$(/usr/bin/jq -c -r  '.svcname'  $services)
    if [ "$enabled" = "true" ]
    then
        echo \#EXTINF:-1, $desc
        echo http://[email protected]$OSEmu/stream/service/$(basename "$services")\?profile=$profile\&descramble=0\&emm=1:0:0:$sid
    fi
done

Enigma2 userbouquet:

#!/bin/bash
# you must have installed jq (apt-get install jq)

############### BEGIN CONFIG ###################
tvh_data_path="/home/hts/.hts" 
OSEmu="192.168.1.10%3A17999" 
profile="PowerVU" 
userpass="pvu%3Apvu" 
###############  END CONFIG  ###################

echo \#NAME PowerVU Channels
grep -rnwl $tvh_data_path'/tvheadend/input/dvb/networks' -e '\"caid\": 3584' | while read  -r services
do
    enabled=$(/usr/bin/jq -c  '.enabled'  $services)
    sid_dec=$(/usr/bin/jq -c  '.sid'  $services)
    sid=$(printf '%x' $sid_dec)
    desc=$(/usr/bin/jq -c -r '.networkname' ${services:0:-81}/config)/$(/usr/bin/jq -c -r '.frequency/1000' ${services:0:-42}/config)$(/usr/bin/jq -c -r '.polarisation' ${services:0:-42}/config)/$(/usr/bin/jq -c -r  '.svcname'  $services)
    if [ "$enabled" = "true" ]
    then
        echo \#SERVICE 1:0:1:$sid:0:0:0:0:0:0:http%3A//[email protected]$OSEmu/stream/service/$(basename "$services")\?profile=$profile\&descramble=0\&emm=1%3A0%3a0%3A$sid:$desc
        echo \#DESCRIPTION $desc
    fi
done

Also, since oscam-emu/osemu ignores the user:password in the url request, you must setup the user:password for TVHeadend in oscam-emu/osemu.
For OSEmu, add "-t <stream source user>:<stream source password>" to the command line:

./OSEmu -a user:pass -p1234 -s tvheadendhostip -r 9981:17999 -c /path/to/PowerVU_keyfile -b -t PowerVU:PowerVU

And for oscam-emu, you have to add the user:password to the oscam.conf file in the streamrelay section:

[streamrelay]
stream_source_port            = 9981
stream_source_auth_user       = PowerVU
stream_source_auth_password   = PowerVU

BTW:
I left the user:pasword in the url in the scrips because in the future I would like to change oscam-emu/osemu so it parses the http request and passes on the user:password hash to enigma2/TVHeadend instead of making it an oscam-emu/osemu config option.

(1-25/43)