Git Product home page Git Product logo

Comments (16)

Argon- avatar Argon- commented on September 28, 2024

Huh? No such thing happens ("prevent the line from going beyond half the window length"). Every appended property prints a new line right before it's actual text (https://github.com/Argon-/mpv-stats/blob/master/stats.lua#L200).
Or am I misunderstanding your question?

from mpv-stats.

bitingsock avatar bitingsock commented on September 28, 2024

screenshot 01 - ready for war ready for what wv00_00_01 060
As you can see, the first line doesn't write as far as the others.

from mpv-stats.

Argon- avatar Argon- commented on September 28, 2024

Interesting but this is most certainly not done by the script, it's not inserting new lines anywhere except before properties and after sections (File/Video/Audio).
Could it be the file name contains strange (invisible) characters?

from mpv-stats.

bitingsock avatar bitingsock commented on September 28, 2024

No, it's done this with every file I've tried that's long enough. The exception seems to be if there are no spaces it will not break. _ - or other fillers let it work as intended.

from mpv-stats.

bitingsock avatar bitingsock commented on September 28, 2024

Ya...definitely the spaces. Still weird that it breaks at that spot.

from mpv-stats.

Argon- avatar Argon- commented on September 28, 2024

Could you send me a little sample or something where it happens for you?
screen shot 2015-07-31 at 00 12 29

from mpv-stats.

bitingsock avatar bitingsock commented on September 28, 2024

screenshot just a bunch of silence for testing mp300_00_00 639
https://anonfiles.com/file/5343c168a5b86a67b2f2ba1481f4ca75

from mpv-stats.

Argon- avatar Argon- commented on September 28, 2024

Well, this did not preserve your file name and I can't reproduce this problem. Mind sharing your stats config, this does certainly not look like default.
And you don't happen to use \q0 somewhere, do you?

from mpv-stats.

bitingsock avatar bitingsock commented on September 28, 2024

i edited the lua directly, no config. try setting the font_size to like 30
https://filetea.me/t1szuUpmpBySAeEe0GAtsnusA

from mpv-stats.

Argon- avatar Argon- commented on September 28, 2024

screen shot 2015-07-31 at 01 27 32
There is indeed a bit of margin to the right, as you can see in my screenshot. There would've been enough space to leave the line untouched. However, this isn't (shouldn't be?) related to line breaks inserted by the script but rather to ASS line wrapping. When you disable wrapping (add {\\q2} to the header):
screen shot 2015-07-31 at 01 30 33
But of course this would break lines which are really too long so you probably shouldn't do it.
Your version looks a bit like you would've used \q0:

Smart wrapping, make each line approximately equally long

http://docs.aegisub.org/3.2/ASS_Tags/#\q

from mpv-stats.

bitingsock avatar bitingsock commented on September 28, 2024

https://filetea.me/t1siQYg5W9WRXGgyWBaLwVpRA
my version
i didn't use \q0
also i tried with yours and added
font_size=30 to stats.conf
screenshot just a bunch of silence for testing mp300_00_00 810
still problem

from mpv-stats.

Argon- avatar Argon- commented on September 28, 2024

Well, as I said, this is wrapping done by the ASS renderer. You can turn it off or slightly tweak it (q0, q1, q3) but otherwise you have to live with it. Wrapping is not done by the script, nothing I can fix/"turn off".
As for why the ASS renderer's wrapping is done so early in the first line... I don't know. Asked in #mpv-devel but nobody else had a good idea either (yet).

from mpv-stats.

bitingsock avatar bitingsock commented on September 28, 2024

well thanks for looking into it

from mpv-stats.

bitingsock avatar bitingsock commented on September 28, 2024

do you know if the renderer's option is exposed in mpv? or would i have to compile it so?
edit: i guess you said you can't so...dang

from mpv-stats.

Argon- avatar Argon- commented on September 28, 2024

I take that back, this actually is fixable (76ae38a).
There were a lot of spaces before "File" and I knew that. Since they were not displayed I assumed they don't have any other side effects, however it seems like these (not visible) spaces are taken into account for wrapping calculations by libass (so it assumed there were more characters on screen than we actually saw, therefore breaking the line earlier). The above commit fixed this (by removing the spaces).
Imo this is a bug in libass.

Thanks for reporting! I might have never caught that one.

from mpv-stats.

bitingsock avatar bitingsock commented on September 28, 2024

neat

from mpv-stats.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.