occivink / mpv-scripts

Various scripts for mpv
The Unlicense
420 stars 38 forks source link

osd-back-color and draw_crosshair=yes cause the video to be hidden. #15

Closed jgreco closed 6 years ago

jgreco commented 6 years ago

If draw_crosshair is true and if my mpv.conf contains: osd-back-color=0.0/0.0/0.0/0.5 the crop.lua does this: screen shot 2018-05-09 at 2 00 50 pm

As an experiment I made a change to function draw_crosshairs to reduce the extent of the crosshairs to 100x100:

function draw_crosshair(ass, center, window_size)
    ass:new_event()
    ass:append("{\\bord0}")
    ass:append("{\\shad0}")
    ass:append("{\\c&HBBBBBB&}")
    ass:append("{\\alpha&H00&}")
    ass:pos(0, 0)
    ass:draw_start()
    ass:rect_cw(center.x - 0.5, center.y-50, center.x + 0.5, center.y+50)
    ass:rect_cw(center.x-50, center.y - 0.5, center.x+50, center.y + 0.5)
    ass:draw_stop()
end

The result was a 100x100 black square at the top right of the video: screen shot 2018-05-09 at 2 15 58 pm

The part that really confuses me is that draw_shade seems to be working fine. Were it not for that I'd think this were an mpv/libass bug.

(Using mpv 0.28.2 and libass 0.14.0)

occivink commented 6 years ago

That's quite the obscure option you've got there.