Poll: Most Desired Feature To Be Added
Other Movie Ratings
Download Movie Trailers
Home Automation scripting
Other Movie Streaming Location
Trivia Intro Fixed
Cartoon Video Option
More Videos for before Feature(s) - Specify how many
[Show Results]
 

[RELEASE] Cinema Experience - the new Home Theater Experience Script

  Thread Rating:
  • 23 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
dezblack Offline
Junior Member
Posts: 20
Joined: Jan 2014
Reputation: 0
Post: #3691
I am on a gotham nightly
find quote
giftie Online
Skilled Python Coder
Posts: 2,331
Joined: Mar 2010
Reputation: 53
Location: Calgary, Alberta
Post: #3692
(2014-04-15 18:34)dezblack Wrote:  I am on a gotham nightly

Then you can add the following to the home_automation.py file(that exists in your userdata/addon_data/script.cinema.experience folder)

insert after line 15:
Code:
if sys.version_info < (2, 7):
    import simplejson
else:
    import json as simplejson

_3d_mode_query           = '''{"jsonrpc": "2.0", "method": "Settings.GetSettingValue",  "params": { "setting": "videoscreen.stereoscopicmode" }, "id": 1}'''

_3d_modes = [ "none",                  
              "over_under",            
              "side_by_side",          
              "anaglyph_cyan_red",      
              "anaglyph_green_magenta",
              "interlaced",      
              "hardware",      
              "mono_2d",
              "",
              "",
              "",
              "",              
            ]

Then replace the movie trigger with:

Code:
elif trigger == "Movie" and ha_settings[ "ha_movie" ]:
            utils.broadcastUDP( "<b>CE_Automate<li>movie_start</b>" )
            xbmc.sleep(250)
            result = xbmc.executeJSONRPC( _3d_mode_query )
            _3d_mode = 'mono'
            json = simplejson.loads( result)
            if json.has_key('result'):
                if json[ 'result' ].has_key( 'value' ):
                    _3d_mode = _3d_modes[ int( json[ 'result' ][ 'value' ] ) ]
                    utils.broadcastUDP( "<b>CE_Automate<li>3D_Mode_Event<%s></b>" % _3d_mode )

You are then able to create events based on the actual screen format. Eventghost will see "CE_Automate<li>3D_Mode_Event<xxxx>" with 'xxxx' representing the stereoscopic mode of XBMC's video screen. You may need to add some more delay before the query, as XBMC may need some time to switch modes, xbmc.sleep(250) provides 250ms of delay, playing around with this time(in milliseconds) will allow you to fine tune the delay.

None of this is tested, though I took most of the code from my personal 3D Mode broadcaster - https://github.com/Giftie/service.3dmode_broadcaster. I use this to switch my TV through my control system

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


find quote
revned Offline
Member
Posts: 94
Joined: Aug 2009
Reputation: 0
Post: #3693
(2014-04-15 18:25)giftie Wrote:  
(2014-04-15 10:22)revned Wrote:  Is it possible to let the script play a random movie from the library?

Since the removal of HTTP-API from XBMC(now going on 2 years) there is no direct method of randomly choosing a movie to play. A script can be created that can poll XBMC for all of the Movie ID's then randomly choose an ID. Then it can call the script with the ID.

Thanks for your answer. Unfortunately I have no idea how to do this Sad
find quote
dezblack Offline
Junior Member
Posts: 20
Joined: Jan 2014
Reputation: 0
Post: #3694
(2014-04-15 18:57)giftie Wrote:  
(2014-04-15 18:34)dezblack Wrote:  I am on a gotham nightly

Then you can add the following to the home_automation.py file(that exists in your userdata/addon_data/script.cinema.experience folder)

insert after line 15:
Code:
if sys.version_info < (2, 7):
    import simplejson
else:
    import json as simplejson

_3d_mode_query           = '''{"jsonrpc": "2.0", "method": "Settings.GetSettingValue",  "params": { "setting": "videoscreen.stereoscopicmode" }, "id": 1}'''

_3d_modes = [ "none",                  
              "over_under",            
              "side_by_side",          
              "anaglyph_cyan_red",      
              "anaglyph_green_magenta",
              "interlaced",      
              "hardware",      
              "mono_2d",
              "",
              "",
              "",
              "",              
            ]

Then replace the movie trigger with:

Code:
elif trigger == "Movie" and ha_settings[ "ha_movie" ]:
            utils.broadcastUDP( "<b>CE_Automate<li>movie_start</b>" )
            xbmc.sleep(250)
            result = xbmc.executeJSONRPC( _3d_mode_query )
            _3d_mode = 'mono'
            json = simplejson.loads( result)
            if json.has_key('result'):
                if json[ 'result' ].has_key( 'value' ):
                    _3d_mode = _3d_modes[ int( json[ 'result' ][ 'value' ] ) ]
                    utils.broadcastUDP( "<b>CE_Automate<li>3D_Mode_Event<%s></b>" % _3d_mode )

