The PlayStation 4 comes with a built-in DVR (digital video recorder) feature that allows you to record your gameplay footage and share it with your friends on social networks. This feature is only available within games (you won't be able to record the home screen) and can record up to 15 minutes of your gameplay.
How To Record Video on the PS4
Launch your game and when ready, double tap on the Share button of the DualShock4 controller to start the recording. The small video clip icon that appears at the top left corner of your screen indicates that the game is currently being recorded.
Tap the Share button once more to stop the recording, or double tap on the Share button to restart the recording.
Once you've hit the Share button, you will be taken back to the Share screen > How do you want to share your experience? > Upload Video Clip. Tap on X to upload the video to Facebook, YouTube, or Daily Motion, or tap on the Square button to save the video to your Gallery > Video Clips folder (next to your screenshots).
Before sharing your video, you should remove any unwanted sections. This operation can be performed directly from the Share screen.
Tap on the Options button > Share Settings > Video Clip Settings > Trim.