Menu

How can I add subtitles?

2010-02-25
2012-10-29
  • Johnny Alex

    Johnny Alex - 2010-02-25

    Hello. I'm trying to play a video file using DirectShow .NET and C#. How can I
    add subtitles supported? Its from the codec? From DirectShow? I google it but
    I couldn't find a solution?

     
  • snarfle

    snarfle - 2010-02-25

    Are the subtitles in the video file? Or are you creating them
    programmatically?

     
  • Johnny Alex

    Johnny Alex - 2010-02-26

    they are in the same folder with the video in a .srt or .sub file

     
  • Peter_B

    Peter_B - 2010-02-26

    You'll have to load the file yourself and write a lot of code for displaying
    them.
    The subtitles should be mixed with each frame.
    Use the Sample Grabber and get the frame number/the sample times in BufferCB
    (buffer callback).

    Peter

     
  • snarfle

    snarfle - 2010-02-26

    I'm guessing those files are not following any commonly recognized standard.
    Given that, pbj1234 has it right. You might look at the DxText sample for some
    ideas.

     

Log in to post a comment.