Log in

View Full Version : Correct subtitle width for anamorphic video?


MaximRecoil
19th September 2007, 17:56
I am converting a 16:9 anamorphic PAL MPEG-2 video to 16:9 anamorphic NTSC MPEG-2 (DVD) video. I am also using AVISynth's "TextSub" (VSFilter) along with an .SRT subtitle file to "hardsub" the video.

I am using Canopus ProCoder 3 for the encoding/conversion.

This is my .AVS script:

MPEG2Source("K:\video.d2v")
TextSub("C:\subtitles.srt")

So the subtitles look fine if I open the .AVS script in e.g., VirtualDub and scroll through, but that is with the distorted aspect ratio of course. After encoding the video and playing it back, it stretches to its correct 16:9 aspect ratio and it stretches the subtitles out too.

Is there any way to have the subtitles squeezed together during encoding so that when the video stretches during playback the subtitles will look correct?

manono
20th September 2007, 15:27
Hi-
Is there any way to have the subtitles squeezed together during encoding so that when the video stretches during playback the subtitles will look correct?
My first question would be why on earth you'd want to hardcode the subs? Make them selectable and the problem disappears. My second suggestion would be to convert the SRT subs to SSA, and then choose a "thin" font that will still look OK when stretched out. My third suggestion, although not an especially good one, would be to resize to anamorphic resolution, add the subs, and then resize back, like so:

LanczosResize(854,480)
TextSub("C:\subtitles.srt")
LanczosResize(720,480)

That way they'll look squeezed together at 720x480, but "normal" when resized for anamorphic playback.

MaximRecoil
20th September 2007, 18:24
Hi-

My first question would be why on earth you'd want to hardcode the subs? Make them selectable and the problem disappears.For one, I've known standalone DVD players that wouldn't automatically play subtitles even when they were supposed to be "forced". For example, you might test it in a software player such as PowerDVD and everything seems fine, i.e., the subtitles work without having to manually turn them on, and then when you try the DVD in the standalone, they don't come on and you have to turn them on every time you watch.

Secondly, the subtitles that show up with "TextSub" look pretty good. I don't know what the trick is to making them look smooth, but they look a lot better than the somewhat jagged looking letters that show up with selectable subtitles. Additionally, burning the subtitles in has a softening effect that happens during the MPEG-2 encoding that makes them look even better as opposed to the harsh, sharply contrasted effect of selectable subtitles that makes them look out of place and "floating" above the video rather than integrated into it. Plus I have to reencode anyway to convert to NTSC. If it was already NTSC I wouldn't reencode just to get hardsubs because preserving picture quality is a lot more important to me than how the subtitles look -- I would just reauthor and add selectable subtitles that way.
My second suggestion would be to convert the SRT subs to SSA, and then choose a "thin" font that will still look OK when stretched out.
Okay, I looked into this option and rather than converting to an .SSA or .ASS file, I made a .SRT.STYLE file to change the font in the existing .SRT file. This allowed me to keep the default look that VSFilter generates when using TextSub + an .SRT file, which I like due to its smoothness, while only changing to Arial Narrow. This works out okay. It is not perfect; the text is still a little wide during playback, but it is a big improvement and I can live with it.

My third suggestion, although not an especially good one, would be to resize to anamorphic resolution, add the subs, and then resize back, like so:

LanczosResize(854,480)
TextSub("C:\subtitles.srt")
LanczosResize(720,480)

That way they'll look squeezed together at 720x480, but "normal" when resized for anamorphic playback.
Actually I think that is an awesome suggestion. It may not be a good idea from a picture quality standpoint, due to the additional processing, but for the desired effect, it would certainly do the trick and I never would have thought of it.

KoD
21st September 2007, 12:23
He could also convert the subs from srt to ass (for instance, with Aegisub) and then use ass stretch commands to horizontally compress the subs by the amount required.