How do I change the aspect ratio of the player?
#1
I did not change in this code.

Code:
li = xbmcgui.ListItem(tit)
li.setProperty('AspectRatio', '1.85 : 1')
xbmc.Player().play(url,li)

Also, why not be able to change the aspect ratio during playback
Reply
#2
Is it possible to be given a pixel ratio, to play video?
Reply
#3
not available. best you can do is send the AspectRatio to the video fullscreen window after playback has started. it's just a toggle though so it will cycle the presets.
Reply
#4
oh.

It is necessary to 0.5 pixel ratio in order to display in 3D mode videos Oculus rift.
Reply
#5
If your 'url' is a file and it's properly named, it should appropriately switch or call up a dialog from which you can pick the correct mode depending on the 3D content:
http://wiki.xbmc.org/index.php?title=3D
Reply
#6
Because you can not change the player directly, we do this.

Code:
import glob, sqlite3
    files = glob.glob(xbmc.translatePath('special://Database') + '/MyVideos*.db')
    if len(files):
        conn = sqlite3.connect(files[0])
        c = conn.cursor()

        # Once, it is registered in the library by playing
        li = xbmcgui.ListItem(tit, "", thum, thum, url)
        xbmc.Player().play(url, li)
        xbmc.Player().stop()

        ...

        # Change the information registered
        while True:
            c.execute("SELECT idFile FROM files WHERE strFilename LIKE ? ESCAPE '$'", (file,))
            row = c.fetchone()
            if row != None:
                print row[0]
                c.execute("UPDATE settings SET ViewMode = 6, PixelRatio = 0.5 WHERE idFile = ?", (row[0],))
                conn.commit()
                break
            xbmc.sleep(100)

        # play again
        xbmc.Player().play(url, li)
        c.close()
Reply

Logout Mark Read Team Forum Stats Members Help
How do I change the aspect ratio of the player?0