VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    I have an MKV with ASS subtitles and fonts embedded. If I play it in, eg MPC, it displays the subs perfectly, in the correct fonts.

    If I use Avisynth and Textsub to display the ASS sub (extracted from the MKV); it uses a default font, probably Arial.
    Code:
    FFmpegSource2("Zipang_01.mkv",atrack=2)
    TextSub("Zipang_01_Track5.ass") # hardsub text info
    However, if I open the MKV at the same time and pause it, then when I play the AVS file it uses the correct fonts.

    So evidently Haali media splitter (which icon pops up when playing the MKV in MPC) temporarily installs the fonts.

    Is there a way to get Haali (or another utility) to just install the fonts from an MKV, without having to play the video, so other programs can use them correctly?

    I could extract all the fonts and install them permanently in Windows, but I'd prefer an on demand method, so I don't load up my font menus with a lot of weird fonts I don't need otherwise.
    Quote Quote  
  2. Maybe if you used DirectShowSource() instead, and have haali set up as the default mkv splitter ?
    Quote Quote  
  3. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by poisondeathray View Post
    Maybe if you used DirectShowSource() instead, and have haali set up as the default mkv splitter ?
    Yes, that worked.

    Though I prefer to use ffmpegsource2.
    I tried to have it both ways, load DSS and overwrite it:

    Code:
    DirectShowSource("Zipang_01.mkv")
    FFmpegSource2("Zipang_01.mkv",atrack=2)
    TextSub("Zipang_01_Track5.ass")
    I could see Haali briefly load, then unload, so the fonts were not installed by the time the frame was displayed and Textsub was called.
    Seems Avisynth is too efficient and doesn't keep processes running after they've been superseded.

    I can also manually extract and install the fonts, but there are 14 of them in this MKV. It would be a drag, and error prone, to have to do that for any random MKV.

    So, unless some other trick comes to mind looks like I need to render with DSS to get at the fonts.
    Quote Quote  
  4. maybe you can load one section with dss then trim it out ? Does it "stay loaded" ?

    a=directshowsource()
    b=ffvideosource

    a++b
    Trim(100,1000) #or whatever


    or how does DSS2() work with the fonts ?
    Quote Quote  
  5. Member AlanHK's Avatar
    Join Date
    Apr 2006
    Location
    Hong Kong
    Search Comp PM
    Originally Posted by poisondeathray View Post
    maybe you can load one section with dss then trim it out ? Does it "stay loaded" ?
    Code:
    FFmpegSource2("Zipang_01.mkv",atrack=2) ++DirectShowSource("Zipang_01.mkv").AssumeFPS("ntsc_film")
    TextSub("Zipang_01_Track5.ass") # hardsub text info
    Trim(0,34070)
    The Haali tray icon pops up and stays on while it's running.
    Yep, this loads the fonts.

    And I was doing the Trim anyway.

    This is the best kludge so far.


    Originally Posted by poisondeathray View Post
    or how does DSS2() work with the fonts ?
    I'd never used DSS2. I installed it (just the avss.dll from the Haali folder, right) and ran it:

    Code:
    DSS2("Zipang_01.mkv")
    TextSub("Zipang_01_Track5.ass") # hardsub text info
    And yes, it did have the right fonts.
    But you may notice that I was using an alternate audio stream, which I can access in ffmpegsource2.

    You can't do that in DirectShowSource, don't know if I can in DSS2 -- I can't find any documentation for DSS2.
    Absolutely nothing at http://haali.su/mkv/
    Nothing at http://avisynth.org
    Any links to DSS2 docs?
    Though I suspect you can't script selecting audiotracks in it.

    The first script above works well enough, just curious about DSS2.

    EDIT: On checking, it appears that DSS2 doesn't supply ANY audio...

    So I won't be using it much, one of the main reasons I use DirectShowSource is it copes with audio better than AviSource, which sometimes just drops several minutes at the end of a video. Nasty if you didn't notice till after you've discarded the source.
    Last edited by AlanHK; 17th Nov 2010 at 00:47.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!