html5-video

VLC record webcam and stream to chrome linux

随声附和 提交于 2019-11-27 13:50:17
I am currently looking for how to accomplish what I have been told is possible. I was told that we would be able use vlc to stream a webcam in linux which would allow for the following: Recording the stream to the local machine for a later upload. Play the stream as it's recording using Chrome's HTML5 video capabilities. Send a start and stop command from the web for the vlc recording. I have been researching this for quite some time and haven't been able to find a viable solution. I am able to record video using VLC already with the following vlc v4l2:// :v4l2-dev=/dev/video0 :v4l2-width=640

Why does Firebug show a “206 Partial Content” response on a video loading request?

微笑、不失礼 提交于 2019-11-27 13:38:20
I have a bunch of html5 video elements, with their preload attribute set to "auto". They start loading just fine, but I think there might be a problem with their caching, because each time I reload the page (without clearing the cache), they start all over again. When I checked the Network panel in firebug, I noticed everything else (images and files) was giving me a "304 not modified" message as espected, while the videos (and audio) files were giving me a "206 partial content" message, in duplicated entries. The "206 partial content" response also appears in duplicated entries when the page

HTML 5 Video “autoplay” not automatically starting in CHROME

本秂侑毒 提交于 2019-11-27 13:28:39
I have the following code: <video controls autoplay> <source src="video/myVideo.mp4" type="video/mp4"> <source src="video/myVideo.webm" type="video/webm"> <source src="video/myVideo.ogv" type="video/ogg"> </video> The video: displays well in both Chrome and Firefox In Firefox it plays as expected In Chrome it displays but not "autostarts". This is the problem. If I click on it (in Chrome) it plays ok Tried <video controls autoplay>...</video> <video controls autoplay="1">...</video> <video controls autoplay="autoplay">...</video> Nothing worked in Chrome Then I also tried changing the codec,

With an HTML5 video element on the iphone, how can I detect the difference between “pause” and “done”?

自作多情 提交于 2019-11-27 13:13:35
问题 This is an extension of this question According to my research, for a video element on an iPhone/iPad, pressing both "Done" and "Pause" triggers a "pause" event. So if I have some desired webpage behavior that I want to initiate upon pressing the "done" button, I need to listen for the "pause" event. player = document.getElementById('videoplayer'); player.addEventListener("pause", function() { //desired "done button" behavior defined here }, false); According to Arv-ToolTwist's answer to that

Making youtube.com/embed URLs work on iOS

限于喜欢 提交于 2019-11-27 12:58:30
问题 For a given video on YouTube, you can visit http://youtube.com/watch?v=[code] on any iOS device to see the video. However, if you use the http://youtube.com/embed/[code] URL — for instance, in an iframe on a page or in a Colorbox modal — it will not play on iOS. For instance, if you use code like this: <iframe class="youtube-player" type="text/html" width="640" height="385" src="http://www.youtube.com/embed/VIDEO_ID" frameborder="0"> You just see an error: Your browser does not currently

MP4 plays when accessed directly, but not when read through PHP, on iOS

别等时光非礼了梦想. 提交于 2019-11-27 12:27:36
I use a PHP script to validate video requests before serving them. This script works as expected on the desktop, with Safari and Chrome. But on iOS, I get a broken play button. I'm sure the video is properly encoded for iPhone/iPad, because when I access it directly, it works as expected. The relevant PHP code: $file_name = 'test-video.mp4'; $file_size = (string)(filesize($file_name)); header('Content-Type: video/mp4'); header('Content-Length: '.$file_size); readfile_chunked($file_name); exit; ( readfile_chunked() is similar to readfile() but for very large files, found in the comments on the

How to check if the browser can play mp4 via html5 video tag?

浪子不回头ぞ 提交于 2019-11-27 12:20:34
How to check if the browser can play mp4 via html5 video tag? This might help you: <script type="text/javascript">'. var canPlay = false; var v = document.createElement('video'); if(v.canPlayType && v.canPlayType('video/mp4').replace(/no/, '')) { canPlay = true; } alert(canPlay); </script> badfur Alex Polo's reply is not bad but incomplete try this to check if the codec is supported too: var mp4Supported = (!!document.createElement('video').canPlayType('video/mp4; codecs=avc1.42E01E,mp4a.40.2')); Likewise for ogg, webm and so on ... Works with audio too :) Justin808 This following link

How to hide full screen button of the video tag in HTML5

笑着哭i 提交于 2019-11-27 11:57:37
I need to hide the full screen button of the video tag in HTML5. Is there any way to achieve it ? Thanks. I think you can accomplish this by changing the css for the #document fragments , these are DOM1 specs and supported by all browsers, but about the styling, I'm not sure. Simple webkit browser (chrome on windows) specific solution The following solution is webkit specific video::-webkit-media-controls-fullscreen-button { display: none; } video::-webkit-media-controls-play-button {} video::-webkit-media-controls-timeline {} video::-webkit-media-controls-current-time-display{} video::-webkit

Play HTML5 Video when scrolled to

戏子无情 提交于 2019-11-27 11:49:43
Is there anyway to autoplay a HTML5 video only when the user has the video (or a certain percentage of the video) in the browser viewport? Mikkel Jensen In brief Let's say our browser window W currently scrolled to y-position scrollTop and scrollBottom Our video will NOT be played when its position is at V1 or V2 as below snapshot. Code details $(document).ready(function() { // Get media - with autoplay disabled (audio or video) var media = $('video').not("[autoplay='autoplay']"); var tolerancePixel = 40; function checkMedia(){ // Get current browser top and bottom var scrollTop = $(window)

Playing m3u8 Files with HTML Video Tag

给你一囗甜甜゛ 提交于 2019-11-27 11:47:01
I am trying to use HTTP Live Streaming (HLS) to stream video to my computers and my iPhone. After reading through the Apple 'HTTP Live Streaming Overview' as well as 'Best Practices for Creating and Deploying HTTP Live Streaming Media for the iPhone and iPad', I am a bit stuck. I took my source file (an mkv) and used ffmpeg to encode the file the MPEG-TS format and Apple-recommended settings and a Baseline 3.0 profile: ffmpeg -i "example.mkv" -f mpegts -threads:v 4 -sws_flags bicubic -vf "scale=640:352,setdar=16/9,ass=sub.ass" -codec:v libx264 -r 29.970 -b:v 1200k -profile:v baseline -level:v