HTML video audio working but video is blank

Viewed 83

Im trying to view a video with html but it doesnt work. The audio plays but the video stays blank. The video is an mp4 https://videos.laxnode.net/uploads/5qco8ocZli/4-Legged-Spoungebob-1.mp4. it works if you download it and view it though (dont question it, friend made it). I uploaded it to youtube and downloaded it again and it worked then to maybe its something with codec? if it is how could I fix it?

html

<video width="960" height="620" controls>
        <source src=<?=$videofile?> type="video/mp4">
        Your browser does not support the video tag.
</video>
3 Answers

You miss quote after src=

Its should be:

<video width="960" height="620" controls>
        <source src="<?=$videofile?>" type="video/mp4">
        Your browser does not support the video tag.
</video>

Change your tag with w3schools video:

<video width="960" height="620" controls>
            <source src="https://www.w3schools.com/html/movie.mp4" type="video/mp4">
            Your browser does not support the video tag.
</video>

Your video is also corrupt. Solution is: Convert with some mp4 converter.

Yes, i saw your red spongebob with 4 leg in paint :D

It seems your video file is corrupt, have you tried a converter?

Related