I embed some videos at my site,the problem is the videos can't be played.and the image also didn't show up.what's the problem?please give me somes codes that can embed videos,thanks!

Dani AI

Generated

This thread shows a classic symptom from the era of plugin-based media: posted object/embed markup (and a RealMedia file), asked for the code, and correctly pointed out that embed is obsolete. Modern pages should use the HTML5 video element and serve web-native formats (MP4 H.264/AAC and/or WebM). RealMedia and ActiveX rely on plugins that current browsers do not support.

Practical checklist and quick fixes:

  • Convert legacy formats to MP4/WebM. A common ffmpeg command is shown below (adjust bitrates/presets to taste):

    ffmpeg -i input.rm -c:v libx264 -crf 23 -c:a aac -b:a 128k output.mp4
  • Use the HTML5 video element with multiple sources and a poster image so a thumbnail shows when the video cannot play:

    <video controls width="640" poster="poster.jpg">
      <source src="video.mp4" type="video/mp4">
      <source src="video.webm" type="video/webm">
      Browser does not support the video tag.
    </video>
  • If images or video thumbnails fail to load, check exact file paths, case sensitivity, URL-encoding (avoid spaces in filenames or encode them as %20), file permissions, and server response codes in the browser DevTools Network tab. Also confirm the server sends the correct MIME type (e.g., video/mp4).

Further reading: MDN's guide to the video element (Using the video element) and FFmpeg documentation (FFmpeg documentation). These explain codec support, markup options, and conversion details.

Recommended Answers

All 3 Replies

Well, please show the code, so we can help you to rectify the problem,

Rahul

this is the code I use:
<object align=middle classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 class=OBJECT id=MediaPlayer width=480 height=385 >
<param name=ShowStatusBar value=-1>
<param name=Filename value='a b.rm'>
<embed src="../a%" width=468 height=350 align="middle" type=application/x-oleobject codebase= flename=mp></embed>
</object>
and why the image at my site also didn't show up?

Embed is deprecated, and works on very few browsers. It never had wide or uniform support.

use data=URL in the object tag instead.

You also won't see anything unless your ISP supports the type of video file you want to use.

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.