Page 1 of 1

MKV DVB subtitle support

Posted: 11 Feb 2011 23:12
by Dan203
Hey, my name is Dan and I'm a developer for the video editing app VideoReDo. Recently we added support for MKV to VideoReDo. We have a lot of European users and one of the things I wanted to do was add support for storing DVB subtitles in MKV. However, based on my research, there is no standard for storing DVB subtitles in MKV so I went ahead and created one. Basically what I did was I added a new MKV stream descriptor called "S_DVBSUB". For the codec_private I basically just store the complete TS PMT descriptor buffer which has the following format...

int subtitleDescLength = descriptor_length;
CBitReader brSubtitle( descriptor_buffer );
while( subtitleDescLength >= 8 )
{
car langCode[4];
brSubtitle.GetBytes( (UCHAR *) langCode, 3 );
int subtitlingType = brSubtitle.GetByte();
int compositionPageId = brSubtitle.GetBits( 16 );
int ancillaryPageId = brSubtitle.GetBits( 16 );

subtitleDescLength -= 8;
}

And then finally I store the complete DVB frames in the file as MKV chunks.

The system works great when reading the files back into VideoReDo, but for it to really work we need a player to actually support this combination. A lot of our users also use VLC so I thought this would be a good place to start. I was going to add support myself but I'm not even setup to build VLC. So I figured I'd ask here first and see if someone who is setup to build/edit VLC might be willing to add support for me. If anyone is and would like a sample MKV file containing DVB subtitles for testing let me know and I'll put one up on our FTP for you.

If no one is willing to make this change for me then can someone at least point me in the direction of instructions for how to build VLC using MinGW? I already hav MinGW setup to build FFmpeg so I'd rather use it to build VLC too rather then go through the whole process of setting up cygwin.

Thanks,
Dan

Re: MKV DVB subtitle support

Posted: 11 Feb 2011 23:47
by Jean-Baptiste Kempf
Hmmm, i can help. Come on IRC.

The best would be to compile VLC on linux or follow the Mingw guide of the wiki.

Re: MKV DVB subtitle support

Posted: 15 Feb 2011 23:27
by Dan203
OK some how I totally missed this reply. I sent you a PM with my email address. If you're still willing to help please contact me and I will provide you with whatever you need to make this work.

Thanks,
Dan

Re: MKV DVB subtitle support

Posted: 15 Feb 2011 23:54
by Jean-Baptiste Kempf
Come on our IRC. Not mail :D

Re: MKV DVB subtitle support

Posted: 16 Feb 2011 12:58
by robUx4
Hi,

Here are 2 threads on the subject and hints of the proper/better way to do it:
http://lists.matroska.org/pipermail/mat ... 03773.html
http://lists.matroska.org/pipermail/mat ... 03114.html

Feel free to post your questions on our Matroska devel mailing list so we can push the correct use further and let other people working on Matroska know about it.