You are then able to create events based on the actual screen format. Eventghost will see "CE_Automate<li>3D_Mode_Event<xxxx>" with 'xxxx' representing the stereoscopic mode of XBMC's video screen. You may need to add some more delay before the query, as XBMC may need some time to switch modes, xbmc.sleep(250) provides 250ms of delay, playing around with this time(in milliseconds) will allow you to fine tune the delay.

None of this is tested, though I took most of the code from my personal 3D Mode broadcaster - https://github.com/Giftie/service.3dmode_broadcaster. I use this to switch my TV through my control system

Perfect, thank you! Now I need to figure out why my 3d sbs movies have the right eye blacked out when using CE. they work fine when just playing without CE.
find quote
Mungo Offline
Member
Posts: 80
Joined: Jan 2012
Reputation: 2
Location: QLD Australia
Post: #3695
(2014-04-15 01:33)Mungo Wrote:  
(2014-04-14 19:49)giftie Wrote:  Require a full debug log

Will change the path again, recreate and grab that tonight. Smile

Cheers,

Mungo

Apologies for the lateness - I was out last night for B-day celebrations.

It's weird, and unfortunate - but changing my folder name back to "intro's" to try and reproduce this issue didn't really work. For some reason, it now appears to play all files successfully, where before it didn't - even after going through the gui and putting all the path's back in multiple times. In having said that - the log does still show (for one path at least) the issue I had described, on line 989:

http://xbmclogs.com/show.php?id=174960

This path was also what was visible in the GUI (but again, isn't now, when I'm trying to reproduce the issue)

Hopefully it's of some help. Otherwise, I'll just try and refrain from using special characters in my paths.

Cheers,

Mungo
find quote
inv3ntor Offline
Junior Member
Posts: 20
Joined: May 2010
Reputation: 0
Post: #3696
Hey guys, running latest stable xbmc12.3, aeon nox skin, windows 7 32bit.

Just started using cinema experience yesterday, so far i have everything running fine except the Trailers dont play (and therefore coming attractions intro/outro)

Everything else fires off as it should, Theatre intro, feature intro, rating video, audio video, feature outro, intermission, theatre outro. I dont use the trivia options and dont really plan to.

I think the reason maybe instead of streaming them, im tying to play them from a local folder. I have it set to "2 trailers", Trailer Scraper: "local folder", and pointed it to the folder i have named "Trailer Scraper" in the cinema experience>videos folder, im using the folder structure shown on the wiki..but it does not show anything for a trailer folder so i just used something logical. (threw it in videos folder, named it what the settings screen calls it "Trailer Scraper" as thats basically true for the rest)

I have deselected the 3 limit options underneath. The trailers themselves are .mp4 files with random names.

Is there something specific i need to do, or will it simply not play 2 random trailer files from that folder for me? I can think of a workaround but would be nice to get it to work. (workaround would be replace theatre intro folder with contents on feature intro folder, then dump trailers in feature intro folder..of course then i no longer get to see my original theatre intro videos..but it was just the red curtain opening)
find quote
giftie Online
Skilled Python Coder
Posts: 2,331
Joined: Mar 2010
Reputation: 53
Location: Calgary, Alberta
Post: #3697
(2014-04-17 13:22)inv3ntor Wrote:  Hey guys, running latest stable xbmc12.3, aeon nox skin, windows 7 32bit.

Just started using cinema experience yesterday, so far i have everything running fine except the Trailers dont play (and therefore coming attractions intro/outro)

Everything else fires off as it should, Theatre intro, feature intro, rating video, audio video, feature outro, intermission, theatre outro. I dont use the trivia options and dont really plan to.

I think the reason maybe instead of streaming them, im tying to play them from a local folder. I have it set to "2 trailers", Trailer Scraper: "local folder", and pointed it to the folder i have named "Trailer Scraper" in the cinema experience>videos folder, im using the folder structure shown on the wiki..but it does not show anything for a trailer folder so i just used something logical. (threw it in videos folder, named it what the settings screen calls it "Trailer Scraper" as thats basically true for the rest)

I have deselected the 3 limit options underneath. The trailers themselves are .mp4 files with random names.

Is there something specific i need to do, or will it simply not play 2 random trailer files from that folder for me? I can think of a workaround but would be nice to get it to work. (workaround would be replace theatre intro folder with contents on feature intro folder, then dump trailers in feature intro folder..of course then i no longer get to see my original theatre intro videos..but it was just the red curtain opening)

Do the base name of the file end with -trailer?

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


