Cant access nextcloudpi after installing ffmpeg


I have no knowledge of Linux hence I tried to set up my nextcloudpi following commands found online.

My nextcloud is installed on a 32GB SD Card and once it was up an running I changed the data from SD to USB as I have an external 2TB SSD connected to my raspberrypi.
It was very slow on loading pics hence I followed steps from and after almost a day and half I had previews generated for my 140GB Pics. All was working but videos hence I tried to follow another post where someone suggested installing ffmpeg. I followed all their steps and altered all the PHP config files they asked for and now I have no access on my nextcloudpi. I dont want to start over again as it takes ages to setup it up. can I please get some help so I could atleast go back to the stage where pics were working fine with preview? I will live with it… I tried my best to look around but not able to fix it. below is what I get when I try to access it.

nd the editor (if suspension is enabled) Internal Server Error The server encountered an internal error and was unable to complete your request. Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report. More details can be found in the server log.