Coder Social home page Coder Social logo

Support for Rollup Captions about aegisub HOT 3 OPEN

damascene avatar damascene commented on June 29, 2024
Support for Rollup Captions

from aegisub.

Comments (3)

arch1t3cht avatar arch1t3cht commented on June 29, 2024

If you are looking to create such an effect from existing subtitles, you can do this with karaoke templates. There is a templater shipped with Aegisub. Or you can write an automation script yourself. The details depend on how exactly you want the effect to look.

from aegisub.

damascene avatar damascene commented on June 29, 2024

@arch1t3cht thank you for responding. I've tried one tutorial on Karaoke. It needs someone with Lua scripting skills to create I guess. I'm putting a little $25 bounty tip paid in crypto for someone to create such a script.

Would be nice to have it implemented in software though. Apparently rollup captions are useful for many use cases and even subtitle coming from youtube could be feed to up converted to standard popup subtitles or vice versa

from aegisub.

arch1t3cht avatar arch1t3cht commented on June 29, 2024

Miss me with crypto, but here's a template to generate something resembling youtube captions.

[Script Info]
; Script generated by Aegisub 9533-feature-e156ece09 [DEBUG VERSION]
; http://www.aegisub.org/
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
YCbCr Matrix: TV.709
PlayResX: 1920
PlayResY: 1080

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Rollup,Noto Sans,60,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,0,2,10,10,20,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,code once,function d(...) end -- dummy function for comments or return value dumping
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,code once,padding = 10; join_threshold = 1000; move_time = 300; fade = 150;
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,code once,for i=1,3 do tenv["part" .. i] = function() return loopctx.state.part == i end; end
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,code line,if maxwidth == nil then maxwidth = 0; local l = orgline; while l ~= nil do maxwidth = math.max(maxwidth, l.width); l = l.next; end end
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,code line,hasprev = tenv.hasnext or false; hasnext = orgline.next ~= nil and orgline.next.start_time - orgline.end_time < join_threshold; hasnextnext = hasnext and orgline.next.next ~= nil and orgline.next.next.start_time - orgline.next.end_time < join_threshold;
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,code syl,sx = orgline.center - maxwidth / 2 + syl.left; sy = orgline.top;
Comment: 0,0:00:00.00,0:00:03.00,Rollup,background,0,0,0,template syl notext loop part 3,{\1a&H80&\c&H000000&}
Comment: 1,0:00:00.00,0:00:03.00,Rollup,,0,0,0,template syl loop part 3,
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,mixin syl,!maxloop("part", hasnextnext and 3 or (hasnext and 2 or 1))!
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,mixin syl if part1,!retime("abs", orgline.start_time, hasnext and orgline.next.start_time or (orgline.end_time))!
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,mixin syl if part2,!retime("abs", orgline.next.start_time, hasnextnext and orgline.next.next.start_time or orgline.next.end_time)!
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,mixin syl if part3,!retime("abs", orgline.next.next.start_time, orgline.next.next.start_time + move_time)!
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,mixin syl,{\an7!\bord0\shad0}
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,mixin syl if part1,!d(hasprev and mskip())!{\pos(!sx!, !sy!)}
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,mixin syl if part1,!d(hasprev or mskip())!{\move(!sx!, !sy + orgline.height!, !sx!, !sy!, 0, !move_time!)}
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,mixin syl if part1,{\fad(!hasprev and 0 or fade!,!hasnext and 0 or fade!)}
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,mixin syl if part2,!d(hasnextnext and mskip())!{\fad(0, !fade!)}
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,mixin syl if part2,{\move(!sx!, !sy!, !sx!, !sy - orgline.height!, 0, !move_time!)}
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,mixin syl if part3,{\move(!sx!, !sy - orgline.height!, !sx!, !sy - 2 * orgline.height!, 0, !move_time!)}
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,mixin syl,{\clip(!sx - padding!, !sy - orgline.height!, !sx + syl.width + padding!, !sy + orgline.height!)}
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,mixin syl t_actor background,{\p1}m !-padding! 0 l !syl.width + padding! 0 !syl.width + padding! !orgline.height! !-padding! !orgline.height!
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,,
Comment: 0,0:00:00.00,0:00:03.00,Rollup,,0,0,0,kara,This is the first line
Comment: 0,0:00:03.00,0:00:06.00,Rollup,,0,0,0,kara,This is what happens when another line is added
Comment: 0,0:00:06.50,0:00:09.00,Rollup,,0,0,0,kara,If a third one is added, the first one disappears and the second one shoots up
Comment: 0,0:00:11.00,0:00:15.00,Rollup,,0,0,0,kara,Some more text that comes in later

Time some set of lines, give them the style, comment them and give them the kara effect, and run the template using The0x's templater.

rollup_0.000-15.000.mp4

from aegisub.

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.