4

I've got a problem, I have a .srt subtitle file, as external and internal as a subtitle stream, it's easy to load/read the external file but how to read the internal file with .mkv/media?

Extracting the .srt file to a temporary folder is only a temporary solution. (Not implemented yet..)

I want to read the file directly from the subtitle stream, any Ideas how to do that?

I've written my own .srt subtitle filter internally in my media player. Pure C# managed code

To add a little more clarification when you add SoftSubtitles to a media file, then it adds the file to the media as a TextStream and that's what I want to read.

I'm using MediaInfo.dll to read the language of the subtitle streams TextStreams but I can't read the actual subtitles..

To simplify the question even more, what I want is to read the subtitles just like I do with an external .srt file, but reading it from a TextStream is not as easy, because I can see it has a TextStream but can't find it, so can't read the Subtitles.

If Possible do you know any programs that can extract Subtitles in to MemoryStream then return the MemoryStream to my program?? Without removing the TextStream.

Does anyone know how the DirectSubVob or FFDshow load the TextStream from the currently playing media??

Du you know of Library that can extract Subtitles??

ArchAngel
  • 634
  • 7
  • 16
  • This is a bit too broad. Where do you want to start, write an MKV parser? There's various tools and libraries that can help you work with MKV files. Try searching. – CodeCaster Sep 22 '15 at 08:00
  • I can already read all info from the mkv/media but I can't get the subtitles. Reading and using is two different things. – ArchAngel Sep 22 '15 at 08:01
  • That is not in your question. Show how you currently "read all info" and how you want to "use" the subtitles. – CodeCaster Sep 22 '15 at 08:01
  • As I asked and said I've already got an srt subtitle filter, but I can't read the subtitle data from the subtitle stream.. – ArchAngel Sep 22 '15 at 08:03
  • And to answer your question, I'm currently using mediainfo to read the data but I'm only able to read the headers and not the actual data.. – ArchAngel Sep 22 '15 at 08:10
  • What is mediainfo? A tool? A library? (I can guess, but it can be both). You really need to provide more context. This question as-is is too broad and unclear. Read the answers to [this comparable question, but for Java](http://stackoverflow.com/questions/7374934/how-to-extract-subtitles-from-mkv-files-in-pure-java). Without any context, it's hard to get more helpful than what is stated there. – CodeCaster Sep 22 '15 at 08:30
  • `MediaInfo.dll` is library to read headers on media file, I can't find a way to read the actual data.. I only wish to read the subtitle stream as I would with an external `srt` file, read the subtitles and show them on the screen. – ArchAngel Sep 22 '15 at 08:32
  • How are you extracting the .srt to a temporary folder? It is very much possible to modify this process to have to read it in memory without creating a file. – Shreyas Kapur Sep 22 '15 at 09:07
  • I'm using another program for that, and it's only able to extract the subtitles not read them, at the sametime.. The program is called (DVDFab) – ArchAngel Sep 22 '15 at 09:10

1 Answers1

2

I fixed my subtitle problem, with a new custom subfilter, made from reading the source code of SubtitleEdit.

ArchAngel
  • 634
  • 7
  • 16