Jump to content


Photo

Make the letterbox plugin automatic?

letterbox

  • Please log in to reply
39 replies to this topic

Re: Make the letterbox plugin automatic? #21 daddelfalk

  • Senior Member
  • 489 posts

+17
Neutral

Posted 31 December 2011 - 14:50

Hi,

maybe some contruct like for both policy and policy2:

policy_choices = open("/proc/stb/video/policy_choices").readline().split()
...

if "auto" in policy_choices:
...

Edited by daddelfalk, 31 December 2011 - 14:53.


Re: Make the letterbox plugin automatic? #22 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 31 December 2011 - 14:55

Hi,

maybe some contruct like for both policy and policy2:

policy_choices = open("/proc/stb/video/policy_choices").readline().split()
...

if "auto" in policy_choices:
...


Yes, indeed something like that. (though split() is not needed, '"auto" in policy_choices' should work on a string as well I think)

Re: Make the letterbox plugin automatic? #23 ims

  • PLi® Core member
  • 13,785 posts

+214
Excellent

Posted 31 December 2011 - 15:06

Auto on DM800se stretch picture Horizontaly (uff, this is day ;) ) - center of picture is OK, sides are stretched

and LetterBox plugin switch to Auto, then into Letterbox.

Edited by ims, 31 December 2011 - 15:15.

Kdo nic nedělá, nic nezkazí!

Re: Make the letterbox plugin automatic? #24 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 31 December 2011 - 15:16

Auto on DM800se stretch picture verticaly - center of picture is OK, sides are stretched


Sounds like the 'nonlinear' mode.
Do you actually write 'auto' to the proc entry?
(the drivers might default to 'nonlinear' when you write something they don't understand)

Re: Make the letterbox plugin automatic? #25 ims

  • PLi® Core member
  • 13,785 posts

+214
Excellent

Posted 31 December 2011 - 15:17

Horizontaly - i have bad day today ;)
Made whole patch.
Kdo nic nedělá, nic nezkazí!

Re: Make the letterbox plugin automatic? #26 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 31 December 2011 - 15:21

Made whole patch.


you mean you configured 'auto' using the patch from daddelfalk?
In that case, indeed there seems no 'auto' support on the dm800se, instead it either defaults to nonlinear, or it keeps its previous setting (which might have been nonlinear in your case?).

Anyway, I think we should only show 'auto' on hardware which supports it, to avoid confusion.

Re: Make the letterbox plugin automatic? #27 ims

  • PLi® Core member
  • 13,785 posts

+214
Excellent

Posted 31 December 2011 - 15:27

yes, i tried apply this patch. If i try set Auto and zap to channel, where is 16:9 broadcasted as 4:3 ( => black is left, top, right, bottom), picture was stretched horizontaly only - it seems, stretched are only sides of picture, centrer of picture is well. Never saw before.
Kdo nic nedělá, nic nezkazí!

Re: Make the letterbox plugin automatic? #28 Dimitrij

  • PLi® Core member
  • 10,328 posts

+350
Excellent

Posted 31 December 2011 - 15:29

I found that they autozoom letterbox (and pillarbox) formats, as long as there are no subtitles or logos in the borders

It is.
This is how to fix, in the future?
Driver or ...

GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: Make the letterbox plugin automatic? #29 ims

  • PLi® Core member
  • 13,785 posts

+214
Excellent

Posted 31 December 2011 - 15:45

on dm800 cat /proc/stb/video/policy_choices displaying: bestfit letterbox panscan nonlinear
Kdo nic nedělá, nic nezkazí!

Re: Make the letterbox plugin automatic? #30 daddelfalk

  • Senior Member
  • 489 posts

+17
Neutral

Posted 31 December 2011 - 16:14

Hi ims,

for 16:9 policy2 proc entry will be used.

Re: Make the letterbox plugin automatic? #31 ims

  • PLi® Core member
  • 13,785 posts

+214
Excellent

Posted 31 December 2011 - 16:17

policy2_choices on 800se: bestfit letterbox panscan nonlinear policy
Kdo nic nedělá, nic nezkazí!

Re: Make the letterbox plugin automatic? #32 daddelfalk

  • Senior Member
  • 489 posts

+17
Neutral

Posted 31 December 2011 - 16:20

Hi ims,

so, actually no titled "auto" mode.

Re: Make the letterbox plugin automatic? #33 Dimitrij

  • PLi® Core member
  • 10,328 posts

+350
Excellent

Posted 31 December 2011 - 16:29

yes, i tried apply this patch. If i try set Auto and zap to channel, where is 16:9 broadcasted as 4:3 ( => black is left, top, right, bottom), picture was stretched horizontaly only - it seems, stretched are only sides of picture, centrer of picture is well. Never saw before.

I also like that.

GigaBlue UHD Quad 4K /Lunix3-4K/Duo 4K


Re: Make the letterbox plugin automatic? #34 daddelfalk

  • Senior Member
  • 489 posts

+17
Neutral

Posted 31 December 2011 - 17:47

Hi,

