DGIndex CLI never returns to prompt
- SomeHumanPerson
- Posts: 96
- Joined: Fri Mar 24, 2023 10:41 am
DGIndex CLI never returns to prompt
I've been trying to script some tools to automate collecting screenshots from any given source with frame accuracy and I was told that D2VSource is the best plugin for loading MPEG-2 video in an AviSynth script, which means that I have to index first with DGIndex.
First off, if any of that is incorrect or not the best approach, please let me know.
Now for the problem: When I try to run DGIndex on the command line (for scripting purposes), it completes the indexing correctly (the D2V file is written and is functional) but it will not return to the prompt. Everything just stops with "97" as the last displayed progress value, and the DGIndex process disappears from the Task Manager... but the command window is stuck at a blinking cursor and I have to Ctrl-C to get back to the prompt.
I'm doing this on Windows 10 x64 LTSC 19044.2486. I was initially using the "-hide" and "-exit" switches but the problem persists even when I use no switches at all aside from the "-i" input and "-o" output paths.
Any ideas about what might be happening here? Is there anything that I should try in terms of additional troubleshooting?
First off, if any of that is incorrect or not the best approach, please let me know.
Now for the problem: When I try to run DGIndex on the command line (for scripting purposes), it completes the indexing correctly (the D2V file is written and is functional) but it will not return to the prompt. Everything just stops with "97" as the last displayed progress value, and the DGIndex process disappears from the Task Manager... but the command window is stuck at a blinking cursor and I have to Ctrl-C to get back to the prompt.
I'm doing this on Windows 10 x64 LTSC 19044.2486. I was initially using the "-hide" and "-exit" switches but the problem persists even when I use no switches at all aside from the "-i" input and "-o" output paths.
Any ideas about what might be happening here? Is there anything that I should try in terms of additional troubleshooting?
DGIndex CLI never returns to prompt
Instead of ctl-c, just hit enter and you will see that you are already back at the prompt level. The index should have been created. It acts this way because under the hood it is still a Windows GUI app even when invoked as CLI. Nobody ever updated things to show the final 100% for DGIndex as for DGIndexNV. Maybe Sherman could fix that up.
https://www.rationalqm.us/board/viewtop ... ter#p14364
MPEG2Source() is the official way for DGMPGDec, while DGSource() is the official way for DGDecNV. D2VSource() belongs to someone else and it's not supported.
Did you know you can use DGIndexNV for MPEG2? Or do you not have an nVidia card?
https://www.rationalqm.us/board/viewtop ... ter#p14364
MPEG2Source() is the official way for DGMPGDec, while DGSource() is the official way for DGDecNV. D2VSource() belongs to someone else and it's not supported.
Did you know you can use DGIndexNV for MPEG2? Or do you not have an nVidia card?
- SomeHumanPerson
- Posts: 96
- Joined: Fri Mar 24, 2023 10:41 am
DGIndex CLI never returns to prompt
Ah, OK, thanks! Yes, the index gets created and is usable, no issue there.
Most of my work gets done on a Ryzen 5700G system using the integrated graphics. I don't really have a use for a discrete GPU these days because I don't do any gaming or mining or machine learning, and the CPU is plenty powerful enough for software decoding of any video I expect to encounter in the foreseeable future.
That said, I have another Windows 10 LTSC system with a passive GT 1030 and when I tried running DGIndexNV on it about 2 months ago, it somehow managed to crash Windows (badly). I'm assuming there's either a driver problem of some kind, or the card is simply not compatible, but I couldn't muster the ambition to track it down as opposed to just using vanilla DGIndex.
On the matter of source filters, I'm not hung up on anything specific, but it was suggested to me that D2VSource might be more reliably frame-accurate than MPEG2Source. I've never tested that (with FrameSeeker or SeekTester or similar) but I didn't have any reason to distrust the person recommending it. I use FFVideoSource for the AVC/HEVC family and LWLibavVideoSource for VC-1 based on the same recommendation for reliable frame accuracy.
Anyway, I'll see how this behaves when I run it via Python script. I reached out here as soon as I saw the behavior running it manually, before bothering to test it in a script.
Most of my work gets done on a Ryzen 5700G system using the integrated graphics. I don't really have a use for a discrete GPU these days because I don't do any gaming or mining or machine learning, and the CPU is plenty powerful enough for software decoding of any video I expect to encounter in the foreseeable future.
That said, I have another Windows 10 LTSC system with a passive GT 1030 and when I tried running DGIndexNV on it about 2 months ago, it somehow managed to crash Windows (badly). I'm assuming there's either a driver problem of some kind, or the card is simply not compatible, but I couldn't muster the ambition to track it down as opposed to just using vanilla DGIndex.
On the matter of source filters, I'm not hung up on anything specific, but it was suggested to me that D2VSource might be more reliably frame-accurate than MPEG2Source. I've never tested that (with FrameSeeker or SeekTester or similar) but I didn't have any reason to distrust the person recommending it. I use FFVideoSource for the AVC/HEVC family and LWLibavVideoSource for VC-1 based on the same recommendation for reliable frame accuracy.
Anyway, I'll see how this behaves when I run it via Python script. I reached out here as soon as I saw the behavior running it manually, before bothering to test it in a script.
- SomeHumanPerson
- Posts: 96
- Joined: Fri Mar 24, 2023 10:41 am
DGIndex CLI never returns to prompt
This is going off topic even more, but I just spent some time reading the D2VSource GitHub and now I have doubts.
Can you weigh in on the frame-accuracy of MPEG2Source? Can I trust it? I literally don't care about any other factor because I'm not using it for re-encoding purposes. I just need to be able to trust that I will get the correct frame, on demand, every time.
Can you weigh in on the frame-accuracy of MPEG2Source? Can I trust it? I literally don't care about any other factor because I'm not using it for re-encoding purposes. I just need to be able to trust that I will get the correct frame, on demand, every time.
DGIndex CLI never returns to prompt
GT 1030 should be fine. You may need to use correct drivers. If at some point you want to try again we are here for you.
DG tools became popular because of their frame accuracy. The claim to fame. MPEG2Source() is more reliable than the alternatives you mentioned, especially for transport streams. Ignore DG hate and do your own testing. Issues found with DG stuff are always addressed immediately. Can't always say that for open source stuff, which so often becomes a mess and abandoned.
DG tools became popular because of their frame accuracy. The claim to fame. MPEG2Source() is more reliable than the alternatives you mentioned, especially for transport streams. Ignore DG hate and do your own testing. Issues found with DG stuff are always addressed immediately. Can't always say that for open source stuff, which so often becomes a mess and abandoned.
- SomeHumanPerson
- Posts: 96
- Joined: Fri Mar 24, 2023 10:41 am
DGIndex CLI never returns to prompt
Thanks. I think I'll switch source filters, then.
No DG hate here (or anywhere in my general vicinity)!
No DG hate here (or anywhere in my general vicinity)!
- SomeHumanPerson
- Posts: 96
- Joined: Fri Mar 24, 2023 10:41 am
DGIndex CLI never returns to prompt
Just a quick note, the DGMPGDec main page still says v2.0.0.7 is the latest release (and links to that file) but the binaries notification thread has v2.0.0.8 posted as of Dec. 28, 2022.
And this got me wondering if that old recommendation I was operating on was actually mixed up (in application rather than intent) right from the start:
And this got me wondering if that old recommendation I was operating on was actually mixed up (in application rather than intent) right from the start:
Maybe I was supposed to be using DGDecode all along!Rocky @ v2.0.0.7 wrote:The alias D2VSource() was removed so as not to collide with other 3rd-party software.
DGIndex CLI never returns to prompt
Fixed. Thank you for pointing it out.SomeHumanPerson wrote: ↑Mon Apr 24, 2023 8:05 pmJust a quick note, the DGMPGDec main page still says v2.0.0.7 is the latest release (and links to that file) but the binaries notification thread has v2.0.0.8 posted as of Dec. 28, 2022.
That would be MPEG2Source() for DGMPGDec.Maybe I was supposed to be using DGDecode all along!
- SomeHumanPerson
- Posts: 96
- Joined: Fri Mar 24, 2023 10:41 am
DGIndex CLI never returns to prompt
"A rose by any other name would smell as sweet."
- SomeHumanPerson
- Posts: 96
- Joined: Fri Mar 24, 2023 10:41 am
DGIndex CLI never returns to prompt
A quick update: this works fine when run via Python script. The failure to return to the prompt without a keypress when using it manually does not appear to hinder or hold up the script from proceeding. So... all is well!
DGIndex CLI never returns to prompt
Good to hear. Thank you.