-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FR: add libass backend #55
Comments
Will it, though? The point of BlitzLoop's renderer is that it pretty much precomputes the entire lyrics as GPU buffer objects, then each frame is literally one GPU draw call per lyrics line. That's it. Everything else happens on the GPU or ahead of time. Meanwhile libass is a CPU-based renderer, possibly with GPU-assisted composition? In any case I don't think it precomputes everything like BlitzLoop does. If libass is actually faster than BlitzLoop then we should figure out why that is. |
FWIW, here's an (ugly) script to convert to .ass as you describe: https://github.com/marcan/blitzloop-tools/blob/master/export_ass.py That one does |
Ok, maybe I should amend that performance improvement assumption. Still .. at least the |
The main issue is blitzloop's implicit assumption that it has a screen to draw on. You need at least some sort of frame loop for things to run on, and then there's the whole idle screen and other issues. Plus line layout assumes there is a screen and font renderer. Effectively, you'd need to yank out a bunch of BlitzLoop at a high level, in main.py (and play.py), or perhaps stub out the whole renderer and add a special case to SongLayout to do nothing if it's called with a dummy renderer. Possible, but definitely not as clean or simple as adding a backend at this point. Implementing a fake screen for layout is something I want to do anyway, for the Joysound exporter (right now it needs GL, though it can use surfaceless EGL like the video generator mode), and ideally we'd use that with ASS too and a bunch of styling so that ASS mode at least tries to approximate what real BlitzLoop looks like. But then there's a bit of a tricky issue with separating the font code from the texture handling code. So, basically: I don't think it's worth implementing "dumb" ASS mode a la export_ass with the current codebase, it's ugly. I think there's room for refactoring everything to cleanly separate layout/metrics code from rendering/GL/textures/display, and then have an ASS backend at that level. |
This is just an idea. It still can help with issues like #52.
What if next to
glut
,gles
,rpi
and other backends there is another called calledass
which would work like this:.blitz
file is converted into.ass
subtitles file, resulting in something like this:mpv
is being passed the result as a subtitle file so it will be responsible for displaying it (there won't be an overlay layer)Of course this won't be on par with other engines but this could greatly benefit boxes with not enough horse power (RPi still needs a
mmal
-enabledmpv
though, though even more stripped down.srt
together withomxplayer
would solve this).The text was updated successfully, but these errors were encountered: