Comments (16)
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.
As you can see, the first line doesn't write as far as the others.
from mpv-stats.
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.
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.
Ya...definitely the spaces. Still weird that it breaks at that spot.
from mpv-stats.
Could you send me a little sample or something where it happens for you?
from mpv-stats.
https://anonfiles.com/file/5343c168a5b86a67b2f2ba1481f4ca75
from mpv-stats.
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.
i edited the lua directly, no config. try setting the font_size to like 30
https://filetea.me/t1szuUpmpBySAeEe0GAtsnusA
from mpv-stats.
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):
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.
https://filetea.me/t1siQYg5W9WRXGgyWBaLwVpRA
my version
i didn't use \q0
also i tried with yours and added
font_size=30 to stats.conf
still problem
from mpv-stats.
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.
well thanks for looking into it
from mpv-stats.
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.
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.
neat
from mpv-stats.
Related Issues (20)
- Add performance metrics (upload / render / present times) HOT 37
- Immediately refresh on file change when toggled on HOT 1
- graph and frame timings only work for a few drivers HOT 2
- video bitrate graph HOT 2
- Script stolen! :) HOT 1
- CLI reporting dropped frames HOT 5
- About font color HOT 3
- "border_color" not take effect
- The fps has been replaced with container-fps HOT 1
- Feature Request: See what shaders that is loaded HOT 7
- Lua error
- drop-frame-count Warning HOT 1
- drop-frame-count should be replaced with decoder-drop-frame-count HOT 1
- What does the "fresh" and "redraw" mean in the stats? HOT 1
- Enable ass formatting again when vo window re-opens HOT 1
- Window Scale does not update when switching to fullscreen HOT 1
- Chapters and time info HOT 8
- Relicensing HOT 6
- [Feature Request] display bitrate? HOT 3
- stats.lua Can we continue localization? Please, friend Thank you HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpv-stats.