Log in

View Full Version : DivX Media subtitle creation (xsub)


Pages : 1 [2] 3 4 5

vsr
15th March 2005, 13:42
Zhnujm,
tank you for this nice tool. I'm write a little app to convert from srt files to xsub files using your little and amazing program.

Features:

1. Convert from srt to bmp (PHILIPS SVCD designer file format);
2. Convert from above format to xsub (simple GUI to bmptoxsub);
3. A simple GUI to fuse;
4. can process srt files in batch mode to gen xsub's.

I have some problem with your time parser routines then Zhnujm, I ask you about the possibility of your program accept time format as hh:mm:sec.ms?

For those who wants try the program, download it here: ftp://200.136.190.108/srttobmp-1.0.4.18.rar

2005-05-05 Added some suport to non-alphabet charset. See changes.txt for more.

I write the app in my spare time then, don't expect a amazing one. The interface is a little... "complicated?" and have some bugs and useless features, for most of you, but works fine for my needs (produce a .divx file for watch in my standalone a Philips dvp642k/78 firmware v0531).

vsr

tvdpoll
15th March 2005, 18:42
vsr,

Very nice tool, thx.

However (complaining as usual), I have a little problem with it in the sence that I have a movie of 640 x 356 and no matter what I do, the subtitles are displayed somewhat high on my tv (pal).

I have tried it with a 720 x 400 movie as well, and that worked just fine.

Any advise?

Thx in advance, and thx for the nice tool!

vsr
16th March 2005, 14:54
@tvdpoll,

thanks for trying the tool. I made a little change in app and create a new option in miscelaneous "PAL TV" mode. It will change the "size" of bitmap to PAL res 720x576. Basicaly only change the bitmap positions.

You can try to uncheck the Clip Bitmap option and test but I have no ideia if will work (DMF limitations, Player limitations, who knows? I'm a hobbyist not an expert.)

Use the link in my last post to download the new version.

vsr

tvdpoll
16th March 2005, 15:10
thx vsr! I will try it right away and let you know the outcome.

tvdpoll
16th March 2005, 15:20
Sorry, but it does not seem to work. I get the following error when I want to create the xsub: "error, could not parse, <POSITION>".

Seems to be a problem with the positioning.

vsr
16th March 2005, 17:19
I suspect that, DMF are limited up to 720x480 resolution.


vsr

tvdpoll
16th March 2005, 17:32
Sorry, vsr, but what is DMF?

What I find strange is that I can position them lower using the srt2sup and bmptoxsup tools.

It would be great if this would be possible using your tool, since this is so much easier to use.

vsr
16th March 2005, 17:41
Sorry, DMF = Divx Media Format.

vsr

tvdpoll
16th March 2005, 17:49
But if I can do it using srt2sup and bmp2xsup, does this not mean that it is 'technically' possible, in other words, that the divx media format accepts this?

Zhnujm
16th March 2005, 20:11
Originally posted by vsr
I have some problem with your time parser routines then Zhnujm, I ask you about the possibility of your program accept time format as hh:mm:sec.ms?


That would be possible, in fact it would be easier as the divx media also uses milliseconds. I think i can create a millisecond mode, but it would be best if the ms value always use 3 chars for easier parsing.

@tvdpoll:
Are you trying to create the subtitles with the "REPOS" option ?
Thats not possible as it semms that srttobmp creates full-screen bitmaps.

vsr
16th March 2005, 20:55
Originally posted by Zhnujm
That would be possible, in fact it would be easier as the divx media also uses milliseconds. I think i can create a millisecond mode, but it would be best if the ms value always use 3 chars for easier parsing.

No problem, srt files uses 3 chars for millisec. I could use a modified Philips SVCD Designer file (or a specific one to make easier) as output for bmptoxsub, some suggestion?

Zhnujm, correct me if I wrong, bmptoxsup uses the FRAMERATE header to determine the size of bitmat, right? PALMODE1 and PALMODE2 determines if change bitmap position or not.

@tvdpoll,
srttobmp was generating Philips SVCD Designer only for NTSC I fixed that. Now seems to work. Download and try, again.

vsr

tvdpoll
16th March 2005, 21:25
@vrs
Thx! I'll give it a try, and will let you know bout the result

@Zhnujm
No, dit not use repos.

tvdpoll
16th March 2005, 22:27
vrs,

The positioning problem seems to be gone :-)
but now i get another error :-(

"cannot parse, <FRAMEMS>"

What does this mean? And can we do something about it?

Zhnujm
16th March 2005, 23:05
Thats an error in the frame to millisecond conversion.
I can look tomorrow what it means exactly, dont know anymore :D

vsr
17th March 2005, 12:37
This hapens when file header FRAMERATE (.sub file) points to NTSC or PAL values and the frame part of time code to another, eg.

XX:XX:XX:30

in ms results:

1) NTSC => 30 * 33 = 990
2) PAL => 30 * 40 = 1200 *** wrong value

