VideoHelp Forum




+ Reply to Thread
Results 1 to 13 of 13
  1. Hi guys,
    I am looking for a way to make a transparent background for the subtitles.
    Using vlc media player i can make a background with adjustable opacity like this



    now i want do the same styling but embedded in the subtitles (.ass) file. Is it possible ?!

    Edit: I don't want it to be fully transparent, i want it to be black with an amount of opacity (like in VLC player)
    Last edited by moham_96; 5th Aug 2015 at 03:15.
    Quote Quote  
  2. Create overlay rectangle, place any subtitle rendering engine over this translucent rectangle.
    Quote Quote  
  3. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    If you want a completely transparent background, just create your default font in .ASS without a background at all or set the alpha for translucent. Reference:

    http://moodub.free.fr/video/ass-specs.doc
    And .ASS tags at:
    http://docs.aegisub.org/manual/ASS_Tags (thats ASS<Underscore>Tags)
    Quote Quote  
  4. Originally Posted by pandy View Post
    Create overlay rectangle, place any subtitle rendering engine over this translucent rectangle.
    Is drawing tag compatible on every application that support matroska and soft sub ??
    because i heard that some platforms and applications doesn't fully support drawing !
    But anyway i don't have that much experience with drawing and .ass subs in general, so if you could write a detailed reply, i would appreciate it

    P.S i was able to draw the rectangle but i had a problem with placing the text inside the rectangle
    Quote Quote  
  5. Originally Posted by Budman1 View Post
    If you want a completely transparent background, just create your default font in .ASS without a background at all or set the alpha for translucent. Reference:

    http://moodub.free.fr/video/ass-specs.doc
    And .ASS tags at:
    http://docs.aegisub.org/manual/ASS_Tags (thats ASS<Underscore>Tags)
    No i don't want it to be fully transparent, i want it to be black with an amount of opacity (like in VLC player)
    Quote Quote  
  6. See the Alpha section in the tags description Budman1 linked to.

    \3a sets the border alpha.
    Quote Quote  
  7. Originally Posted by jagabo View Post
    See the Alpha section in the tags description Budman1 linked to.

    \3a sets the border alpha.
    That will set the alpha of the borders it will not make a transparent rectangle
    Quote Quote  
  8. Originally Posted by moham_96 View Post

    That will set the alpha of the borders it will not make a transparent rectangle
    Do you understand what a 'transparent rectangle' even is? It's as if there's no rectangle at all. Completely see-through. Why not make subs like normal people, with a 2-pixel black outline? I find those rectangles much more obtrusive and annoying, no matter what the transparency. And without something outside the subs, if you have white subs over a white background (snow, for example), the subs become unreadable.

    Maybe you mean to say a 'translucent rectangle'? And if your 'border' is a rectangle, then that tags section should set the transparency level. Did you try?
    Quote Quote  
  9. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    If you want a transLUCENT box with subtitles, First download the reference manuals I listed earlier then create your .ASS subs like so:

    [Script Info]
    ; Script generated by Aegisub 2.1.9
    ; http://www.aegisub.org/
    Title: Translucent Subs Background demonstration
    Original Script: Mine
    ScriptType: v4.00+
    Collisions: Normal
    PlayResY: 240
    PlayDepth: 0
    Timer: 100.0000
    Video Aspect Ratio: 0
    Video Zoom: 6
    Video Position: 0

    [V4+ Styles]
    Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic,BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
    Style: Default,Arial,30,16777215,65535,65535,65535,-1,0,3,0,0,9,30,30,30,0,0
    [Events]
    Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
    Dialogue: 0,0:00:00.00,0:00:10.00,Banner,,0000,0000,0000,!Ef fect,{\bord1\3a&c0\an5}Banner Marque

    The "+" sign denotes .ASS subtitles and many decoders/codecs do not handle all the additional parameters of .ASS subtitles so DO NOT INCLUDE them. You can label the subtitle file .SSA or .ASS and they seem to work with the minimum list of format attributes.

    The 3 in the style line means show background "Rectangle"
    The \bord1 means make the border minimum around the text
    The \3a&c0 means make the transparency of the "rectangle" (c0=hex for 192 . 0 =opaque, 255 =transparent)
    The yellow 65535 is the decimal of hex data 40FFFF (BBGGRR=Yellow)

    VLC 2.2.1 , MWindows 7 Media Player and Potplayer plays the subs as so:
    Click image for larger version

Name:	ScreenHunter_159 Aug. 06 02.26.jpg
Views:	7020
Size:	92.3 KB
ID:	33003Click image for larger version

Name:	ScreenHunter_159 Aug. 06 02.33.jpg
Views:	7305
Size:	90.5 KB
ID:	33004Click image for larger version

