View Full Version : Loading .mkv files with linked segments
Majin3
26th May 2010, 00:14
Hello,
I would like to ask if there is some easy way to load .mkv files which use linked segments and subtitles.
The only way I found so far is:
Extract subtitles -> Create .grf file -> Load .grf for video and audio with DirectShowSource() & AudioDub() -> load subtitles with TextSub() -> Encode
... which is a bit annoying if you have to do it for a lot of files.
The easiest way would of course be simply DirectShowSource(), but that way the linked segments are ignored. Why is that so? Shouldn't DSS be the same as if GraphEdit/a DirectShow Player opens the file?
Well, that's not a problem if I use a .grf file, but then the subtitles are missing because GraphEdit (and GraphStudio too) seem to delete the subtitle connection from Haali to DirectVobSub if I save the .grf file.
So these both problems leave me with the solution above which I would like to avoid.
Thanks in advance.
kenpachi
26th May 2010, 23:27
I think I still can't understand the problem but You use DirectShowSource() to solve it somehow. It ignores something, though. Have You tried DSS2()? The function is in avss.dll plugin located in installation folder of Haali filter.
Majin3
27th May 2010, 12:45
Yes, I've also tried dss2() and ffmpegsource2(), which both ignore the linked segments, just like the normal dss().
I guess it's natural for ffmpegsource2() since it doesn't support such features, but I thought the directshowsources should work...
sneaker_ger
27th May 2010, 13:33
That's really strange, I played around a bit and can't get it to work either. I think I got it working a few years ago with simply "directshowsource" without making any graphs. I tried downgrading Haali, but it didn't help. (Maybe I'll test older vsfilter/avisynth). I also tried Direct264 which uses DirectShow input but it also ignores the ordered chapters (subs are loading fine though). :confused:
Keiyakusha
27th May 2010, 14:01
afaik the problem is that after saving .grf file, connection between subtitle source and subtitle renderer is lost. You can load created .grf file back into graphstudio and check if this is true.
sneaker_ger
27th May 2010, 14:06
Forgot to check it (Majin3 already mentioned it) and you're right: the connection is lost.
Majin3
27th May 2010, 17:35
So these both issues are really bugs? Seems like not many people want te re-encode such files...
I've also tried that a few years ago and it was the same.
Is there maybe another program which can do that? I kind of doubt that though...
sneaker_ger
27th May 2010, 17:47
There are supposed to be patched mplayer/mencoder builds around. I could get it to play just fine using this mplayer build (http://kovensky.project357.com/), but mencoder seems to ignore the chapters (maybe needs some extra arguments). I guess it should be possible to pipe the mplayer output but that is above my knowledge, as I generally know next to nothing about mencoder/mplayer.
Majin3
24th August 2010, 01:58
Sorry for digging this out. I just wanted to say that I've finally found a solution, though not with AviSynth. Maybe it can help someone else.
The program is called AviUtl and is a japanese VirtualDub-like program. And with its DirectShow plugin it's the only encoding program I've found so far which does exactly what it says: Loading the file with DirectShow, exactly like media players (inclusive linked segments)
The drawbacks: It's only in japanese and chinese; it's like VirtualDub, so only VFW and .avi; it seems to mess up the audio sometimes (I didn't look into it yet, though)
Chikuzen
24th August 2010, 04:04
@Majin3
If you want to use DirectShow File Reader for AviUtl with avisynth, try the following script.
LoadPlugin("***\warpsharp.dll")
LoadAviUtlInputPlugin("***\ds_input.aui","DSInput")
DSInput("***\foo.mkv")
In case of that your source is vfr, open ds_input.ini (it will exsists in the same place as the application that you use to open .avs) and edit the value of "ForceFrameRate" from 0 to 119.880fps.
Majin3
25th August 2010, 01:39
Ah, thank you. Seems to work perfectly. I had never thought warpsharp had such a filter integrated...
But I guess I'll stick with AviUtl for now (unless I can't solve that audio distortion problem) since it's easier to re-encode that way and I need it for the fftspectrum plugin anyway.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.