PDA

View Full Version : DirectVobsub : technical question


Rasqual
8th January 2002, 18:55
Hi Gabest,

After looking at your tool and its source code, a question popped in my mind:

Is there a restriction in the media type associated with AVI Streams?
As far as I know, there are vids, auds and a few others (I guess .srt are txts). What would be great would be to "stream" normal files like rar archives or something like that; thus, it would be possible to bind meta-data to the AVI file itself, and therefore allow to distribute the whole in a single file. However, first I must "convert" the file to a stream (using Async File Source?) to mux it in an AVI file (until now I failed).

Next, when playing the file with a DShow compatible player, what the scheme would be like is:

Reconstruct the archive file in memory
Read the "manifest" (file listing) of the archive
Extract the files to memory and load them
Let the user choose which subtitle files are to be displayed
[/list=1]
(A. Lee's subtitler plugin supports text collisions very well)

Application: Multi-SSA support, by merging them together in a single file (styles, timecodes, etc.) and let Subtilter do the rest.
Reason: I love karaoke (I really thank Avery Lee for his great plugin!) and create some karaoke videos by myself. The problem is that the screen often gets overloaded because of
[list]
Japanese text
Rômaji text
Translation (if appliable)

which are encoded 'in hard' (not overlaid). And because I want to make things neat, I have to display two lines of text per language at once. Then, you understand why I need to disable unneeded scripts for the user.

What's your opinion about this ? Is it possible or not ?

gabest
9th January 2002, 09:04
Originally posted by Rasqual
Is there a restriction in the media type associated with AVI Streams?
As far as I know, there are vids, auds and a few others (I guess .srt are txts).There are exactly 3: vids, auds, txts. But since nothing is using txts, we can hide any bytestream in it, without causing problems :)...
However, first I must "convert" the file to a stream (using Async File Source?) to mux it in an AVI file (until now I failed).Async File Source will never output "txts" for you, it outputs a general format and the parsers (like AVI or MPEG splitter) convert into other formats for decompressor or other kind of filtersNext, when playing the file with a DShow compatible player, what the scheme would be like is:

Reconstruct the archive file in memory
Read the "manifest" (file listing) of the archive
Extract the files to memory and load them
Let the user choose which subtitle files are to be displayed
[/list=1]You can mux any number of streams into the avi, it isn't needed to use only one. The only reason you can't specify sub, smi, ssa or even idx/sub in submux is that I haven't wrote the code to handle those files on the input pin of dvobsub. All my file processing functions are working from a real file, and they should be converted a bit to accept memory files too.
(A. Lee's subtitler plugin supports text collisions very well)

Application: Multi-SSA support, by merging them together in a single file (styles, timecodes, etc.) and let Subtilter do the rest.
Reason: I love karaoke (I really thank Avery Lee for his great plugin!) and create some karaoke videos by myself. The problem is that the screen often gets overloaded because of
[list]
Japanese text
Rômaji text
Translation (if appliable)

which are encoded 'in hard' (not overlaid). And because I want to make things neat, I have to display two lines of text per language at once. Then, you understand why I need to disable unneeded scripts for the user.You can already load more ssa subtitles and choose between them using dvobsub.What's your opinion about this ? Is it possible or not ? Everything is possible, if there is somebody who has the time to implement it...

Rasqual
14th January 2002, 18:10
Dans l'épisode précedent, Gabest a dit:
There are exactly 3: vids, auds, txts. But since nothing is using txts, we can hide any bytestream in it, without causing problems
answering to:
Originally posted by Rasqual
Is there a restriction in the media type associated with AVI Streams?
As far as I know, there are vids, auds and a few others (I guess .srt are txts).
After studying the subject a bit further, it seems that these FOURCCs correspond to standard stream types, namely MEDIATYPE_Video, MEDIATYPE_Audio and MEDIATYPE_Text. There are others but I won't bother listing them, they're on the MSDN Library. You may create custom media types and subtypes => Gabest, this could gracefully clear your problems with "Internal Script Command Renderer" handling txts by default, forcing to "HookTextStreams" ! I don't know how much it impacts on code volume, but it seems cleaner to me (imagine sb else wants to use txts, will he/she give it a mega high MERIT to his/her filter ?)

et il a osé ajouter:
You can already load more ssa subtitles and choose between them using dvobsub.
Actually what I'd like to do is displaying one or several SSA files at the same time, merging them and letting the Subtitler plugin do the rest.

gabest
14th January 2002, 21:55
Originally posted by Rasqual
After studying the subject a bit further, it seems that these FOURCCs correspond to standard stream types, namely MEDIATYPE_Video, MEDIATYPE_Audio and MEDIATYPE_Text. There are others but I won't bother listing them, they're on the MSDN Library. You may create custom media types and subtypes

The "AVI Mux" filter only accepts these three, so I can't.

motenai
3rd February 2002, 14:42
It's not really a solution but i know that a guy called K-sensei (who sub and translate EBICHU) has fix virtual dub plugin to display japanese subtitle... He could be joined on dalnet #animempeg.

If you find him, you'll tell me please :)

Yusaku
3rd February 2002, 22:46
well, yes, K-Sensei did (I even did know him a bit ^_^) - but that was in times of old 1.x version of subtitler (current 2.x supports DBCS, so it can display japanese directly). The topics in this thread are

1) merging two or more SSA files before parsing them (a bit like copy /b sub1.ssa + sub2.ssa subout.ssa) - turned down by Gabest

2) making cleaner implementation of muxed metadata (if you'll write new AVI DirectShow muxing filter, I'm sure Gabest will be happy to use it)

And if anyone will need help with Subtitler's source, I think it is best to ask Avery Lee directly - he knows his source best; and he's happy to help

trancexxx
13th June 2007, 15:39
Hi, I have a question, I have installed DirectVobSub and when I download a subtitle file (*.sub), name it the same as the .avi video (in the same folder), and play the video in Winamp, the video doesn't play. If i remove/rename the .sub file, it plays normally, but there are no subtitles. Can anyone help me please? Thanks

Milvus
13th June 2007, 15:50
1) Please don't ressurect five year old obsolete threads to ask a vaguely related question.

2) Use a true decent video player like Zoom Player or Media Player Classic. If you really want to use Winamp, try reading this page (http://www.cccp-project.net/wiki/index.php?title=Winamp_5).

trancexxx
13th June 2007, 17:36
1) Please don't ressurect five year old obsolete threads to ask a vaguely related question.

2) Use a true decent video player like Zoom Player or Media Player Classic. If you really want to use Winamp, try reading this page (http://www.cccp-project.net/wiki/index.php?title=Winamp_5).
Ok, I really didn't notice it was from 2002, sorry!
Thanks for the link.

Rasqual
13th June 2007, 17:46
Yup, an amazingly old thread~
Closing please?