in 2nd case we have PAL FRAMEHEADER and a NTSC frame value resulting in error: "cannot parse, <FRAMEMS>"

The values 33 and 40 are rounded time of duration for one frame (33.36ms for NTSC and 40ms for PAL). I discover the error, by observation of bmptoxsub log file. this error was fixed in srttobmp build 1033. tvdpoll please verify the file version.


vsr

tvdpoll
17th March 2005, 13:34
Vrs, thx for your comment.

However, I do not understand exactly. Which file version should I check? I have used the lates version of your tool when I got this error...

vsr
17th March 2005, 14:22
Right click in exe file, select properties and click in version tab, file version should be 1.0.3.3.

If version number match then I have another bug.

Can you send me the "bmptoxsub.log" file of your last erroneous conversion and the header part of .sub file generated by my tool.

vsr

tvdpoll
17th March 2005, 14:35
vrs,

Thx for looking in to this.

I have the right version (1.0.3.3).

I did not have the erroneous files anymore. But have reproduced them. Where do you want me to send the files?

vsr
17th March 2005, 14:45
please send to vsr@polo.faenquil.br

vsr

tvdpoll
17th March 2005, 16:24
vrs,

Files sent...

vsr
17th March 2005, 17:28
tvdpoll,
Bug fixed (I hope), try it again...

Download it here (ftp://200.136.190.108/srttobmp-1.0.4.18.rar) (build version 1.0.4.18 - 2005-05-05)

vsr

tvdpoll
17th March 2005, 17:39
vrs,

It seems to be working now! Great!!! Have not tried the result on my standalone player yet, but i'm sure it will be ok (will confirm this later).

Thanks for this great tool. Now subtitling my movies is a peace of cake ;-)

Zhnujm
17th March 2005, 18:26
Hi !
I added support for ms values, the lines should look like that:
test100001.bmp 00:00:05.020 00:00:07.180 292 072 214 050

I dont have any longer testfiles for that so maybe its working....


Originally posted by vsr
Zhnujm, correct me if I wrong, bmptoxsup uses the FRAMERATE header to determine the size of bitmat, right? PALMODE1 and PALMODE2 determines if change bitmap position or not.


The FRAMERATE header is used for creating the right divx subpicture size (always 720x576 for PAL or 720x480 for NTSC) and also for converting frames to milliseconds. PALMODE1 forces NTSC dimensions also for PAL.

Small request:
Can you change your program to create only bitmap sizes with even numbers ? Dont know if its a real problem but divx media format does only allow even numbers.
They should also start at even x and y positions but thats no problem as bmptoxsub already changes these values (i had some problems with playback on my hardware player without that).

tvdpoll
17th March 2005, 18:47
@vrs

Still trying, have some problems. Will let you know...

tvdpoll
17th March 2005, 19:50
Have it working.

Somehow the placement of the subs seems to be related to the size of the movie. Can anyone tell me exactly how this works?

Thx.

vsr
17th March 2005, 21:28
@Zhnujm
thx for added suport for milliseconds. I added "Force even sizes" and "Use millisec in time code" options in miscelaneous.

@tvdpoll
I gen subs only in NTSC I don't noticed this, until now, for this reason, maybe.

Download new version with fixes, improvements and non-cosmetics changes in GUI in same link.


vsr

Zhnujm
18th March 2005, 14:09
The subtitle position should be independent from the movie size, at least for hardware playback.
For software playback it seems that the whole subtitle frame size 720x576/480 is scaled down to the movie resolution and then displayed, but i dont know exactly.

tvdpoll
18th March 2005, 14:19
Originally posted by Zhnujm
For software playback it seems that the whole subtitle frame size 720x576/480 is scaled down to the movie resolution and then displayed, but i dont know exactly.

