Player Appears, but Video Doesn't Play - html

My video player shows, but when I click play it acts as if it is loading the video, stops, but doesn't play.
<object width="100%" height="100%"
type="video/x-ms-asf" url="videos/agent_orange.wmv" data="videos/agent_orange.wmv"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<param name="url" value="videos/agent_orange.wmv">
<param name="filename" value="videos/agent_orange.wmv">
<param name="autostart" value="1">
<param name="uiMode" value="full">
<param name="autosize" value="1">
<param name="playcount" value="1">
<embed type="application/x-mplayer2" src="videos/agent_orange.wmv" width="100%" height="100%" autostart="true" showcontrols="true" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"></embed>
</object>
This came from a tutorial from here.

Video embedding is not natively supported in HTML 4. Media playback highly relies on the available media plug-ins so compatibility is a big issue.
In order for WMV to work on most browsers the user must have the correct plugin installed.
The best solution would be to use multiple video formats as fallback solutions. I would highly recommend looking at HTML 5 and the multimeda elements you can use are much more advanced than the ones in HTML 4. Using the Video element in HTML 5 would allow you to use:
MP4 = MPEG 4 files with H264 video codec and AAC audio codec
WebM = WebM files with VP8 video codec and Vorbis audio codec
Ogg = Ogg files with Theora video codec and Vorbis audio codec
If you had all of these video formats as fall backs then it would work in most browser (ie 9+)
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
<source src="movie.WebM" type="video/WebM">
Your browser does not support the video tag.
</video>

var player = $("object")[0];
player.controls.play();

Related

Showing (embedded) closed captions in MP4

I am using mediaelement.js to place a video onto the web page. For those unfamiliar with it, it is a video player element that takes in a single source video and displays in various formats (HTML5 or flash) based upon browser capabilities
The mp4 that I am using has the captions embedded into itself. Is there a way with HTML5 or mediaelement.js to display these captions. I know that I can pull an external track:
<track kind="subtitles" src="subtitles.srt" srclang="en" />
but since it is embedded I would prefer to use those. This is what my code looks like:
<video width="640" height="360" style="width:100%; height: 100%;" src="myvid.mp4" type="video/mp4" id="video1" controls="controls">
<source src="myvid.mp4" type="video/mp4" />
<object width="640" height="360" type="application/x-shockwave-flash" data="flashmediaelement.swf">
<param name="movie" value="flashmediaelement.swf" />
<param name="flashvars" value="controls=true&file=myvid.mp4 />
<!-- Image fall back for non-HTML5 browser with JavaScript turned off and no Flash player installed -->
No video playback capabilities
</object>
</video>

How to play H.264 video in browser?

I have transcoded each frame of my video from RGB -> YUV12 -> H264. On the exit I have H.264 video stream and I want to watch it without VLC media player and etc.
Stream should be available from different devices such as PC, tablet, smartphone in this way
I will use only browser.
Which method to choose?
Maybe Flash helps? Transcode video from h.264 to mp4? Anything else?
Thank you for any idea.
The <video> tag supports RTSP streams.
On Firefox, Chrome and IE9+, you can use:
<video src="rtp://domain.com/stream">
Your browser does not support RTP streams.
</video>
or
<video src="rtsp://domain.com/stream">
Your browser does not support RTP streams.
</video>
In good old IE8, VLC comes with an ActiveX plugin (VLC web-plugin) that allows video streaming:
<OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab"
width="640" height="480" id="vlc" events="True">
<param name="Src" value="rtsp://cameraipaddress" />
<param name="ShowDisplay" value="True" />
<param name="AutoLoop" value="False" />
<param name="AutoPlay" value="True" />
<embed id="vlcEmb" type="application/x-google-vlc-plugin" version="VideoLAN.VLCPlugin.2" autoplay="yes" loop="no" width="640" height="480"
target="rtsp://cameraipaddress" ></embed>
</OBJECT>

Backwards and cross-browser compatible audio playing

