Hi!
Sorry for my bad english.
I have one video. I want to make page that will display this video (like youtube), but I don't know how. In youtube there is a original page with video (I think, made with 'header(Content:application/x-shockwave-flash objekt)'). I want to make that too. But I don't know what I must write.
example:
original page:
http://www.youtube.com/v/PIb6AZdTr-A
another page (real page):
http://www.youtube.com/watch?v=PIb6AZdTr-A
How they made that?

Dani AI

Generated

Brief, modern answer and checklist for hosting your own videos (rather than embedding YouTube):

HTML5 is the right approach now — avoid SWF/Flash. Use the native <video> element (browser UI, captions, poster images), and offer more than one encoded file so browsers pick a supported format. (developer.mozilla.org)

Prepare the files: transcode the master into at least an MP4 (H.264 video + AAC audio) and, if desired, a WebM fallback. Also add a small poster image and a caption/ subtitle file (<track>). Example embed (simple progressive download):

<video controls width="640" height="360" poster="poster.jpg" preload="metadata">
  <source src="video.mp4" type="video/mp4">
  <source src="video.webm" type="video/webm">
  Your browser does not support HTML5 video.
</video>

A common FFmpeg command to make a web-friendly MP4 (moves metadata for quicker playback start) is:

ffmpeg -i input.mov -c:v libx264 -crf 23 -preset medium -pix_fmt yuv420p \
  -c:a aac -b:a 128k -movflags +faststart output.mp4

Transcoding tips and options are in the FFmpeg docs. (mirror.hjertaas.com)

If a nicer UI or features (playlists, analytics, HLS/DASH support) are needed, use a modern HTML5 player framework (Video.js, Plyr, etc.). These wrap the <video> element, add skins and plugins, and handle many compatibility edge cases. Note that Flash-based approaches suggested earlier in the thread were common ten years ago but Flash was officially retired; prefer HTML5 players. (videojs.org)

Server and delivery notes: hosting video is bandwidth‑intensive (as warned). Ensure the server sets correct MIME types and supports byte-range requests (Accept-Ranges/Range) so seeking and progressive playback work. For public traffic, use a CDN or a managed video service (Cloudflare Stream, S3+CloudFront, Vimeo, etc.) to avoid quota and performance problems. (developer.mozilla.org)

Context for this thread: ’s SWF suggestion is historically accurate but now obsolete; ’s bandwidth concern is still important; the practical current workflow is: encode -> upload to host/CDN -> wrap with <video> or a lightweight player -> add captions/poster and test across devices (mobile, desktop, low bandwidth).

Recommended Answers

All 6 Replies

Member Avatar for Member #120589

You're looking for the 'object' tag, which you get from the EMBED code:

<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/jVje1Fiz-_c?fs=1&amp;hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/jVje1Fiz-_c?fs=1&amp;hl=en_GB" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>

If you insert the above into your html, you'll see an embedded video. Is that what you need?

No (but thanks anyway).
I don't want to make embed on youtube videos. I want to upload my own video to my web site and that others can see this video. But I don't know how is in youtube made this page:
http://www.youtube.com/v/PIb6AZdTr-A

Hi ivan3510

On youtube they use this code to put videos in their pages.

<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/PIb6AZdTr-A"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/PIb6AZdTr-A" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>

But youtube videos can also be accessed by going directly to the .swf file, in this case http://www.youtube.com/v/PIb6AZdTr-A

So, you can use a program called free studio to convert a normal video on your computer to a .swf file. Then put the .swf file on your server.

Then use the code below to add the video to your site

<object width="640" height="385"><param name="movie" value="http://www.yourdomain.com/file.swf"></param><embed src="http://www.yourdomain.com/file.swf" type="application/x-shockwave-flash" width="640" height="385"></embed></object>

Hope this sorts out your problem

Calum

Ok. Thank you very much.
Another question.
How to add video player to this video?

Member Avatar for Member #120589

You can use an flv player like flowplayer to play your own files. There are loads of other players out there. You should beware - hosting your own videos is very intensive wrt the server. If you get a lot of hits, you may find that you go over your quota or get a warning from your host. It's probably better to upload your video to youtube or better still to vimeo and use the embedded player. These has the benefits of allowing you to modify the appearance of the player without having to delve into javascript.

Thank you very much.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.