Video streaming-Error - html

My code for a simple video streaming web page is given below. On Firefox the error that it gives is:
No video with supported format and MIME type found
The code is:
<video width="320" height="240" controls>
<source src="http://www.youtube.com/watch?v=zY1vLEk8B9c" type="video/mp4" />
</video>
On trying it with chrome the play button does not turn up.
I am new to web development and do not know where I am going wrong. What should I do to get the video running?

you don't need to make a special code
YouTube give you on every video, a link named share.
under that link you will find another link named embed
for example: in your question under the link embed
you will find the following code to use it in your page:
<iframe width="640" height="360" src="//www.youtube.com/embed/zY1vLEk8B9c" frameborder="0" allowfullscreen></iframe>
my best wishes

Related

HTML-Page does not play video

I am creating a HTML-Page for my local PC for fun and want to implement a video player.
I searched for how to do it and found something which I applied to my page:
<video width="400" controls>
<source src="Videos/test.mp4" type="video/mp4"><source>
</video>
I even tried to embed the source attribute:
<video width="400" src="Videos/test.mp4" controls></video>
Both end up creating a video frame with play button but nothing is played. Even when I click on the play button nothing reacts to my click.
Does anyone unterstand why?
I think it's because you are using <source> tag twice. And you can't use an empty <source>. It should be like :
<video width="400" controls>
<source src="Videos/test.mp4" type="video/mp4">
</video>
reference : https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
You should check the DevTools (F12) network tab for any errors while fetching the video file. Probably your answer will be there.
Most likely, this has something to do with the file path you've entered in the [src] attribute.
From https://www.w3schools.com/tags/att_video_src.asp:
Possible values:
An absolute URL - points to another web site (like
src="http://www.example.com/movie.ogg")
A relative URL - points to a
file within a web site (like src="movie.ogg")
Try this way it may be work if your src path not correct
Videos/test.mp4 => /Videos/test.mp4
<video width="400" controls>
<source src="/Videos/test.mp4" type="video/mp4"><source>
</video>

How to get the actual video link of a vimeo video to put inside of a <video> tag?

Here is the link in the Vimeo iframe:
<iframe
title="vimeo-player"
src="https://player.vimeo.com/video/348628277"
width="640"
height="360"
frameborder="0"
></iframe>
The above works.
But the below does not work:
<video src="https://player.vimeo.com/video/348628277" autoPlay="true" loop />
It does not work because the link is to the webpage, not the video. How do I get the URL to the video then?
You can use some of the third-party websites to get the mp4 links of different video qualities, like :
https://en.savefrom.net/11-how-to-download-vimeo-video
https://www.savethevideo.com/vimeo-downloader

Can't use video file

I'm trying to import a video onto my site. I don't want any controls, I just want it to play. I'm using the tag, but when I downloaded the video from YouTube and tried to use it, it said that "Brackets only currently supports UTF-8 encoded files". (Brackets is my code editor) I opened the file in Notepad++ and converted it to UTF-8 to no avail. I downloaded an extension to convert it to UTF-8, also not working. Here's the video: https://www.youtube.com/watch?v=LMd580H8rGY
Please help!
You have to upload the video on your server then add to your page something like:
<video width="320" height="240" autoplay>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
More info : https://www.w3schools.com/html/html5_video.asp
READ THE DOC !
YouTube give option named by Embed in side share button
<iframe width="560" height="315" src="https://www.youtube.com/embed/LMd580H8rGY?ecver=1" frameborder="0" allowfullscreen></iframe>
this is HTML Code
change the height & width from iframe

How to play video of dropbox directly in our application

I want to play 4 to 5 video from my dropbox account in to my website.
This is my code:
<video controls="controls" height="480" width="640">
<source src="https://www.dropbox.com/s/393c52vimvnvr7n/devinejamz-partnership.mp4?dl=1" type="video/mp4">
</video>
2 Videos are successfully playing with this code but 3 videos show below error.
My Video stops playing after sometimes.I dont know why and shows error as below:
No Video with supported format and mime type found.
Can anybody tell me whats the problem??
Copy the drop box video link, then replace www.dropbox.com with dl.dropboxusercontent.com
Thus the URL: https://www.dropbox.com/s/dgbdbgdgb/file.mp4?dl=0
will become: https://dl.dropboxusercontent.com/s/dgbdbgdgb/file.mp4?dl=0
Then embed the updated URL to your video player tag.
Source: Visit: link

How to load video in my website

I have a website where I am trying to show a video.I have 2 mp4 format videos and both are ok(not corrupted).When I try to show these two using tag in html5 one is working but another is not working.
I have used the code given below
<video width="320" height="240" controls>
<source src="video/v1.mp4" type="video/mp4">
<source src="video/v1.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
<video width="320" height="240" controls>
<source src="video/theme.mp4" type="video/mp4">
<source src="video/theme.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
here,in firefox first one is working great but the next one shows the error "No video with supported format and mime type found".In chrome first one is ok and second one only shows audio.
Please help me to solve this.
Thanks in advance.
Check to see if video/theme.mp4 is accessible in the browser. View source and try clicking the link or see if it is loaded in the resources in the development tools. It sounds like Firefox can't find/read theme.mp4 or theme.ogg so is displaying the error message. Chrome can't find theme.mp4 either but is reading it's MIME Type it as audio/ogg rather than video/ogg.
You could try this page and see if it helps, the MDN always has useful stuff:
https://developer.mozilla.org/en-US/docs/Web/HTML/Supported_media_formats