On 25/07/2025 09.24, Devin Heitmueller wrote: > On Wed, Jul 23, 2025 at 8:00 PM Mark Filipak <markfilipak.i...@gmail.com> > wrote: >> >> dvdsubs are RLE (run length encoded) bitmaps. >> >> It appears that when dvdsubs from SD are encoded into full-HD, the run >> lengths are 720-to-1920 scaled and the lines (for NTSC DVDs) are >> 480-to-1080 scaled. That's great. However, the character bodies in the >> resulting dvdsubs are very fat and overrun each other. I presume the >> overruns are because the spaces between letters are not also scaled. The >> resulting subtitles are still somewhat readable but difficult. >> >> Does anyone know of a work around? >> >> Ideal would be scaling without 'fatness' by keeping letter stoke widths >> unchanged but scaling the heights and widths in addition to position -- >> yes, that will be tricky. Also ideal would be control over the palette. > > If I had to hazard a guess, it would probably be the issue is the DVD > subtitle images are expected to be rendered with a 4:3 aspect ratio.
That's logical, Devin, but... No, SAR is 32/27, so DAR is 16/9. FFmpeg should scale just the same as a player does [note], and then pad to 1920x1080. FFmpeg appears to mis-scale the RLE subtitles (i.e. dvdsub), or, at least, to get the new run lengths wrong -- a guess because I have no way to actually see the run length numbers. (You know, now that I'm thinking about it more, I don't know whether the problem is with FFmpeg's scaling or with the players.) [note] 1920 x (1080/SAR) = 1920 x (1080/(32.27)) = 1920 x 911 > Scaling them from 720x480 to 1920x1080 causes the pixel aspect ratio > to change, and thus they appear to be horizontally stretched. They're not horizontally stretched. They're just 'fat' -- the characters are 'fat'. :-) > I'm not sure what your pipeline looks like, but I would assume you > would need to change your scaling of the DVD subs to be scaled to > preserve the appropriate aspect ratio. > > Devin Besides what I wrote above, a 32/27 difference is just not a big enough difference to explain what I'm seeing. What I'm seeing isn't biggish, it's 'fat' -- 'e' looks like a blob for example. Right now I'm taking the existing DVD subs (dvdsub), making an 853x480 MKV via HandBrake, extracting IDX and SUB files from the MKV via mkvextract, OCRing via SubtitleEdit, and saving as SRT. Then putting the subrip subtitles (sub_text) into the MP4 via FFmpeg. Whew! It's really time consuming. For most movies I don't care about 'fixing' (SubtitleEdit) the awful subtitles and I'm seeking a way to simply get the original dvdsubs into the MP4 (-c:s dvd_subtitle), even if I have to forego scaling -- yeah, they would be small and towards the middle of the screen, but at least that would be progress. --Mark. _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".