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. |
3rd December 2009, 17:42 | #1 | Link |
Registered User
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
|
DG NV Tools usage in StaxRip
There is a increasing amount of request regarding DG NV Tools usage in StaxRip
so I try to improve the integration. By default the source filter for AviSynth is empty in StaxRip and since it's empty StaxRip generates a source filter that can open the source file. If there is a source filter and StaxRip believes the source filter is not compatible it will overwrite it. If there is a bug in StaxRip then it might be possible to workaround it to make StaxRip believe the source filter it expects exists by using a comment. Better would however to tell me about problems so I can upload a hotfix. For dga and dgv files StaxRip expects the source filter to be either avcsource() or dgsource() and if it's not it generates avcsource() or dgsource() depending on the plugin it finds and if it don't find a plugin it aborts. For dgm files StaxRip expects dgmultisource() and if it's not it generates dgmultisource() or aborts in case DGMultiDecodeNV.dll is not in the plugin dir. What should always work is simply open a avs file instead of a dga, dgv, dgm file, in this case StaxRip don't make any assumptions, verifications or modifications trying to be smart, it should just work and not complain. The latest version improves support for AVS file opening in that it allows to define the source PAR or DAR easily with a menu in the main dialog since it's hardy possible to auto detect this for all scripts. AVS file opening was the main motivation for adding this new menu, since for most other files auto detection is reliable. The other motivation was supporting work-flows MeGUI users are used to or want to use. The handling for the next version will use the code below, maybe somebody can tell me if there is a error in the code. Code:
Case "dga", "dgv" If Not srcscript.Contains("avcsource(") AndAlso _ Not srcscript.Contains("dgsource(") Then If File.Exists(Paths.AviSynthPluginsDir + "DGDecodeNV.dll") Then p.AvsDoc.SetFilter("Source", "DGSource", "DGSource(""%source_file%"")") ElseIf File.Exists(Paths.AviSynthPluginsDir + "DGAVCDecode.dll") Then p.AvsDoc.SetFilter("Source", "AVCSource", "AVCSource(""%source_file%"")") Else MsgWarn("No compatible AviSynth plugin in plugin directory found.") Throw New AbortException End If AviSynthListView.Load() End If Case "dgm" If Not srcscript.Contains("dgmultisource(") Then If File.Exists(Paths.AviSynthPluginsDir + "DGMultiDecodeNV.dll") Then p.AvsDoc.SetFilter("Source", "DGMultiSource", "DGMultiSource(""%source_file%"")") Else MsgWarn("DGMultiDecodeNV.dll must be in plugin directory to open dgm files.") Throw New AbortException End If AviSynthListView.Load() End If Code:
case "dga": case "dgv": if (!srcscript.Contains("avcsource(") && !srcscript.Contains("dgsource(")) { if (File.Exists(Paths.AviSynthPluginsDir + "DGDecodeNV.dll")) { p.AvsDoc.SetFilter("Source", "DGSource", "DGSource(\"%source_file%\")"); } else if (File.Exists(Paths.AviSynthPluginsDir + "DGAVCDecode.dll")) { p.AvsDoc.SetFilter("Source", "AVCSource", "AVCSource(\"%source_file%\")"); } else { MsgWarn("No compatible AviSynth plugin in plugin directory found."); throw new AbortException(); } AviSynthListView.Load(); } break; case "dgm": if (!srcscript.Contains("dgmultisource(")) { if (File.Exists(Paths.AviSynthPluginsDir + "DGMultiDecodeNV.dll")) { p.AvsDoc.SetFilter("Source", "DGMultiSource", "DGMultiSource(\"%source_file%\")"); } else { MsgWarn("DGMultiDecodeNV.dll must be in plugin directory to open dgm files."); throw new AbortException(); } AviSynthListView.Load(); } break; if this was found in the registry then integration would be possible. The integration for included index applications looks as follows: Code:
Dim dgi As New CmdlPreparer dgi.Name = "Demux audio and index MPEG-2 using DGIndex" dgi.InputExtensions = "mpg mpeg vob mpv m2v m2t ts pva dat".Split(" "c) dgi.VideoOutputExtensions = New String() {"d2v"} dgi.InputFormatsBlacklist = New String() {"AVC"} dgi.CommandLines.Value = """%application:DGIndex%"" -i %source_files% -ia 2 -fo 0 -yr 1 -tn 1 -om 2 -drc 2 -dsd 0 -dsa 0 -o ""%working_dir%\%source_name%"" -minimize -exit" Dim dga As New CmdlPreparer dga.Name = "Demux and index AVC using DGAVCIndex" dga.InputExtensions = "m2ts m2t avc 264 h264".Split(" "c) dga.InputFormatsBlacklist = "MPEG-TS MPEG-PS VC-1".Split(" "c) dga.VideoOutputExtensions = New String() {"dga"} dga.InputFormats = New String() {"AVC"} dga.CommandLines.Value = """%application:DGAVCIndex%"" -i ""%source_file%"" -o ""%working_dir%\%source_name%.dga"" -a -h -e"
__________________
https://github.com/stax76/software-list https://www.youtube.com/@stax76/playlists Last edited by stax76; 3rd December 2009 at 18:22. |
Thread Tools | Search this Thread |
Display Modes | |
|
|