Somehow this seems to be what my Stand alone DVD player (Mystral 364) is doing. When I used a movie with smaller resolution, the subs where placed out of sight, and I had to use a bottom margin of 120.

Anyway, other than that, everything is working fine now, so I would once again like to thank the both of you (Zhnujm & vrs) for your nice work!!!

vsr
21st March 2005, 20:05
Revised version released (ftp://200.136.190.108/srttobmp-1.0.4.18.rar) I made some changes on preview to allow more precise positioning of subtitle.

4:3 Preview mode (partially tested)
NTSC mode (default) - tested - works fine (tested on Philips DVP642/78).
PAL mode not tested

16:9 Preview mode (not tested)

2005-05-05 added suport to non-alphabet charset.
korean Hangeul - tested and working.

@tvdpoll
if you can test the PAL mode, let me know the results thx.

vsr

tvdpoll
24th March 2005, 21:50
@vrs

sorry, have been away this week, just came back home tonigh. Will test it tomorrow or during the weekend and will let you know the results.

tvdpoll
26th March 2005, 10:23
@vrs

Pal mode works fine, thx. However, I still have some problems positioning the subtitles, it does seem to be related to the movie resolution on my dvd player.

dragonlyXXL
30th March 2005, 02:20
First, Thank you Zhnujm & vsr for making these tools. They we're the only tools I found for muxing subtitles into my DivX movies to be able to watch them on my I-O Data AvelPlayer.

The only thing I have a problem with right now is the latest version of srt2bmp: for some reason I can't see anything in the preview area, with any settings I've tried, and of course, when I try to generate the bmps, they're all blank. In the last 2 previous versions everything was fine. Am I doing something wrong?

(...and btw, vsr: is there any chance you can post a link to any of the older versions of your tool? I've mistakingly overwritten it with the last one, which doesn't work for me:( THX!)

Cheers, and thank you for a great job.

vsr
30th March 2005, 13:27
Originally posted by dragonlyXXL
for some reason I can't see anything in the preview area, with any settings I've tried, and of course, when I try to generate the bmps, they're all blank. In the last 2 previous versions everything was fine. Am I doing something wrong?

No, I don't know what happens but happens. File corruption I think. I detect the problem and update the file on server after five minutes. You must be the lucky one that's get the corrupted file.
Try the new version (ftp://200.136.190.108/srttobmp-1.0.4.18.rar) with some fixes and minor changes in code. I added a new option "Force multiple of 16" to fix a small diference in position of subs in "preview" and TV screen (seems to work, at least in my player).


(...and btw, vsr: is there any chance you can post a link to any of the older versions of your tool? I've mistakingly overwritten it with the last one, which doesn't work for me:( THX!)
Unfortunately no. I don't keep old versions.

I almost forget, from now the build version is part of packed file name.

vsr

dragonlyXXL
30th March 2005, 16:28
the new version works like a charm! thank you.

miras19
6th April 2005, 10:55
Hallo! Finally I can post now!
I have still problems with creating this subtitle!
I figure out that I must in mux DMF connect .xsub file with movie is this right? But when I do "Double click to select"
the subtitle is not there! But I maked it by clicking on Make Xsub button, and it created me an .sub file!? What is wrong??? And when I only mark and add to job list the movie and pres start job it shows me an error. Please help:confused:

vsr
6th April 2005, 12:32
Hi miras19,

I found this small guide as a original post of "dragonfly" in this forum (http://www.iodata.com/usa/forum/archive/index.php/t-143.html),
following the modified version by me.

To add XSub subtitles to your video:
===========================
1. put the fuse.exe, divxcheck.dll, aviMux.dll (from the fuse package)
in the same folder as SRT2bmp.exe and bmptoxsub.exe (from the Doom9 forum);

2. start SRT2bmp;

3. load your SRT file. (make sure you don't have any spaces in the srt
filename);

4. setup your styling preferences (font, color, location etc...). Make
sure the subs fit inside the reference lines you have in the preview
pane, otherwise you'll have problems in the following steps. when you
load the srt file, the app will point you to the longest subtitle
line;

5. After above step, define your output directory for the BMPs;

6. Generate BMPs from your srt, use the "Render BMPs" button;

7. if you got no warnings or error messages, you'll have a sub file
and a series of bmp files on directory defined on step 5;

8. generate the XSub file using the "Make Xsub..." button, point the
app to the directory where you have the bmps and sub. Use the same
directory to save the xsub file, and check the "delete bmp after
creating xsub" checkbox.

9. if you get the xsub file you're ready to mux so continue to the
next step, otherwise you had some bmps extending beyond the size
allowed by the fuse tool (NTSC: 720x480, PAL: 720x586), so you'll need
to tweak the line breaks and/or size of your subtitles and generate
the bmps again untill you're good.

10. once you got the xsub file just "Mux DMF..." and point the app to
your avi and xsub, and mux.

thx dragonfly for this small guide in english, I have no time to write
one until now.

vsr

miras19
6th April 2005, 13:41
Thanks Very Much you vsr and dragonflyXXL for this guide :)
Edit:
Have still problems with muxing;)I have maked a .xsub file but When I prees the start job button it shows me a Dos Screen wich says error opening AVI file >C:\"Here is the movie path"< for reading
Processing beginning chunks. And a standard winXp window "It is a problem with fuse.exe blablabla send or don't send raport! Have try your guide in any ways but nothing :angry: But thanks anyway for your help, and sorry for taking your valuable time! Bay

mgh
14th April 2005, 11:20
fuse converts subtitles to xsub format before muxing-or am i missing something?

vsr
14th April 2005, 12:30
@miras19
And a standard winXp window "It is a problem with fuse.exe blablabla send or don't send raport!

I have same problem twice, the first one I solve by loading the file in virtualdubmod and saving again with "direct strem copy" option. The second I have to reencode the movie to solve the problem.

@mgh
fuse converts subtitles to xsub format before muxing-or am i missing something?
Yes and no. Yes when you passes the ".srt" file as a parameter to fuse. No when you use srt2bmp to generate the .xsub file in that case srt2bmp converts .srt file to .sub file (and bitmaps) then bmptoxsub converts the .sub file, generated by srt2bmp, to xsub.

vsr

miras19
18th April 2005, 12:42
Ohh:D Thanks for your help, but still have a problem... what is this " loading the file in virtualdubmod and saving again with "directstrem copy" option"?!? How do I maked this? Do I need I program for??? :confused: :D

vsr
18th April 2005, 13:14
Originally posted by miras19
Do I need I program for??? :confused: :D
No, VirtualDubMod (VDubMod) is a modified version of popular VirtualDub program, for linear video editing. I don't know what but when I load (open) the movie file (the problematic one) in VDubMod and save it again with no reencode (Menu: Video | Direct Stream Copy) then fuse process the new "saved" file without problem.

vsr

dragonlyXXL
22nd April 2005, 01:33
@vsr:
Glad you found my guide on the LinkPlayer forum. I was thinking of posting a more generic guide here (the one on the forum was somewhat specific for LinkPlayer users), but you beat me to it.
Cheers.

neo_anderson
24th April 2005, 08:39
can i convert a .sub (dvd subtitle) or .idx file directly to xsub, without using subrip to form srt fles in between?

neo_anderson
24th April 2005, 08:43
srttobmp download is not working

vsr
25th April 2005, 13:04
Originally posted by neo_anderson
srttobmp download is not working

If this link (ftp://200.136.190.108/srttobmp-1.0.4.18.rar) not work, try here (http://polo.faenquil.br/~valerio/srt2bmp/srttobmp-1.0.4.18.rar) .


vsr

neo_anderson
25th April 2005, 19:41
Originally posted by vsr
If this link (ftp://200.136.190.108/srttobmp-1.0.4.14.rar) not work, try here (http://polo.faenquil.br/~valerio/homepage/download.php?lng=en) .


vsr

Thanks

westgroveg
1st June 2005, 13:51
First thanks Zhnujm for making this program. Second where can I get fuse.exe?

Thanks,
Martin

westgroveg
1st June 2005, 13:58
First thanks Zhnujm for making this program. Second where can I get fuse.exe?

Thanks,
Martin
Fuse SDK.

Third do I need to create a .DIVX output?

ricardo.santos
16th June 2005, 21:37
Hi vsr.

ive been using your tool since version .13 but a week ago this error started to appear even with the last versions .

can you shed some light?

thanks

thefluffy
16th June 2005, 21:47
The DivX Media specification for subtitle support was modified slightly after receiving feedback from CE partners. The str2bmp tool is running on the outdated specification and tools (fuse). Shortly we will release updated tools and documentation for the DivX Media format.