I don't understand why the factory reset isn't removing the screen lock, as it definitely should.
Flashing a new firmware will not delete the photos or videos as they are stored on the internal SD. The flashing process only affects the ROM which is separate from the SD storage.
If your not comfortable with flashing a firmware yourself you could take the phone to a Samsung service centre and ask them to do it for you.
If you don't mind doing it yourself I can guide you through the steps necessary and the whole process shouldn't take any longer than 10 minutes. I will need to know what country/region you are in and whether your phone is network locked or an unbranded model.
All the best.