I have read similar questions as this, but not with a solution to my problem. For example this one does not have a solution and this one I am already doing it. So
I have a simple html page and a video, in the same folder and the code is
<!DOCTYPE html>
<html>
<head>
<title>HTML Video embed</title>
</head>
<body>
<p>Learn Eclipse</p>
<br />
<iframe width="560" height="315" src="./pelicula.mp4" frameborder-"0" allowfullscreen></iframe>
<video controls muted > <source src="./pelicula.mp4" type="video/mp4"></video>
<video controls> <source src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ForBiggerEscapes.mp4" type="video/mp4"></video>
</body>
</html>
As a result I have (this screen is in Windows 10)
As you can see, the video is not shown.
Btw, in windows when I double click the video I can watch it.
In linux this video has problems to play and I see an error message but in windows I see no error message, only the screen above
How can this be solved?
The problem was solved by processing the video
ffmpeg -i pelicula.mp4 -vcodec h264 pelicula_264.mp4
Related
I am trying to play a video on HTML using video tag. However, it is not playing at all. I'm thinking maybe it is the path problem.
https://imgur.com/sGyzvbx "screenshot of the file path"
I tried to use multiple video formats like WebM, mp4, and avi to test it out. However, the result is the same.
<video width="420" height="345" src="../test.mp4">
</video>
Try like this. video inside source tag. In your code you are miss controls. Html video can not play automatically. so we need control
<!DOCTYPE html>
<html>
<body>
<video width="400" controls>
<source src="https://www.w3schools.com/html/mov_bbb.mp4" type="video/mp4">
</video>
<video width="400" controls src="../video.mp4"></video>
</body>
</html>
I am a beginner in web development. I have a video file in my web page.
I want to play that video in a new tab.
I gave the target="_blank" attribute into my video tag but it's still not working.
Is there is any other way to play videos in a new tab?
Please help me!
Thank you!!
Do you try this way?
<!DOCTYPE html>
<html>
<body>
<h2>Click the Link to Play the Object</h2>
Play a video file
</body>
</html>
Or you can create a blank page with following code:
<!DOCTYPE html>
<html>
<body>
<video width="90%" height="90%" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
</body>
</html>
And then link to that page:
See the video
Can somebody please explain why there is a significant delay when using the html5 video tag to autoplay identical videos (~1 min/5MB files) that are stored on Amazon S3?
Here's the code that demonstrates the delay (you'll need to wait about 20 seconds for the second video to start):
<!DOCTYPE html>
<html>
<body>
<video autoplay="true" controls="true" src="https://s3-us-west-2.amazonaws.com/testbucket666/long_video_1.MOV"></video>
<video autoplay="true" controls="true" src="https://s3-us-west-2.amazonaws.com/testbucket666/long_video_1.MOV"></video>
</body>
</html>
With the code above, hitting the pause button on the first video will cause the second video to start playing immediately.
On the other hand, if the video files are different (but also 1 min/about 5MB files), both load videos start playing immediately:
<!DOCTYPE html>
<html>
<body>
<video autoplay="true" controls="true" src="https://s3-us-west-2.amazonaws.com/testbucket666/long_video_1.MOV"></video>
<video autoplay="true" controls="true" src="https://s3-us-west-2.amazonaws.com/testbucket666/long_video_2.MOV"></video>
</body>
</html>
Just as another data point, if I load two smaller, identical video (~15 seconds, 1.5MB files), both also start playing immediately:
<!DOCTYPE html>
<html>
<body>
<video autoplay="true" controls="true" src="https://s3-us-west-2.amazonaws.com/testbucket666/short_video_1.MOV"></video>
<video autoplay="true" controls="true" src="https://s3-us-west-2.amazonaws.com/testbucket666/short_video_1.MOV"></video>
</body>
</html>
Can somebody please explain the cause for delay when two identical long videos are loaded at once and how I can get them to start immediately? (maybe play each video for a second before pausing it to cause subsequent videos to load???)
As you are already using S3, do use cloudfront RTMP distributoion with that. You can find more details here
I am trying to get a video to play locally but it isn't working. the file is 'wildlife.mp4,' however, it doesn't play it is just a blank video box? Any help will be much appreciated, thanks.
<!DOCTYPE html>
<html>
<head>
<title>video</title>
</head>
<body>
<video width="320" height="240" controls>
<source src="wildlife.mp4" type="video/mp4">
<source src="wildlife.ogg" type="video/ogg">
Your browser does not support the video tag.
</body>
</html>
Video tag is not closed.
Add autoplay if you want the video to play automatically.
<!DOCTYPE html>
<html>
<head>
<title>video</title>
</head>
<body>
<video width="320" autoplay="autoplay" height="240" controls>
<source src="wildlife.mp4" type="video/mp4">
<source src="wildlife.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
</body>
</html>
If you are running the script on Windows the browser can check the file type associated with the video ( wildlife.mp4 ). On my system ( W7) I clicked the -Properties- on the video file and CHANGed the -Type of file- from VLC (which is the default on my system) to Windows Media player and all was sorted.
Hope this helps.
Apparently I'm a total noob when it comes to web development. I just need help making a simple html file that embeds a video. I can't use youtube. I just need to embed the local file and it's not working.
<!DOCTYPE html>
<head>
<title>Testing</title>
</head>
<body>
<video id="0" controls width="502" height="479">
<source src="OWA tutorial.webm" type='video/webm'>
<source src="OWA tutorial.mp4" type='video/mp4'>
<p>Video is not visible, most likely your browser does not support HTML5 video</p>
</video>
</body>
</html>
This doesn't work. "OWA tutorial.mp4" is in the same folder as the html file. What am I doing wrong?
Tried this:
<!DOCTYPE html>
<head>
<title>Testing</title>
</head>
<body>
<video id="0" width="502" height="479" controls>
<source src="loop.ogv" type="video/ogg">
<p>Video is not visible, most likely your browser does not support HTML5 video</p>
</video>
</body>
</html>
Worked well. Just replace the ogg with mp4, in your case.
Edit:
I'm not saying that you should use .ogv instead of .mp4.
I just used it as example because I've tried with a .ogv file (just because I don't have a .mp4 file here right now).
Your code should work if you copy mine and just replace the "loop.ogv" with your filename and the "video/ogg" with "video/mp4".
Sorry if it was misleading.