Jump to content


Photo

Exteplayer3 help


  • Please log in to reply
18 replies to this topic

#1 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 19 May 2016 - 08:21

Ive installed this player but as yet Ive had little success in calling it from any plugins.

 

Could someone help me by telling me exactly how its imported and exactly what to change this line too.

 

self.session.open(MoviePlayer, sref)

 

The only plugin so far that calls and uses it is of course the IPTVPlayer plugin,but thats designed to use it.

 

I want to do away with movieplayer as its very old now and nowhere near as good as this new player is.

 

Thanks.


Edited by ian1095, 19 May 2016 - 08:23.


Re: Exteplayer3 help #2 fankoosh

  • Senior Member
  • 198 posts

+6
Neutral

Posted 19 May 2016 - 08:25

better to follow up the recent pages & posts in this thread so u know about it

http://forums.openpl...lopment-thread/



Re: Exteplayer3 help #3 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 19 May 2016 - 08:32

Yes I know about the Player itself and have followed its development,hence me now deciding it would be better to use this for all of my plugins rather than the default movieplayer.

 

And as I said,its all installed correctly and working.

 

But what I dont yet know is how to call upon it from other plugins ?

 

This is what I asked for help with.

 

Ian.


Edited by ian1095, 19 May 2016 - 08:33.


Re: Exteplayer3 help #4 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 19 May 2016 - 12:47

Sorted it.

 

Its quite easy really once you know how.



Re: Exteplayer3 help #5 hemertje

  • Forum Moderator
    PLi® Core member
  • 33,471 posts

+118
Excellent

Posted 19 May 2016 - 18:22

share it with us plz


on the Glassfibre 1GB DVB-C...


Re: Exteplayer3 help #6 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 19 May 2016 - 18:56

Soz it didnt work.

 

I thought it had until I ran top and it showed enigma2 at 25% together with Livestreamer at 10%

 

Exteplayer3 still wasnt running.

 

So back to the drawing board.

 

I know this is possible,we just need someone to tell us the correct python code to call upon it

 

Ian.



Re: Exteplayer3 help #7 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 20 May 2016 - 09:17

simply using this code

cmd=explayer_path+" "+stream_url

assuming explayer_path is /usr/bin/gstplayer you can use

cmd='/usr/bin/gstplayer "rtmp://ls3.webcamera.pl/sarbinowo_cam_bd6ec8/ playpath=sarbinowo_cam_bd6ec8.stream swfUrl=http://h264.webcamera.pl/player.swf? pageUrl=http://sarbinowo.webcamera.pl/ live=1 " -1  0  0  "" "0"  "18000"  "10240"  > /dev/null'
os.system(cmd)

but using os.system will not give you way to control functions of player like stop,pause and the best way to use eConsoleAppContainer

 

you can see IPTVplayer how manage external player in this file

https://gitlab.com/i...tmovieplayer.py



Re: Exteplayer3 help #8 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 22 May 2016 - 08:26

I dont think using os.system is a problem when using the mastag image that allows for the default player to be switched is it ?



Re: Exteplayer3 help #9 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 22 May 2016 - 20:18

Nearly have this sorted now and the Exteplayer3 is playing nearly all that I want it to.

 

However,Ive hit a brick wall regarding how the player would like cookies and user agents sent to it in a way it will recognize.

 

Adding these to the python code in the same manor as used with mediaplayer/Livestreamer doesn't work.

 

So would SamSamSam or someone else please be kind enough to give an example of how to add these to code that this player will except ?

 

Thanks.

 

Ian.


Edited by ian1095, 22 May 2016 - 20:22.


Re: Exteplayer3 help #10 samsamsam

  • Senior Member
  • 2,024 posts

+146
Excellent

Posted 22 May 2016 - 20:33

root@opticumtt:~# exteplayer3
{"EPLAYER3_EXTENDED":{"version":26}}
Usage: exteplayer3 filePath [-u user-agent] [-c cookies] [-h headers] [-p prio] [-a] [-d] [-w] [-l] [-s] [-i] [-t audioTrackId] [-x separateAudioUri] plabackUri
[-a] AAC software decoding
[-e] EAC3 software decoding
[-3] AC3 software decoding
[-d] DTS software decoding
[-w] WMA1, WMA2, WMA/PRO software decoding
[-l] software decoder use LPCM for injection (otherwise wav PCM will be used)
[-s] software decoding as stereo [downmix]
[-i] play in infinity loop
[-o 0|1] set progressive download
[-p value] nice value
[-t id] audio track ID switched on at start
[-h headers] set custom HTTP headers "Name: value\r\nName: value\r\n"
[-u user-agent] set custom http User-Agent header
[-x separateAudioUri]

So, what is your problem?

 

One more thing. You should never, ever use "system" call from plugin.

 

All info how to use exteplayer3 you can found in source code:

https://gitlab.com/i...tmovieplayer.py

 

Regards,

SSS


Edited by samsamsam, 22 May 2016 - 20:36.