(This post was last modified: 2014-04-17 14:20 by giftie.)
find quote
inv3ntor Offline
Junior Member
Posts: 20
Joined: May 2010
Reputation: 0
Post: #3698
Thanks mate, that fixed it!
(This post was last modified: 2014-04-17 15:47 by inv3ntor.)
find quote
DasFa Offline
Junior Member
Posts: 29
Joined: Dec 2010
Reputation: 0
Location: Germany
Post: #3699
Is there support for DTS-HD HR and Dolby Digital+? If yes wich foldernames do i need?

OS: Ubuntu 14.04 | XBMC 12.3 | Xperience1080 V2
HTPC: AMD Athlon II X4 640 @ X2 2,5 Ghz | 4GB DDR3 | Radeon HD 6450
find quote
giftie Online
Skilled Python Coder
Posts: 2,331
Joined: Mar 2010
Reputation: 53
Location: Calgary, Alberta
Post: #3700
(2014-04-18 20:40)DasFa Wrote:  Is there support for DTS-HD HR and Dolby Digital+? If yes wich foldernames do i need?

DTSHD-HR is supported already, the folder name is "DTS-HR"

Dolby Digital Plus support needs to be added.. The folder name will be 'Dolby Digital Plus'

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


find quote
DasFa Offline
Junior Member
Posts: 29
Joined: Dec 2010
Reputation: 0
Location: Germany
Post: #3701
(2014-04-18 22:24)giftie Wrote:  
(2014-04-18 20:40)DasFa Wrote:  Is there support for DTS-HD HR and Dolby Digital+? If yes wich foldernames do i need?

DTSHD-HR is supported already, the folder name is "DTS-HR"

Dolby Digital Plus support needs to be added.. The folder name will be 'Dolby Digital Plus'

Thank you

OS: Ubuntu 14.04 | XBMC 12.3 | Xperience1080 V2
HTPC: AMD Athlon II X4 640 @ X2 2,5 Ghz | 4GB DDR3 | Radeon HD 6450
find quote
rmilyard Online
Member
Posts: 91
Joined: Mar 2014
Reputation: 0
Post: #3702
(2014-04-18 22:24)giftie Wrote:  
(2014-04-18 20:40)DasFa Wrote:  Is there support for DTS-HD HR and Dolby Digital+? If yes wich foldernames do i need?

DTSHD-HR is supported already, the folder name is "DTS-HR"

Dolby Digital Plus support needs to be added.. The folder name will be 'Dolby Digital Plus'

giftie where does it figure out the sound from? File name or something else?
find quote
giftie Online
Skilled Python Coder
Posts: 2,331
Joined: Mar 2010
Reputation: 53
Location: Calgary, Alberta
Post: #3703
(2014-04-19 04:25)rmilyard Wrote:  
(2014-04-18 22:24)giftie Wrote:  
(2014-04-18 20:40)DasFa Wrote:  Is there support for DTS-HD HR and Dolby Digital+? If yes wich foldernames do i need?

DTSHD-HR is supported already, the folder name is "DTS-HR"

Dolby Digital Plus support needs to be added.. The folder name will be 'Dolby Digital Plus'

giftie where does it figure out the sound from? File name or something else?

The script uses the stream details stored in the database. These details are only in the database if your .nfo file has the details or the movie has been played once already(a couple of seconds)

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


find quote
rmilyard Online
Member
Posts: 91
Joined: Mar 2014
Reputation: 0
Post: #3704
(2014-04-19 05:10)giftie Wrote:  
(2014-04-19 04:25)rmilyard Wrote:  
(2014-04-18 22:24)giftie Wrote:  DTSHD-HR is supported already, the folder name is "DTS-HR"

Dolby Digital Plus support needs to be added.. The folder name will be 'Dolby Digital Plus'

giftie where does it figure out the sound from? File name or something else?

The script uses the stream details stored in the database. These details are only in the database if your .nfo file has the details or the movie has been played once already(a couple of seconds)

Been wondering. Seems all my bd .iso files don't detect it. My files are named like The Hangover.iso etc.
find quote
giftie Online
Skilled Python Coder
Posts: 2,331
Joined: Mar 2010
Reputation: 53
Location: Calgary, Alberta
Post: #3705
(2014-04-19 05:18)rmilyard Wrote:  
(2014-04-19 05:10)giftie Wrote:  
(2014-04-19 04:25)rmilyard Wrote:  giftie where does it figure out the sound from? File name or something else?

The script uses the stream details stored in the database. These details are only in the database if your .nfo file has the details or the movie has been played once already(a couple of seconds)

Been wondering. Seems all my bd .iso files don't detect it. My files are named like The Hangover.iso etc.

If they haven't be watched, XBMC won't report them correctly(not to the script, or skins)

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


find quote
Post Reply