Can't use video file - html

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

Related

Why HTML5 Video seek doesn't work if there is no direct file link?

I use this (HTML file):
<video width="480" height="320" controls="controls" autoplay="autoplay">
<source src="Video.mp4" type="video/mp4">
</video>
Video file located in the same folder with HTML page and seeking bar work perfecly.
But,
I try to do that (HTML file):
<video width="480" height="320" controls="controls" autoplay="autoplay">
<source src="http://localhost:32750/Resources/Video" type="video/mp4">
</video>
And in the controller (MVC):
public ActionResult Video() {
return File("Video.mp4", "video/mp4");
}
Video plays correct, but seeking bar doesn't work! I very surprised. Think tnat "video" component "think" that this is video stream, and don't work.
Any ideas?
In your second case the video is actually being streamed from the local server (assuming your localhost server supports streaming) - so it will behave in the same way as a regular video file being streamed.
There are ways to have a seek bar with thumbnails in a streamed video - you may need to have a separate thumbnail track to get the functionality you want, depending on your requirements.

Video streaming-Error

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

How do I make an HTML5 Video player embeddable

YouTube allows people to embed their videos. How do I make this feature for my videos? Looking for guidance or a tutorial because I don't have a clue.
Youtube gives an iframe with src pointing to a page that contains only a video.
<iframe width="560" height="315" src="//www.youtube.com/embed/1PtR6qtdi1s" frameborder="0" allowfullscreen></iframe>
Do you see that src is equal to? http://www.youtube.com/embed/1PtR6qtdi1s
Got it?
In HTML5 you can use the video tag.
<video width="320" height="240" controls>
<source src="src/to/video.mp4" type="video/mp4">
Your browser doesn't support HTML5 VIDEO!
</video>
Change values to desired width, height, src and video type (it supports mp4, webm and ogg).

How to play a YouTube video with HTML 5's <video>

I can I play a YouTube video in my site using HTML 5 <video> controls?
I am able to run the video for MP4, ogg format,
<video width="710" height="423" controls>
<source src="testvideo.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
but how to run teh video where the source is from youtube
ex:
<video width="710" height="423" controls>
<source src="https://www.youtube.com/v/<youtube video id>?enablejsapi=1&rel=0&fs=1" type="????"></source>
Your browser does not support the video tag.
</video>
I provided the valid source and given type as video/youtube, but got the error as No video with supported format and MIME type found
Please let me know if you anybody have any input
Thanks, Sharath
if your tag
<youtube video id>
produces the 11 character code such as for this video
https://www.youtube.com/watch?v=t2ByLmLnYJ8
the 11 character code would be t2ByLmLnYJ8
then I think you should try
<iframe width="710" height="423"
src="http://www.youtube.com/embed/<youtube video id>">
</iframe>
It is my understanding that YouTube has taken over ensuring that the video format is compatible with the device so you don't have to worry about it with this method.

Html5 video tag not working in chrome

On a W3school video tag tutorial, I checked on Chrome and it was working fine but I copied the code in my project and it didn't work. Here is the code:
<video width="500" height="400" controls autoplay>
<source src="C:\Users\Sunny\Desktop\My_Passion.mp4" type="video/mp4"/>
</video>
The video source URL has to point to your web server where this page is being hosted. It won't work for local file paths like the one you currently have in there (pointing to a video file on your local computer).
So make sure the My_Passion.mp4 file is on your web server and then change the source as follows:
<source src="My_Passion.mp4" type="video/mp4"/>
Chrome does not support .mp4 video codec. ReEncode video.
<video width="500" height="400" controls autoplay>
<source src="C:\Users\Sunny\Desktop\My_Passion.mp4" type="video/mp4"/>
<source src="C:\Users\Sunny\Desktop\My_Passion.ogv" type="video/ogg"/>
</video>
You can use online video converter