attached Patch introduces support for checking, if Hardware is capable of "auto" Mode. And removed "nonlinear" and "policy" Selections from 16:9 policy2 due to Pieter's explaination.

Attached Files



Re: Make the letterbox plugin automatic? #35 theparasol

  • Senior Member
  • 4,157 posts

+198
Excellent

Posted 31 December 2011 - 17:52

While we are talking auto switching letterbox, something crossed my mind:
Teletext will work a lot quicker if you press the txt button and if resolution is 1920x1080 (HD) it changes to 704x576 and if teletext ends switches back to 1920x1080

@Camping: ZGemma H.2S, Technisat Multytenne 4-in-1 @Home: Edision Mini 4K, Wave Frontier T55, EMP Centauri EMP DiSEqC 8/1 switch, 4x Inverto Ultra Black single LNB


Re: Make the letterbox plugin automatic? #36 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 31 December 2011 - 18:15

While we are talking auto switching letterbox, something crossed my mind:
Teletext will work a lot quicker if you press the txt button and if resolution is 1920x1080 (HD) it changes to 704x576 and if teletext ends switches back to 1920x1080


the framebuffer actually switches to 720x576 resolution.
The fact that the dm800 gets much slower while producing hd output, is either a hardware or a driver issue.
No other box has this problem. (not even other boxes with the same 7401 chipset as the dm800).

Re: Make the letterbox plugin automatic? #37 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 31 December 2011 - 18:20

Hi,

attached Patch introduces support for checking, if Hardware is capable of "auto" Mode. And removed "nonlinear" and "policy" Selections from 16:9 policy2 due to Pieter's explaination.


thanks, looking good.
One remark though, I think it should be possible to avoid code duplication, by for instance building the 'choices' array like this:
policychoices = []
if 'auto' supported:
  policychoices.append([auto: _("Auto")])
policychoices.append([.......])
config.av.policy_169 = ConfigSelection(choices = policychoices)
(not sure about the exact syntax of appending lists, I'm not a native python speaker)

And perhaps a similar aproach for the dicts in VideoHardware.py

Edited by pieterg, 31 December 2011 - 18:21.


Re: Make the letterbox plugin automatic? #38 ims

  • PLi® Core member
  • 13,785 posts

+214
Excellent

Posted 1 January 2012 - 19:59

for AVSwitch.py it could be as:
av_policy = {}
if os.path.exists("/proc/stb/video/policy2_choices") and "auto" in open("/proc/stb/video/policy2_choices").readline():
   # TRANSLATORS: (aspect ratio policy: auto try to display as fullscreen, even if this breaks the aspect.
  av_policy["auto"] = _("Auto")
   # TRANSLATORS: (aspect ratio policy: black bars on top/bottom) in doubt, keep english term.
av_policy["letterbox"] = _("Letterbox")
   # TRANSLATORS: (aspect ratio policy: cropped content on left/right) in doubt, keep english term
av_policy["panscan"] = _("Pan&Scan")
   # TRANSLATORS: (aspect ratio policy: display as fullscreen, even if this breaks the aspect)
av_policy["scale"] = _("Just Scale")
config.av.policy_169 = ConfigSelection( choices=av_policy, default="letterbox" )
av_policy = {}
if os.path.exists("/proc/stb/video/policy_choices") and "auto" in open("/proc/stb/video/policy_choices").readline():
   # TRANSLATORS: (aspect ratio policy: auto try to display as fullscreen, even if this breaks the aspect.
  av_policy["auto"] = _("Auto")
   # TRANSLATORS: (aspect ratio policy: black bars on left/right) in doubt, keep english term.
av_policy["pillarbox"] = _("Pillarbox")
   # TRANSLATORS: (aspect ratio policy: cropped content on left/right) in doubt, keep english term
av_policy["panscan"] = _("Pan&Scan")
   # TRANSLATORS: (aspect ratio policy: display as fullscreen, with stretching the left/right)
av_policy["nonlinear"] = _("Nonlinear")
   # TRANSLATORS: (aspect ratio policy: display as fullscreen, even if this breaks the aspect)
av_policy["scale"] = _("Just Scale")
config.av.policy_43 = ConfigSelection(choices=av_policy, default = "pillarbox")
del av_policy

Kdo nic nedělá, nic nezkazí!

Re: Make the letterbox plugin automatic? #39 malakudi

  • Senior Member
  • 1,449 posts

+69
Good

Posted 7 January 2012 - 11:05

Is the level of zoom in "auto" mode somehow controlable? I would prefer it to be able to auto switch in pan scan mode. Now it doesn't zoom or zoom very little f there is a small logo.

Can this check be done in userspace mode? Checking an i-frame every now and then for black borders and applying panscan policy automatically.

Re: Make the letterbox plugin automatic? #40 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 7 January 2012 - 11:33

indeed, if you need more control, this should be done in userspace.
Use the video clipping coordinates, to perform the zoom, once the iframe has been checked.

However, I think there's only a handful of different 'letterbox' formats.
So if we store a couple of presets in the videoclipping plugin, and make an easy accessible selection somewhere, wouldn't that suffice?
(or perhaps even attach videoclipping settings to services)


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users