How do I screen record on the Jetson TX2

Hello, I am trying to screen record the desktop on the Jetson TX2. Is there any way to do this? I did a google search and installed some packages but it did not help with achieving this. Any assistance is appreciated.

Hi,
Please refer to this topic:
Zero-copy screen capture

Thanks for the response!

So I looked at thread you linked and the line of code that was used to start a pipeline for the recording worked. However, it only recorded for 4 seconds. I followed the solution of that thread but I could not make sense of the solution that was posted.

The line is used was

gst-launch-1.0 ximagesrc num-buffers=100 use-damage=0 ! video/x-raw ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=NV12’ ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=a.mp4

Any idea on how to get a longer recording?

Hi,
You can run

gst-launch-1.0 ximagesrc use-damage=0 ! video/x-raw ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12' ! nvv4l2h264enc ! h264parse ! matroskamux ! filesink location=a.mkv

And execute Ctrl + C to end the recording.

Thank you again for your response.

I tried running that line in the terminal but its throwing me an error.

nvidia@nvidia-desktop:~$ gst-launch-1.0 ximagesrc use-damage=0 ! video/x-raw ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=NV12’ ! nvv4l2h264enc ! h264parse ! matroskamux ! filesink location=a.mkv
bash: syntax error near unexpected token (' nvidia@nvidia-desktop:~$ gst-launch-1.0 ximagesrc use-damage=0 ! video/x-raw ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=NV12’ ! nvv4l2h264enc ! h264parse ! matroskamux ! filesink location=a.mkv bash: syntax error near unexpected token (’
nvidia@nvidia-desktop:~$ gst-launch-1.0 ximagesrc use-damage=0 ! video/x-raw ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=NV12’ ! nvv4l2h264enc ! h264parse ! matroskamux ! filesink location=a.mkv
bash: syntax error near unexpected token `(’
nvidia@nvidia-desktop:~$

Appreciate your help with this

Edit: I got it to work

Hi,
Please correct
‘video/x-raw(memory:NVMM),format=NV12’
to
'video/x-raw(memory:NVMM),format=NV12'

Copying the command directly somwhow changes '' to ‘’ and triggers the issue.