parkchamchi / DepthViewer

Unity program that creates 3D scenes for VR using MiDaS model
MIT License
63 stars 5 forks source link

Can't pause/rewind/ff new depth-anything beta build videos #24

Open 311-code opened 7 months ago

311-code commented 7 months ago

The new Unity beta build with depth-anything works great for me, the only issue I have is the numpad 5, 6, 4 no longer fast forward rewind or pause when using the depth-anything model when playing a video. Any way to fix this?

parkchamchi commented 7 months ago

Weird, in my environment it works with vitb14 loaded. You aren't using ffpymq.py, right?

See if the key is being pressed using Debug.Log(): here

311-code commented 7 months ago

Oh I am using mostly the large model with 4090 here, does it work on large model for you? I am once again out of town so I've been less active.

parkchamchi commented 7 months ago

Works for me. The model selected should not influence that behavior.

311-code commented 6 months ago

Still doesn't work for me and did a fresh download, what keys should I be pressing? I did numberpad 5 for pause, etc. It works on older version when I test it with default mode and midas hmm.

Do you have maybe a video of exactly how you are launching, loading the depth-anything model, then showing you can pause the video? Not sure if I am doing something wrong here.

parkchamchi commented 6 months ago

Well, it should be not different from loading a midas onnx file. Does the console output any error?

Test if the key is pressed by changing here:


//CHECK `Keymapper.Inst` is not null
if (Keymapper.Inst == null)
    Debug.LogError("Keymapper.Inst is null");
else
    Debug.Log($"Pause: {Keymapper.Inst.VideoPause}");

if (Input.GetKeyDown(Keymapper.Inst.VideoRewind))
    Skip(-5f);
else if (Input.GetKeyDown(Keymapper.Inst.VideoPause)) {
    //CHECK IF THE KEY IS BEING PRESSED
    Debug.Log("Pause button pressed");

    PausePlay();
}
else if (Input.GetKeyDown(Keymapper.Inst.VideoForward))
    Skip(+5f);
311-code commented 5 months ago

Sorry for delay, I will get back to this soon. I didn't see a console error. I will try what you wrote above soon.