VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. Member
    Join Date
    Sep 2005
    Location
    Darkest Peru
    Search Comp PM
    For the longest time, if I extracted captions as subtitles I used ccextractor creating .srt files.

    Lately, I learned that I can create better matching .ass format using ffmpeg:
    Code:
    ffmpeg.exe -f lavfi -i "movie=Video.mp4[out+subcc]" -map s  "Video.ass"
    (I remove the black background afterwards... but I'll get back to that.)

    I've found that the .ass created doesn't position things quite correctly and recently I've had them overlap burned in text.

    Playing around I made the following changes:
    I changed the font from 16 to 22, the spacing from 0 to 0.5 and the resolution from PlayResX: 384 and PlayResY: 288 to 400x310.

    Here's the original closed caption, the default ffmpeg version (but with the black background removed) and my current one. While it's not 100% perfect, I have no idea if the settings will be ideal for all videos or just this one.

    Any suggestions, recommendations, or experience?

    Image
    [Attachment 94081 - Click to enlarge]

    Image
    [Attachment 94082 - Click to enlarge]

    Image
    [Attachment 94083 - Click to enlarge]


    Code:
    [Script Info]
    ; Script generated by FFmpeg/Lavc62.35.100
    ScriptType: v4.00+
    PlayResX: 400
    PlayResY: 310
    ScaledBorderAndShadow: yes
    YCbCr Matrix: None
    
    [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: Default,monospace,22,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0.5,0,1,1,0,2,10,10,10,1
    Quote Quote  
  2. Member
    Join Date
    Sep 2005
    Location
    Darkest Peru
    Search Comp PM
    I take it back, those screenshots are from VLC. Playing the video on my TV with Kodi and it's a bit better than the default, but it doesn't look like the screenshots posted here.

    Is there a correct version?

    Maybe there's a better way to convert them to PGS?
    Last edited by doctorm; 20th Oct 2026 at 20:43.
    Quote Quote  
  3. I don't think there is a "correct" setting. The odd placement mostly comes from how 608 captions work. ffmpeg's caption decoder writes the .ass on a small fixed canvas (the 384x288 you saw) and places each line on the 608 row the broadcaster used. Players then scale that canvas to the video differently. That's why Kodi and VLC disagree, and why the captions sometimes sit on top of burned-in text: on air they often did too.

    For a clean, predictable result I'd drop positioning entirely:
    1. Extract to plain SRT with CCExtractor (still maintained and works on MP4): ccextractor Video.mp4 -o Video.srt. Or with your ffmpeg chain, write Video.srt instead of .ass. Every caption then sits bottom-centre, the player's default.
    2. Open the SRT in Subtitle Edit and run Tools > Fix common errors. 608 captions are often all caps with roll-up duplicates, and it can merge and clean those.
    3. For PGS, export from Subtitle Edit with File > Export > Blu-ray sup. Set the resolution to the video's real resolution (1920x1080 or whatever it is) and choose your font and size there. PGS is images, so it will look the same in Kodi, VLC and everything else.

    If you really want to keep the original positions (some shows move captions to avoid on-screen text on purpose), keep the .ass but set PlayResX/PlayResY to the video's actual resolution and scale the font to match. Then both players should render it the same way.
    Quote Quote  



Similar Threads

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