How to pause video using detectnet in jetson nano?

I want to develop pause and stop for video instant in detectnet ?
I am using jetson nano!

Hi @balagopal620, you can put in a sleep() call in the main loop of the program to pause the processing and output. When you resume, the video input will probably skip ahead as their isn’t pausing/seeking functionality built into the videoSource interface in jetson-inference/jetson-utils.

I want to pause the video at a press of a key,is there any way to do that.Thank you,for the solution

You would need to cast the videoOutput object pointer to glDisplay* pointer and use the glDisplay::GetKey() function to check the key state, or use a glDisplay event callback to monitor key presses.

Before casting the videoOutput object, it’s recommended to use the videoOutput::IsType() function to assure that it is in fact a glDisplay object first.

sorry for not being clear, i am using file to automate a process can you kindly suggest a python option for the above problem.

I don’t have those functions exposed through Python, sorry about that. Instead you could try using a Python library like pynput to get the keyboard input.

Thank you, i will try that is there any chance to expose the keyboard in python in the future ?

I don’t currently have plans to do so, as the glDisplay interface has already been deprecated in lieu of the videoOutput interface, which is not focused on GUI.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.