Re: Exteplayer3 help #11 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 22 May 2016 - 22:37

I have to use Livestreamer for this HLS stream and then pass it on to exteplayer3 but the ls syntax isnt liked by exteplayer3 , same as exteplayer3 syntax isnt liked by Livestreamer, if done the other way around.

 

If I use the Livestreamer user agent and cookie I get a 400 returned

 

If I use the exteplayer3 user agent and cookie I also get a 400 returned

 

But if I use the Livestreamer user agent and cookie with Livestreamer and mediaplayer its fine, but both Livestreamer and mediaplayer are resource hungry hence my desire to pass the stream through to Exteplayer3

 

Ian.



Re: Exteplayer3 help #12 samsamsam

  • Senior Member
  • 2,024 posts

+146
Excellent

Posted 22 May 2016 - 22:41

In help you can see how to set cookie and User-Agent.

User-Agent  via option "-u"

Cookies and others headers via "-h"

 

So, how you set for example cookie?



Re: Exteplayer3 help #13 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 22 May 2016 - 22:53

Not Working with Exteplayer3

url = ("http://127.0.0.1:88/hls://" + url + " -h 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.104 Safari/537.36' -c '%s'" % cookieinfo)

Edited by ian1095, 22 May 2016 - 22:56.


Re: Exteplayer3 help #14 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 22 May 2016 - 22:55

Working Livestreamer code with mediaplayer

url = ("http://127.0.0.1:88/hls://" + url + " headers={'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.104 Safari/537.36', 'Cookie': '%s'}" % cookieinfo)

Edited by ian1095, 22 May 2016 - 22:56.


Re: Exteplayer3 help #15 samsamsam

  • Senior Member
  • 2,024 posts

+146
Excellent

Posted 23 May 2016 - 00:57

@ian1095

 

I give you link to the code. Did you check it? If yes why you try to set cookie with option "-c"? There is not such option.

 

There is options "-h" and "-u".

cmd = ''
headers = ''
headers += ('%s: %s\r\n' % ('Cookie', cookieinfo) )
cmd += ' -h "%s"' % headers
cmd += ' -u "%s"' %  'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.104 Safari/537.36'

Also you use some connection on localhost. Are you have the running server on localhost on port 88?

Also you post not valid uri. Char ':' is special one and can not be used after 'hls://'  you should quote this uri.


Edited by samsamsam, 23 May 2016 - 00:59.


Re: Exteplayer3 help #16 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 23 May 2016 - 10:04

Many thanks for all your help.

 

I have it working perfectly now,it was simply down to applying the correct syntax,as this player is new to me it was down to trial and error really.

 

But now it is working,I can vouch that this Player truly is an amazing leap forward for E2 images,certain HLS and HDS streams used to use about 30% CPU from the Livestreamersrv and up to 50-60% CPU from enigma2 Movieplayer.

 

Now the same streams even use less CPU from the Livestreamersrv but the major benefit is that they are only using between 1% - 4% CPU from Exteplayer !!

 

This means although I'm using a Gen 2 box, that these streams which we previously unusable on Gen 1 boxes,are now playable.

 

Truly amazing and a massive credit to you for developing this player.

 

Ian.



Re: Exteplayer3 help #17 saintomer1866

  • Senior Member
  • 48 posts

+2
Neutral

Posted 23 May 2016 - 21:58

Just reading through the thread with some interest and think you may be contradicting yourself samsamsam,

or am i reading this wrong ?

 

@ian1095

 

I give you link to the code. Did you check it? If yes why you try to set cookie with option "-c"? There is not such option.

 

There is options "-h" and "-u".

 

 


Usage: exteplayer3 filePath [-u user-agent] [-c cookies] [-h headers] [-p prio] [-a] [-d] [-w] [-l] [-s] [-i] [-t audioTrackId] [-x separateAudioUri] plabackUri


Have to agree with Ian here it really is a great player and deserves to be included in mainstream images,

nice work.

 

St.O



Re: Exteplayer3 help #18 samsamsam

  • Senior Member
  • 2,024 posts

+146
Excellent

Posted 24 May 2016 - 01:25

@saintomer1866

 

No. You are wrong. Did you read my post?

I ask to check:

https://gitlab.com/i...tmovieplayer.py

 

There is comment:


#cmd += ' ""' # cookies for now will be send in headers



Re: Exteplayer3 help #19 ian1095

  • Senior Member
  • 462 posts

+6
Neutral

Posted 25 May 2016 - 13:18

Yes it was for exactly that reason as to why I first tried -c for cookies as it was in SamSamSam's example and the info about the cookies being sent by the headers for now,is not until about line 1500 in the code and I missed that info until SSS pointed me in the right direction.

 

All academic now though as its working perfectly. Getting Livestreamer to send the headers and cookies to the Player was a pain as they both want different Char's but once that was sorted,everything is great and as posted earlier,the results are just fantastic.

 

No other word for it.

 

Ian.


Edited by ian1095, 25 May 2016 - 13:20.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users