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 > VapourSynth
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 1st December 2019, 14:46   #101  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by Jukus View Post
Thanks.
Does GUI demux works only without audio, should it be?
Demuxing the audio happens while indexing for the first time. Demuxing the video happens after that.

It's kind of shitty.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 30th May 2020, 20:50   #102  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
On Windows is it required that d2vsource.dll is in the plugin auto load folder? In that case I would like to request a way using it without the auto load folder. Load it from PATH and also alternatively load it via command line option.
stax76 is offline   Reply With Quote
Old 1st June 2020, 21:00   #103  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by stax76 View Post
On Windows is it required that d2vsource.dll is in the plugin auto load folder? In that case I would like to request a way using it without the auto load folder. Load it from PATH and also alternatively load it via command line option.
I'm pretty sure I rely on VapourSynth's autoloading, yes. (Everywhere, not just on Windows.)

I suppose I could try loading it from PATH. What about loading from the same location as d2vwitch.exe? Would that be okay?

Do you still need the command line option if it's loading from PATH or the location of d2vwitch.exe? I would rather keep the command line options for command line usage (with no graphical interface).
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 1st June 2020, 23:10   #104  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
PATH would be preferred.

If you call LoadLibrary("d2vsource.dll") then Windows searches in PATH.

This would also search in PATH:

std.LoadPlugin('d2vsource.dll', altsearchpath = True)

Only same folder would be OK, even if I want to use different folders, still a soft link could be used.

I wouldn't need a command line option then.
stax76 is offline   Reply With Quote
Old 5th June 2020, 17:47   #105  |  Link
Pat357
Registered User
 
Join Date: Jun 2006
Posts: 452
Searching PATH would fail in case of a mixed VS 32bit/64bit setup.
The VS 64bit would fail if the 32bit d2vsource.dll comes before the 64bit d2vsource.dll in PATH, and the VS 32bit setup would fail if the 64bit DLL is the first found in PATH.
Pat357 is offline   Reply With Quote
Old 5th June 2020, 18:49   #106  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
Originally Posted by Pat357 View Post
Searching PATH would fail in case of a mixed VS 32bit/64bit setup.
The VS 64bit would fail if the 32bit d2vsource.dll comes before the 64bit d2vsource.dll in PATH, and the VS 32bit setup would fail if the 64bit DLL is the first found in PATH.
If I remember right then Windows continues searching PATH after a failure until it finds a DLL that succeeds to load.

Apps can put the needed paths per process on top.

Opinion: x86 is a waste of time anyway.
stax76 is offline   Reply With Quote
Old 7th June 2020, 16:57   #107  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Not sure if anybody has interest in this type of thing, to fix the prompt issue the file mpv.com or mpvnet.com can be renamed to d2vwitch.com and be placed next to d2vwitch.exe.

https://github.com/mpv-player/mpv/bl...sole-wrapper.c
stax76 is offline   Reply With Quote
Old 7th June 2020, 21:15   #108  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
There are CLI issues, d2v creation works using cmd.exe, powershell.exe and wt.exe manually by entering the command line in the console, the d2v file is OK and output is shown on screen but when executed from staxrip the progress output ends up in the d2v file, two times.

Code:
  0%
  0%
  1%
removed
 99%
 99%
  0%
  0%
  1%
  2%
removed
 98%
 99%
DGIndexProjectFile16
2
C:\Users\JD\Desktop\vts_01_1.vob
C:\Users\JD\Desktop\vts_01_2.vob

Stream_Type=1
MPEG_Type=2
iDCT_Algorithm=6
YUVRGB_Scale=1
Luminance_Filter=0,0
Clipping=0,0,0,0
Aspect_Ratio=16:9
Picture_Size=720x576
Field_Operation=0
Frame_Rate=25000 (25/1)
Location=0,0,0,0

d00 5 0 2062 0 0 0 f2 f2 d2 f2 f2 e2 f2 f2 e2 f2 f2 e2 f2 f2 e2
And staxrip don't receive any output.

I can work around this by wrapping it in cmd like so:

file: cmd.exe
args: /S /C "command line"

staxrip does cmd.exe wrapping all the time for command lines that do piping so it's a well-supported scenario. Wrapping D2V Witch with cmd.exe the d2v file is OK and I can use that for now but staxrip still don't receive any output which would be useful to show progress, without progress staxrip might appear unresponsive while indexing.

staxrip can:

read stdout and stderr
read stdout and stderr from cmd.exe
read stdout and stderr from GUI tools, DGIndex does it

So there must be issues in the D2V Witch console code.

Last edited by stax76; 7th June 2020 at 21:18.
stax76 is offline   Reply With Quote
Old 8th June 2020, 11:41   #109  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
It prints all messages to stderr. If you give it "-" as the file name then it prints the d2v file to stdout.
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 8th June 2020, 15:05   #110  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
I try to understand the issue and could need some help, here is what I tried in cmd:

Code:
C:\Users\JD\Desktop>d2vwitch --output test.d2v test.vob > out.txt

Video frames seen:   827 0%
    Progressive:     827
    Top field first: 827
    Repeat:          0


C:\Users\JD\Desktop>d2vwitch --output test.d2v test.vob 2> err.txt

Video frames seen:   827 0%
    Progressive:     827
    Top field first: 827
    Repeat:          0
So first I redirected stdout to out.txt file, I get a correct d2v file, some text printed on screen and an empty out.txt file.

Next I redirected stderr to err.txt file, I get a correct d2v file, again the same text on screen and again an empty file.

