You are not logged in.
Pages: 1
Hello hello,
I'm having a problem with mpv on openbox (well, after trying the mpv bugtracker and inspecting some things, Openbox seems to be the culprit rather than mpv) and wanted to know if I am the only one.
https://github.com/mpv-player/mpv/issues/1343
Basically, this video isn't played at the exact dimensions unless I pass the "--no-keepaspect-window" option to mpv (visible because of the crisp bitmap fonts). If I'm not the only one, I'll at least have given a solution.
Offline
Nope, you're not the only one, I've always had issues with mpv/openbox interaction. Visible as a black column on one or both sides of the video. It depends on window size, resizing the window during playback the black columns appear/disappear.
BTW, I wouldn't call --no-keepaspect-window a solution - it makes resizing the window to watch video at a different size than its resolution quite annoying.
Offline
I'll probably have to change one day. But keeping a "sane" setup is so comfy. Maybe when Wayland is usable enough for desktop.
Offline
I think openbox has a bug tracker, you could report there. Changing window managers would be quite tough for me, I'm much too used to openbox's features and functionality
.
Offline
Well, I'm ready to evolve toward tiling (i3 seems pretty good) so it won't be a problem anymore. Good luck with Openbox, since it seems a bit abandoned.
Offline
Waaait a minute... I use mpv and Openbox, and that video looks fine to me. Could it be a video card / video settings issue?
What video output setting are you using? I have "vo=xv" in my "~/.mpv/config" file. Does that make a difference?
(Also, I'm using the open source radeon drivers.)
Offline
Well, i'm all Intel on my machines
. Video output makes no difference, be it xv, opengl or vaapi. But I don't think it's that, I'm quite sure it's openbox. A thought just occurred to me, maybe it's specific themes that trigger this. I think that because of how complex openbox themes are, with their inner borders and outer borders and border borders
.
Offline
A thought just occurred to me, maybe it's specific themes that trigger this. I think that because of how complex openbox themes are, with their inner borders and outer borders and border borders.
Let's find out! What theme are you using?
Also, I don't quite understand the original issue. Can you please post a screenshot describing the problem? It's something about incorrect aspect ratio and black borders, right?
I think I'm taking this issue a little "personally". I think of Openbox and mpv and two of the highest quality software applications, so the thought of one of them possibly having such a glaring bug makes me want to find out what's going on. ![]()
Offline
Let's find out! What theme are you using?
A self-made one
. Here you go: http://pastie.org/9784154
It's something about incorrect aspect ratio and black borders, right?
Yes. Instead of the video filling the whole window, it's one or two pixels shorter. The distortion this causes isn't visible on natural video, but it is on Nietzsche's video due to the sharp lines of fonts. An example of how this looks like (note the black columns on the left and right): http://i.imgur.com/eAwONNF.png
I think I'm taking this issue a little "personally". I think of Openbox and mpv and two of the highest quality software applications, so the thought of one of them possibly having such a glaring bug makes me want to find out what's going on.
I hear ya
. Openbox is quite awesome and so is mpv.
BTW, the issue happens with mplayer2 too, but less frequently due to it having some code that got removed in mpv (commit). No idea about mplayer.
Offline
Offline
It's weird that it happens just with mpv though. Use xwininfo on any other window, it'll show correct dimensions. Use it on mpv, it'll show height being one pixel short (if the video is 640x360, xwininfo will show "Height: 359"). mpv will thus compensate the video width according to this incorrect height, causing the mess.
Looking at it in a different way: My theme has a titlebar of 22px, and then 1px borders on left/right/bottom. If I open some application with a size of 640x420, the entire window (including decoration) will be 642x443. As it should be: 22px titlebar + 1px bottom border, so add 23 to the application height.
But with mpv, using a 640x360 video, the entire window will be 642x382. It should be 642x383 !! No matter how you slice it, openbox creates the mpv window with its height off by one. I'll try a hack, add +1 somewhere in mpv's code ![]()
Edit: Had a look at mpv's verbose output:
[vo/vaapi] Window size: 640x359
[vo/vaapi] Video source: 640x360 (640x360)
[vo/vaapi] Video display: (0, 0) 640x360 -> (1, 0) 638x359
[vo/vaapi] Video scale: 0.996875/0.997222
[vo/vaapi] OSD borders: l=1 t=0 r=1 b=0
[vo/vaapi] Video borders: l=1 t=0 r=1 b=0Yup, like I said, mpv compensates for the off-by-one window height.
Another edit: Hack complete ![]()
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index ce2111a..1a05443 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1005,7 +1005,7 @@ static void vo_x11_sizehint(struct vo *vo, struct mp_rect rc, bool override_pos)
hint->x = rc.x0;
hint->y = rc.y0;
hint->width = RC_W(rc);
- hint->height = RC_H(rc);
+ hint->height = RC_H(rc) + 1;
hint->max_width = 0;
hint->max_height = 0;Last edited by Gusar (2014-12-17 12:15:32)
Offline
Pages: 1