I converted a video to a base64string and decoded the base64string and used file_put_contents to convert it into a mp4 file. I did this so that I can get the video from my mobile app to my server. There is no problem with that I can convert and create the file and play the video in VLC however, the problem is when I put the path file of the converted video inside the VIDEO tag the video wont play and when I put a MP4 video downloaded from YouTube it is working. I don't know why the video wont play.
Base64String to MP4 Conversion:
$video_decode = base64_decode($Video);
$video_filename = 'C:/xampp/htdocs/TBSApp/uploads/'. $CAF . '_'.$CafDate.'_VID.mp4';
$video_dbfilename = './uploads/'. $CAF . '_'.$CafDate.'_VID.mp4';
$save_video = file_put_contents($video_filename, $video_decode);
HTML video:
<div class="act-image-container">
<video class="act-img" controls>
<source src="'.$row["Video"].'" type="video/mp4">
</video>
</div>
Path:
./uploads/VQ4475WWUK_2018-10-11_VID.mp4