Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th May 2010, 00:14   #1  |  Link
Majin3
マジンさん
 
Join Date: Apr 2010
Location: Germany
Posts: 18
Loading .mkv files with linked segments

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.
Majin3 is offline   Reply With Quote
Old 26th May 2010, 23:27   #2  |  Link
kenpachi
Registered User
 
kenpachi's Avatar
 
Join Date: Mar 2010
Posts: 48
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.
kenpachi is offline   Reply With Quote
Old 27th May 2010, 12:45   #3  |  Link
Majin3
マジンさん
 
Join Date: Apr 2010
Location: Germany
Posts: 18
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...
Majin3 is offline   Reply With Quote
Old 27th May 2010, 13:33   #4  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
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).
sneaker_ger is offline   Reply With Quote
Old 27th May 2010, 14:01   #5  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
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.
Keiyakusha is offline   Reply With Quote
Old 27th May 2010, 14:06   #6  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
Forgot to check it (Majin3 already mentioned it) and you're right: the connection is lost.
sneaker_ger is offline   Reply With Quote
Old 27th May 2010, 17:35   #7  |  Link
Majin3
マジンさん
 
Join Date: Apr 2010
Location: Germany
Posts: 18
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...

Last edited by Majin3; 27th May 2010 at 17:37.
Majin3 is offline   Reply With Quote
Old 27th May 2010, 17:47   #8  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
There are supposed to be patched mplayer/mencoder builds around. I could get it to play just fine using this mplayer build, 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.
sneaker_ger is offline   Reply With Quote
Old 24th August 2010, 01:58   #9  |  Link
Majin3
マジンさん
 
Join Date: Apr 2010
Location: Germany
Posts: 18
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)
Majin3 is offline   Reply With Quote
Old 24th August 2010, 04:04   #10  |  Link
Chikuzen
typo lover
 
Chikuzen's Avatar
 
Join Date: May 2009
Posts: 595
@Majin3
If you want to use DirectShow File Reader for AviUtl with avisynth, try the following script.

Code:
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.
__________________
my repositories

Last edited by Chikuzen; 25th August 2010 at 17:16.
Chikuzen is offline   Reply With Quote
Old 25th August 2010, 01:39   #11  |  Link
Majin3
マジンさん
 
Join Date: Apr 2010
Location: Germany
Posts: 18
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.
Majin3 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 14:46.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.