So redirection does not work at all and I'm not really understanding why, I hope somebody can give a clue what's going on, otherwise I might need some time to figure this out.
stax76 is offline   Reply With Quote
Old 8th June 2020, 15:43   #111  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Quote:
Originally Posted by stax76 View Post
I try to understand the issue and could need some help, here is what I tried in cmd:

Code:
C:\Users\JD\Desktop>d2vwitch --output test.d2v test.vob > out.txt

Video frames seen:   827 0%
    Progressive:     827
    Top field first: 827
    Repeat:          0


C:\Users\JD\Desktop>d2vwitch --output test.d2v test.vob 2> err.txt

Video frames seen:   827 0%
    Progressive:     827
    Top field first: 827
    Repeat:          0
So first I redirected stdout to out.txt file, I get a correct d2v file, some text printed on screen and an empty out.txt file.

Next I redirected stderr to err.txt file, I get a correct d2v file, again the same text on screen and again an empty file.

So redirection does not work at all and I'm not really understanding why, I hope somebody can give a clue what's going on, otherwise I might need some time to figure this out.
I assume it's because d2vwitch.exe is not a console application. It just uses a hack to print stuff to the console. Does the same happen if you use the renamed mpv.com?
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 8th June 2020, 16:15   #112  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
d2vwitch.com --output test.d2v test.vob 2> err.txt

Exactly the same undesirable result.

DGIndex is a GUI app and prints to the console and staxrip received the output without problems and both mpv and mpv.net are also GUI apps and print to the console all over the place and redirection works.

mpvnet.exe --aaa > out.txt

works, content of out.txt:

[mpv.net] error setting property: aaa = yes
[mpv.net] property not found

mpv.net writes error messages to stdout, it could be changed easily but I don't think it matters.

mpv.net (C#) just calls System.Console.WriteLine and mpv (C) something like printf, it's not a hack and works.


edit:

mpv.net calls AttachConsole(-1 /*ATTACH_PARENT_PROCESS*/) only when the env var _started_from_console exists, the com wrapper sets this env var, that means it's not even required to call AttachConsole since mpvnet.exe --aaa > out.txt works, maybe have a look in the DGIndex code if it can be found, it's GPL, search for console and print.


edit2:

I will further investigate it in case you don't have much time, the topic interests me.

Last edited by stax76; 8th June 2020 at 16:52.
stax76 is offline   Reply With Quote
Old 10th June 2020, 17:35   #113  |  Link
jackoneill
unsigned int
 
jackoneill's Avatar
 
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
Here is v4:

Code:
    * Fix crash when demuxing the video using the graphical interface.
    * Fix bad d2v output when calculating the audio delays. This bug
      probably affected anyone who used the graphical interface whether
      demuxing audio tracks or not, plus anyone who used the command line
      interface to demux audio tracks. The result was d2v files with the
      wrong number of frames and possibly visible decoding errors. This
      bug was introduced in v3.
    * If d2vsource.dll is not found in VapourSynth's autoload locations,
      try to load it from PATH and the location of d2vwitch.exe. This
      is for Windows only.
I couldn't compile it the usual way (for reasons I haven't figured out), so I switched to Qt and ffmpeg packages compiled by someone else. They are not compiled specifically for this program, so you're getting a lot of libraries that D2V Witch doesn't use, but it can't start without them. ¯\_(ツ)_/¯
__________________
Buy me a "coffee" and/or hire me to write code!
jackoneill is offline   Reply With Quote
Old 10th June 2020, 18:49   #114  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Thanks for the new version.

I confirm that PATH loading works and I've modified staxrip accordingly.
stax76 is offline   Reply With Quote
Old 11th June 2020, 19:37   #115  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Thanks, but ... Whoa, I'll stick with the old d2vwitch no need for x264, x264 and all the other encoding libraries, it now includes a whole FFmpeg with tons of dependencies.
(I only use it for the MPEG-1/2 d2v creation nothing else.)
Something really seems to be wrong with all those ffmpeg related dependencies.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 11th June 2020, 20:20   #116  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
I stay with the old too because of the size but Selur, it never appeared that you are concerned about the size, for instance you include DGIndex.exe two times and countless other files two times, overall 1,3 GB disc space and over 5000 files.
stax76 is offline   Reply With Quote
Old 12th June 2020, 07:45   #117  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Main size comes from the model based ai and cuda base suff in Hybrid, other than that I try to keep it small if possible.
Hybrid has to include tons of dependencies due to Hybrid able to be portable, DGIndex is once included for Vapoursynth and once for Avisynth.
I personally like tools minimalistic and I'm no fan of small tools that do a job well to expand into gui suites like StaxRip, Hybrid, MeGui,...
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 12th June 2020, 13:31   #118  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Quote:
Main size comes from the model based ai and cuda base suff in Hybrid
You mean waifu2x? I've not included it because it's too big and filters can be integrated via customization, it's not well documented so only power users might understand how to do the configuration.
stax76 is offline   Reply With Quote
Old 12th June 2020, 15:13   #119  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Yup, all the waifu2x variants, VapourSynth-BilateralGPU, weights for nnedi3, mainly models opencv and cuda dependencies are all rather large.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 12th June 2020, 15:52   #120  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
StaxRip is:

650 MB disc space
194 MB download
198 tools, half or so added by Revan

I guess the size is OK, there were few complaints in the past.

People that don't use staxrip can use the docs to see what tools it uses:

https://staxrip.readthedocs.io/generated/tools.html

It does not show the size though, not sure if it's interesting for many people, maybe I add it, the Apps dialog has a feature to show a grid with Excel or Out-GridView.
stax76 is offline   Reply With Quote
Reply


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 03:48.


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