Name:	ScreenHunter_159 Aug. 06 02.34.jpg
Views:	7323
Size:	74.8 KB
ID:	33005
    Last edited by Budman1; 6th Aug 2015 at 02:54.
    Quote Quote  
  10. Originally Posted by Budman1 View Post
    If you want a transLUCENT box with subtitles, First download the reference manuals I listed earlier then create your .ASS subs like so:

    [Script Info]
    ; Script generated by Aegisub 2.1.9
    ; http://www.aegisub.org/
    Title: Translucent Subs Background demonstration
    Original Script: Mine
    ScriptType: v4.00+
    Collisions: Normal
    PlayResY: 240
    PlayDepth: 0
    Timer: 100.0000
    Video Aspect Ratio: 0
    Video Zoom: 6
    Video Position: 0

    [V4+ Styles]
    Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic,BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
    Style: Default,Arial,30,16777215,65535,65535,65535,-1,0,3,0,0,9,30,30,30,0,0
    [Events]
    Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
    Dialogue: 0,0:00:00.00,0:00:10.00,Banner,,0000,0000,0000,!Ef fect,{\bord1\3a&c0\an5}Banner Marque

    The "+" sign denotes .ASS subtitles and many decoders/codecs do not handle all the additional parameters of .ASS subtitles so DO NOT INCLUDE them. You can label the subtitle file .SSA or .ASS and they seem to work with the minimum list of format attributes.

    The 3 in the style line means show background "Rectangle"
    The \bord1 means make the border minimum around the text
    The \3a&c0 means make the transparency of the "rectangle" (c0=hex for 192 . 0 =opaque, 255 =transparent)
    The yellow 65535 is the decimal of hex data 40FFFF (BBGGRR=Yellow)

    VLC 2.2.1 , MWindows 7 Media Player and Potplayer plays the subs as so:
    Image
    [Attachment 33003 - Click to enlarge]
    Image
    [Attachment 33004 - Click to enlarge]
    Image
    [Attachment 33005 - Click to enlarge]
    Well, earlier today i tried setting the outline to opaque box and shadow to 0 with alpha on the outline and it worked very nice but when I tried writing more than one line in each dialogue i saw this



    the border width is set to each line of text and that's not what i want, i want one box to contain the whole dialogue rather than a box for each line.

    And your script does the same trick and shows the same problem

    This is a screen shot of your script

    Quote Quote  
  11. Originally Posted by manono View Post
    Originally Posted by moham_96 View Post

    That will set the alpha of the borders it will not make a transparent rectangle
    Do you understand what a 'transparent rectangle' even is? It's as if there's no rectangle at all. Completely see-through. Why not make subs like normal people, with a 2-pixel black outline? I find those rectangles much more obtrusive and annoying, no matter what the transparency. And without something outside the subs, if you have white subs over a white background (snow, for example), the subs become unreadable.

    Maybe you mean to say a 'translucent rectangle'? And if your 'border' is a rectangle, then that tags section should set the transparency level. Did you try?

    Yes I meant translucent rectangle and I mentioned in the post :
    Edit: I don't want it to be fully transparent, i want it to be black with an amount of opacity (like in VLC player)
    I tried to do the border trick but with problems (see my reply to budman1)
    Quote Quote  
  12. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    It can be done... but the subtitles have to be 'Tweaked' with padding. You use alt + numpad 255 for the spaces and end the complete line with a \N New line character.
    You also have to use a font that the spaces are the same as the Character (monospaced). Most computers have Courier New that will work. The new .ASS script is like:

    [Script Info]
    ; Script generated by Aegisub 2.1.9
    ; http://www.aegisub.org/
    Title: Translucent Subs Background demonstration
    Original Script: Mine
    ScriptType: v4.00
    Collisions: Normal
    PlayResY: 240
    PlayDepth: 0
    Timer: 100.0000
    Video Aspect Ratio: 0
    Video Zoom: 6
    Video Position: 0

    [V4 Styles]
    Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic,BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding
    Style: Default,Courier New,30,16777215,65535,65535,0,-1,0,3,1,0,9,30,30,30,0,0
    [Events]
    Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
    Dialogue: 0,0:00:00.00,0:02:10.00,Banner,,0000,0000,0000,!Ef fect,{\bord.1\3a&80\an5}Banner Marque\N***Another***\N

    Notice the FontName is set to Courier New and Size of 30, Back color is set to 0 and Alpha (transparency) is set to Hex 80 (128). Thats \Bord{dot}1 like one tenth and the asterisks are the the Alt + Numeric Keypad 255. Hold Alt key and enter 255 then release the Alt key. Needed 3 for front and 3 for behind 'Another' because Banner Marque = 13 spaces including the space, Another = 7, 13-7 = 6.

    Yes its funky but if you want to do it with .ASS subtitles, this will work. You can always write a program to fix the subs automatically like I did, if I ever need it. DON'T FORGET THE TRAILING \N or your trailing spaces get dropped by a lot of viewers.

    Click image for larger version

Name:	ScreenHunter_159 Aug. 07 22.03.jpg
Views:	955
Size:	98.3 KB
ID:	33041
    Last edited by Budman1; 7th Aug 2015 at 22:23.
    Quote Quote  
  13. I know this is an old thread but I just wanted to put the solution here in case someone faces the same problem.
    There is now an official way to achieve this by setting borderstyle=4 and controlling the transparency by adjusting the shadow alpha.
    This would result in a very elegant look:
    Image
    [Attachment 45201 - Click to enlarge]

    for more information see :
    https://stackoverflow.com/a/25880038/3770251
    https://github.com/libass/libass/issues/268
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!