I need to playback audio files in many different web browsers and different versions. The old system produces 4-bit WAV files, which many browsers can't handle. All files contain synthesized or recorded human voices. Anyway I'm gonna need to replace it. So my questions are:
1) what is the best file format to use for audio files, with regards to compatibility, size and quality?
2) what is the best way to use HTML5 and staying backwards-compatible?
We need to support Internet Explorer versions 6, 7, 8 and 9; Firefox, Chrome and Safari.
Update: finally got it working for IE 6-9, Firefox and Chrome; haven't tested Safari yet. I learned that Safari for windows requires Quicktime and IE requires windows media player.
Here's what I'm using:
<audio autoplay>
<source src="/static/sound/SOUND.mp3" type="audio/mpeg">
<source src="/static/sound/SOUND.ogg" type="audio/ogg">
<source src="/static/sound/SOUND.wav" type="audio/wav">
<source src="/static/sound/SOUND.aiff" type="audio/x-aiff">
<object>
<param name="autostart" value="true">
<param name="src" value="/static/sound/SOUND.mp3">
<param name="autoplay" value="true">
<param name="controller" value="false">
<embed src="/static/sound/SOUND.mp3" controller="false" autoplay="true" autostart="true" type="audio/mpeg"></embed>
</object>
</audio>
I provide the same audio clip in MP3, OGG, WAV, and AIFF and then let the browser pick which it wants to play. The audio tag is for HTML5, the object tag is for older systems, and embed works on some systems not supporting the object tag.
I put this together from some information on a few websites, but unfortunately I've forgotten the URL.
UPDATE
I've since switched to using howler.js for this stuff. It automatically deals with all the cross-browser issues related to sound. Unfortunately it doesn't support IE 6-8, but I've given up supporting those any way.
With the HTML5 audio tag you can specify different audio types to attempt to load because each browser allows different types. There is a nice compatibility chart on this page: http://html5doctor.com/native-audio-in-the-browser/
The below code will work with most browsers. It first attempts the new HTML5 audio method then falls back on the embed method.
<audio width="100" height="100" autoplay="" controls="" tabindex="0">
<source type="audio/mpeg" src="songs/All-My-Life.mp3"></source>
<source type="audio/ogg" src="songs/All-My-Life.ogg"></source>
<source type="audio/wav" src="songs/All-My-Life.wav"></source>
<embed width="100" height="50" src="songs/All-My-Life.mp3">
</audio>

is it possible flowplayer first play with html5 then flashplayer

My videos are in amazon and i want to play this video by flowplayer or jwplayer.But my requirement is the video first try to play in html5 if it not possible it will go for flash mode.
I need a combination of HTML5 embed code and Flash embeded code.The embed code will automatically detect if the requesting device can play HTML5. If so, it will serve that code. If not, it will serve Flash version
I know it's been sometime since this question was asked, but in case anyone else is looking for the answer you can try
<video width="VIDEO-WIDTH" height="VIDEO-HEIGHT" controls preload="auto">
<source src="VIDEO-PATH.m4v" type="video/mp4">
<source src="VIDEO-PATH.ogv" type="video/ogg">
<object class="aligncenter" type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" width="560" height="315">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
<param name="allowFullScreen" value="true">
<param name="wmode" value="transparent">
<param name="flashvars" value="config={'clip': {'url':'VIDEO-PATH.m4v','autoPlay':false, 'autoBuffering':true }}">
<p>Your browswer does not support video...</p>
</object>
</video>
Replace “VIDEO-WIDTH” and “VIDEO-HEIGHT” with the video dimensions, and replace “VIDEO-PATH” with the full URL of the video, and you’re good to go.
One important note: mp4/m4v video files will not play in Firefox. And if you use the HTML5 video tag, Firefox also won’t fallback to Flash, either. It will just show a blank box. You need to include an ogv file format in addition to mp4.

How To Have An OGG Video Perform Auto-Playback In Firefox 3.6.20

I have a simple HTML5 oriented local page, that can correctly and consistently playback a simple video loop using MP4 and WebM formats correctly under Windows Vista and Windows 7 using IE 9 and Google Chrome 13. Under FireFox 3.6.20, the designated OGG Video file will play, but once completed, will not go back to the beginning of the video clip and play again.
My HTML for performing the video playback is as follows:
<video class="video-js" width="600" height="400" poster="images/home.jpg" preload="auto" autoplay="autoplay" loop="loop">
<source src="videos/home.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
<source src="videos/home.webm" type='video/webm; codecs="vp8, vorbis"' />
<source src="videos/home.ogv" type='video/ogg; codecs="theora, vorbis"' />
<!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
<object id="flash_fallback_1" class="vjs-flash-fallback" width="600" height="400" type="application/x-shockwave-flash"
data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars"
value='config={"playlist":["image.png", {"url": "home.mp4","autoPlay":true,"autoBuffering":true}]}' />
<!-- Image Fallback. Typically the same as the poster image. -->
<img src="images/home.jpg" width="600" height="400" alt="Poster Image"
title="No video playback capabilities." />
</object>
</video>
Is there a way that I can have FireFox go back to the beginning of a video, home.ogv, and resume playing once it has finished its initial playback?
My apologies if this might be a duplicate question, but I've tried to narrow down my HTML the replicate the auto-playback issue as much as I could, and none of the other solutions posted on the recommended subjects seemed to get me closer to a working solution.
Thank you in advance for your time, help and patience...
Loop attribute won't work, you'll need some JS workaround. You could just use JPlayer or maybe JW Player and let it work it out for you.