I am trying to trim/clip a DEM with a shapefile layer. I read somewhere that the GDAL should be able to get the job done, but can't seem to get it to work.
I have a raster layer and a shapefile layer, then using the "clip raster by extent" where the extent is generated from the shapefile layer.
The red square is the cutting line, and the black and white background is the DEM maps which I want to cut/trim
This is the input into the dialogue
The elevation data needs to be kept as the map will later be used to create a 3D model of the area.

