I tried to play mp4 format video stored on my server using HTml's , but the video shows Internet server error 500 in the video playback part. The html code is below. This is how the video plays well as a result of running the html file rather than a local host within the Raspberry Pi. However, if you run it as localhost or run it as an internal IP, the video displays Internet Server Error 500. In the error log
(8)Exec format error: AH01241: exec of 'path/1(1).mp4' failed [Tue Jan 08 17:22:14.754942 2019] [cgid:error] [pid 472:tid 1862267952] [client ::1:41334] End of script output before headers: 1 (1).mp4
That's what it says. Can't I play the video using HTml5 as a local host or internal IP? All privileges are set to 775.
<html>
<head>
<meta name="viewport" content="width=device-width">
</head>
<body>
<video controls="" autoplay="" name="media">
<source src="../cgi-bin/myweb/mp4/1%20(1).mp4" type="video/mp4">
</video>
</body>
</html>
www
cgi-bin
myweb
file
mp4
1%20(1).mp4
html
video.html
There is a problem with the structure of the web root you are writing.
www/
cgi-bin/
myweb/
file/
mp4/
1%20(1).mp4
html/
video.html
The page that appears when you type http://localhost/video.html
is /wwww/html/video.html
The web root is then /www/html
. Video or image, whatever, must be under this directory to serve as an HTTP request from http://localhost/something
.
Background.jpg
is probably the answer... I don't know. Maybe it's because Kathy... I think it's because the apache that's spinning right now is spinning as root, so I can see all the directories owned by root..
Anyway, you can't do this.
www/
html/
myweb/
Blah blah blah...
video.html
Please do it like this. If it's because of security, that's a different story.
If you host an html file through a web server, the web server does not know the local path.
If you upload the video to the static path of the web server and specify the path from the root of the web server, it will play normally.
Assuming that there is a video file in the directory static/movie under the root arbitrarily, you can specify it as follows.
ex: <source src="/static/movie/1%20(1).mp4" type="video/mp4">
© 2024 OneMinuteCode. All rights reserved.