Log in

View Full Version : Scenarist Text Subtitles


paulspurrier
25th February 2009, 10:18
A common way to put subtitles on Scenarist BDMV is to use an XML with associated PNG graphics - often produced by Subtitle Workshop.

However, Scenarist supports text subtitles.

For me this seemed to be a sensible way to go.

1. Titles are stored as text not as images, so you save disk space.

2. Subtitle Workshop has massive bugs in its output of PNGs which need working around to get the palette right and avoid little artifacts.

3. It offers the opportunity for players to alter the size of the subtitles (in theory - I don't quite know how you set up a player to do this)

4. I may be totally wrong, but it would seem to me that you might be able to get more subtitle streams per clip, since they are probably not taking up very much bandwidth when stored only as text.



I have entered all my subtitles.

The first annoyance is that I got a lot of errors when encoding the title stream. It would appear that there is a minimum time between the start of one subtitle line and the start of the next, depending upon the character length of the subtitle line. This means that I had to edit the start times of a number of lines. Very annoying as it sometimes means that line is then delayed against the dialogue. (No mention of this in the Scenarist manual of course.)


Having muxed and tested in Total Media Theater, the subtitles look good, sharp, and come up at the right place and time.

I thought I was done with the project and ready to replicate.

However, I created a BD-RE and tested it in PowerDVD and in my Samsung player.

The subtitles don't show up on either. They simply aren't there.

I don't know why they aren't showing.
Is it because the disk is a BD-RE and the subtitles are in fact okay?
Or is there something wrong with the subtitle streams that means they won't show on the final replicated disks?

Can I trust Total Media Theater?

There is very little mention of TextST subtitles on this forum.
I wonder if anyone has any experience, hints or tips on using them?

Help appreciated.

Paul Spurrier

deank
25th February 2009, 12:10
Be advised that text subtitles may be hard to read in some bright scenes or when their color matches the background video. As I recall - text subs don't support outline/shadow or other effects and that's why most producers avoid using them.

Here is a small script that I wrote few years ago. You can use it in SubtitleWorkshop and it will help you get proper timing distance. You can save it in your SW path (ie C:\Program Files\URUSoft\Subtitle Workshop\PascalScripts) as Timings.pas and you can access it in SW via TOOLS/Pascal scripts.../Timings

[download link] (http://www.deanbg.com/timings.pas)


// ##################################################################
// (c) subs.sab.bz
// programming by Dean Kasabow (dean@deanbg.com)
// ver. 0.4 10-Apr-2007
// ##################################################################
// This script does the following in the specified order:
//
// * Sets minimal duration of 3000ms - FOR SELECTED SUBTITLES ONLY!
//
// * Sets subtitle duration if current is less than
// 60ms per word + 60ms per line + 80ms per character
//
// * Removes first line hypens '-'
//
// * Splits long lines adequately
//
// * Fixes overlapping (zero or negative distance)
//
// * Sets minimal time/frame distance between two subtitle lines
//

program Timings; // by dean for subs.sab.bz

const frames=4; // set frames distance desired
const fps=24; // set closest fps - INTEGER - works fine with 24, 25, 29, 30

const mintime=3000; // minimal duration - 3000ms - works for SELECTED subtitles only

const perWord=60; // time to add per word (60ms)
const perLine=60; // time to add per line (60ms)
const perChar=80; // time to add per character (80ms)

const minlen = 12; // min line length after/before split
const maxlen = 38; // max line length + 2

const DoSplit = true; // set to FALSE if you don't want line splitting

var
cv, ch, a, crpos, durr, llen, llen1, llen2, words, x, fs, s : integer;
line, line1, line2, durrs : string;

begin

// you may decide to work in milliseconds
// it will disregard the fps/frame settings and will set distance in ms (i.e. 170ms)
// cv : = 170;

cv := (1000 div fps * frames);


if IsOriginalLoaded = False then EnableWorkArea;

for a := 1 to GetSubtitleCount-2 do
begin

// sets minimum duration 3000ms (mintime)
if (IsSubtitleSelected(a)=True) then
begin
if (GetSubtitleFinalTime(a) - GetSubtitleInitialTime(a) < mintime) and (GetSubtitleInitialTime(a+1) - GetSubtitleFinalTime(a) > cv ) then
begin
SetSubtitleFinalTime(a, GetSubtitleFinalTime(a) + mintime - (GetSubtitleFinalTime(a) - GetSubtitleInitialTime(a)));
end
end;
end;


for a := 1 to GetSubtitleCount-1 do
begin

// removes "- " from original
line := GetSubtitleText(a);
if copy(line,1,2) = '- ' then
begin
SetSubtitleText(a,copy(line,3,length(line)-2))
end;

// removes "- " from translation
line := GetSubtitleTrans(a);
if copy(line,1,2) = '- ' then
begin
SetSubtitleTrans(a,copy(line,3,length(line)-2))
end;

// split long lines adequately

if DoSplit then
begin
line := GetSubtitleText(a);
crpos:=pos(chr(10),line);

line1:=copy(line,1,crpos-2);
line2:=copy(line,crpos+1, 255);

if crpos=0 then
begin
line1:=line2;
line2:='';
end;

llen1:= length(line1);
llen2:= length(line2);

// if (copy(line2,1,2) = '- ') then line2:='('+line2+')';


if abs(llen1-llen2)>minlen then

if (copy(line2,1,2) <> '- ') then
begin
line1 := line1 + ' ' + line2;
line2 := '';
llen1 := length(line1) div 2;
fs := 0;
if true then
begin
for s:= llen1 downto 5 do
begin
if copy(line1,s,1)=' ' then
begin
fs:=s;
s:=5;
end;
end;
if fs<>0 then
begin
line2:=copy(line1,fs+1,255);
line1:=copy(line1,1,fs-1);
end;
end;
end;

line1:=trim(line1);
line2:=trim(line2);
llen1:= length(line1);
llen2:= length(line2);

if (llen1<maxlen) and (length(line2)<maxlen) and (llen1>minlen) then
begin
line := line1
if length(line2)>0 then line:=line+chr(13)+chr(10)+line2;
setsubtitletext(a,line);
end;

end; // DoSplit



// sets 80ms per char, 60ms per word and 60ms per line

durr := 0;
line := GetSubtitleText(a);
crpos:=pos(chr(10),line);
llen := length(line);

// per char
durr := durr + perChar * llen;

// per line
if crpos>1 then durr := durr + perLine;

// per word
words:=1;
for x:=1 to 20 do
begin
if pos(' ',line)>0 then
begin
words := words + 1;
line := copy(line,pos(' ',line)+1,1000);
end
end;
durr := durr + perWord * words;

if (GetSubtitleFinalTime(a) - GetSubtitleInitialTime(a)) < durr then
begin
setsubtitlefinaltime(a, GetSubtitleFinalTime(a) + durr - (GetSubtitleFinalTime(a) - GetSubtitleInitialTime(a)) );
end;


end; //for cycle


for a := GetSubtitleCount-1 downto 1 do
begin

// check for overlapping and fixes it
if GetSubtitleInitialTime(a) < GetSubtitleFinalTime(a-1) then
begin
SetSubtitleFinalTime(a-1,getSubtitleInitialTime(a) - cv);
end;


// sets frame distance if needed
if GetSubtitleInitialTime(a) - GetSubtitleFinalTime(a-1) < cv then
begin
ch := (cv - (GetSubtitleInitialTime(a) - GetSubtitleFinalTime(a-1))) div 2;
SetSubtitleFinalTime(a-1,getSubtitleFinalTime(a-1)-ch);
SetSubtitleInitialTime(a,getSubtitleInitialTime(a)+ch);
end;


end;
end.

paulspurrier
25th February 2009, 12:53
Thanks for that useful script.
Will save a lot of time in future with the timings.

I still can't get the TextST subtitles to display at all in anything other than Total Media Theatre.
It's not that they might be dark or disguised. They simply aren't there.

What do you think about "Prohibit Player Own Style" setting, "User Control Style" settings and "Forced On Flag" settings?

Could any of these be messing me up?

Or is it just that there are compatibility problems with TextST subtitles?

Or is my OpenType font maybe at fault? (Unlikely, since subtitles display fine within Scenarist and fine within Total Media Theatre)

Thanks.

Paul

deank
25th February 2009, 12:59
I have no experience with Scenarist, but you can try few different things. Leave "Prohibit Player Own Style" unchecked - so the player is not restricted in any way. And probably leave unchecked the other two options.

TMT usually is the best software to test with.

orbitlee
26th February 2009, 10:40
I tried text subtitles on a few BD players(Pioneer, Denon, Panasonic), neither of them can display it.

paulspurrier
26th February 2009, 11:36
Wow!

Does that mean?

a. Scenarist is not creating them properly.
b. Something to do with BD-RE media playback

or

c. These players just can't play back text subtitles.

Surely if text subtitles are part of the Blu Ray spec, machines should be able to play them???

I can't release a film with text subtitles if a large number of players can't see them. We would get a large number of returned disks.

Does this mean I have to go back to the traditional PNG way of doing things? How hopeless!

dvdboy
26th February 2009, 12:38
Hi Paul,

What do Sonic Support say - I know that profiles also affect what can and cannot be done with Text Subtitles.

I think most companies are sticking with PNGs as it's the only way to ensure 100% what is going to be displayed.