What are some methods to obscure the ability to download a video, even if it cannot be completely prevented?

To obscure the ability to download a video, you can use methods such as disabling right-click options, adding watermarks, using streaming services with limited download capabilities, encrypting the video file, or using a secure video player that restricts downloading options.

<?php
// Disable right-click option
echo '<script type="text/javascript">
    document.addEventListener("contextmenu", function(e){
        e.preventDefault();
    }, false);
</script>';

// Add watermark to the video
echo '<div style="position: relative;">
    <video controls>
        <source src="video.mp4" type="video/mp4">
    </video>
    <div style="position: absolute; top: 10px; right: 10px; background: rgba(255, 255, 255, 0.5); padding: 5px;">Watermark</div>
</div>';

// Encrypt the video file
$videoFile = 'video.mp4';
$encryptedVideo = 'encryptedVideo.mp4';
exec("openssl enc -aes-256-cbc -in $videoFile -out $encryptedVideo -k secret");

// Use a secure video player
echo '<video controls controlsList="nodownload">
    <source src="video.mp4" type="video/mp4">
</video>';
?>