Problems with OpenCV

It might be built without WITH_GSTREAMER=ON.

Anyway, you can

  1. backup what you did on your Jetson Nano, then make fresh sd image.
  2. uninstall whole OpenCV and install 4.5.1 again as the link AastaNV/JEP.

I solved the problem.
This is what I did:

I first installed the Swapfile made by JetsonHacksNano.
After that, I ran the shell script made by AastaNV to install correctly OpenCV with gstreamer support ON.

That solved all of my problems.
Thanks to everyone for your replies!