ok try to restore the default settings from safe mode.
Turn off the ps4, when you turn it on dont let go of the power button, instead keep your finger there until you hear 2 beeps, you have booted into safe mode, you want to select 4th option, restore default settings (this will not delete save data) then simply restore, it should bring your consoles settings back to default (picture and sound) and there hdmi cable should work from there without any issues.
this video explains how you boost into safe mode to access the option, (2nd method in the videeo)