How to EXIT GStreamer?

I’m trying to capture a sample image from my IMX274, using:

gst-launch-1.0 -e nvcamerasrc ! "video/x-raw(memory:NVMM), width=1920, height=1080, format=I420" ! nvjpegenc ! multifilesink location=snapshot.jpg

Can someone tell me how to exit gst-launch-1.0? Is my only option Ctrl-C? or is there some other, interactive commands? Right now, the app launches, prints some diagnostic information, then sits there, seemingly waiting for something, before I exit by pressing Ctrl-C.

Hi roach374, gst-launch subscribes to SIGINT signal that Ctrl+C sends, so it shutdowns gracefully when you do that - Ctrl+C is how to exit gst-launch.

If you want to see more console output from gst-launch, try launching it with the --verbose flag.

Thanks! I mostly just want to be sure I’m not missing out on some sort of interactive command palette. Starting up gst-launch, it basically runs the above pipeline, then sits there until SIGINT. I just wasn’t expecting it.

gst-launch doesn’t have an interactive mode, it simply runs the pipeline that you pass it in the command line arguments.

Apparently there is a gst-play application with keyboard interactivity, however I am unfamiliar with it.

You may also try option num-buffers with nvcamerasrc plugin. It specifies how many frames are to be acquired before it stops.

gst-inspect-1.0 nvcamerasrc

Usually the first 30 frames are dark before auto-everything gets up, so you may try to get enough frames and check last ones.

Interesting. What do you mean by “gets up”? Is this every time you start up GStreamer, or just during the power-up cycle of the physical camera?

I have no TX2 for testing and give accurate info, but I think each time you run nvcamerasrc gstreamer plugin, it activates nvcamera-deamon that configures the camera (not sure, but may involve exposure, gains, white balance, more…) and ISP.
From what I remember it was taking about 1s at 30 fps, but I cannot say much more for now.

I just ran into the problem with a fresh SD card image with the camera driver on it from the camera manufacturer. I eventually had to unplug the Jetson Nano. Later, I had VNC installed, and I ran the command. The video was full screen in the monitor connected to the jetson nano, but it was invisible through VNC. I was able to click on the terminal window and drag it around though VNC, while all I could see on the monitor connected to the jetson nano was the full screen video. Ctrl-C worked when the terminal window was listening for keyboard input. The first time, I must have clicked on something else, so the terminal window was no-longer listening to keyboard input, and ctrl-c wouldn’t work work then.