Link directly to video and nothing happens - html

I'm not sure why I thought the file should be handled by the browser (chrome in my case) and then do something (for chrome I think its use QuickTime to play) but instead I just get an untitled browser title, and the page doesn't actually load, as if its loading an empty html page
anyway the address is:
www.motionvideos.tv/video/1022_market_review_february_2012_taylors.mp4
Other details which may effect it:
The site uses WordPress, which is currently not functioning, due to someone's fiddling, and will be down for a day or so (stupid zeus server redirects)
The video is just under 9MB.
Possible causes?

This link is for video download.
Do you want it to show on page?
If so you need to open a HTML page to embed this in.
This is how you embed it via code:
http://www.mediacollege.com/video/format/mpeg4/streaming/example.html
For WP you`ll need to open up a post and use a dedicated plugin for embedding.
Also, you should know that :
MP4 is not a universally common codec - some users (many?) will not be able to view it
The file itself will load directly from the server, thus noticeably effecting total bandwidth usage (can reflect on site speed, hosting costs and etc)
Also not all hosters support (by default) media hosting. This got a lot to do with above mentioned bandwidth issue.
I would suggest re-coding to more common codec + using 3-rd party provider
(I.E. Flash + Youtube for one is a popular choice but you can also go with AVI + Media Hosting Provider X)
Hope this helps.

Related

uploaded video only audio is displayed

I am trying to upload an MP4 file. But with this specefic file only the sound content is displayed.
With all my other videos there is no problem only with this specefic one.
i found the following SO question:
HTML5 video of type video/mp4 playing audio only
Where he suggest to find a converter.
Does anyone know if this could be the problem and how do i secure that regardless of what video my user uploads that it will always be able to play?
Yes, this can be a problem.
You have not written about your server limitations, so if you have the possibility to execute converters (like ffmpeg) then this is the best solution. This way you can also guarantee fixed resolution, framerate and various other properties, and your server won't eat up all the space if someone uploads a 2GB video... (Users can be dumb sometimes.)
If you cannot run ffmpeg on the server then try reading some about how can you detect codecs on your server, in the language you use, etc. Then, if you still want to, post a specific question.
Also try opening your videoplayer page with different browsers (Chrome, FF, IE at least). They might not support the codecs the same way.

How to Record a Video with Webcam and Save to Server Using RubyOnRails

I want to record user Video with Webcam and save the recorded video to Server, using Ruby On Rails, which should work in all browsers .I have tried the below approaches, which did not solve my problem.
http://www.html5rocks.com/en/tutorials/getusermedia/intro/ - tried and not able to play / save the recorded video
http://www.xarg.org/project/jquery-webcam-plugin/ - verified and does not seem to support video recording.
http://nimbb.com/ - is a paid one
Please let me know, if any body has a standard solution for this (which works in All / Most of the browsers, preferably an open source).
Any help would be greatly appreciated. Thanks in Advance!
This is a pretty old question, but just came across it and thought I would at least offer a solution to all future visitors who stumble across this question:
The MediaStreamRecorder API is currently unimplemented in chrome, however some users have found alternative ways to get it working by stitching together .webp images into a .webm video. Now, it might not be the best idea to use that experiment, but other projects have taken that idea a lot farther by implementing a cross platform library that implements that idea (and other browser specific solution) of which the first is aptly called MediaStreamRecorder. Another option is RecordRTC which I have used myself in the past of which one advantage is that they have some specific server side Ruby code to get it working neatly (not that you need it if you want to do a simple upload, but sometimes you might want to do more than that).
Recording video in the browser is mostly a client side affair so the fact that you're using Ruby server side will not impact the solution.
The only solution that works consistently across desktop and mobile browsers would be one that implements the following:
desktop: a Flash video recording client + media server
mobile: HTML Media Capture
Some notes on your links:
The HTML5Rocks article mentions the HTML Media Capture draft/standard which only works on mobile browsers
The jQuery webcam plugin uses Flash to access the webcam but it can't record video (it doesn't connect to a media server)
Commercial hosted solutions include nimbb, Pipe and ziggeo
Commercial self hosted solutions include HDFVR (which supports Ruby)

Web browser offline application cache with video files?

I am trying to make a site available offline in a web browser (specifically: Mobile Safari and/or Google Chrome), using a manifest file to load the offline content into the application cache.
This works just fine for images, html content and even font files. But not so for the videos I am trying to store. Mobile Safari is asking to increase storage to 50MB (just as it should) to accomodate the videos, but when going offline the videos are not displayed. All in all the cached content amounts to 37MB.
I am using JWPlayer to show the videos (setting the HTML5 player version as the preferred player), but I have also tried the HTML5 video tag on its own to no avail. The JWPlayer is returning the "Could not load video file" message, just as if the URL was invalid, when going offline (but they work fine online). The videos are H264 encoded in MP4 containers.
Is Mobile Safari on iPad at all capable of storing and retrieving MP4 (or other video) files? Is there any special trick that needs to be employed?
The problem is that Safari itself doesn't play the videos. They're played by the QuickTime plugin, which ignores the browser's caches. See this article.
I don't know of any workaround (other than PhoneGap etc.), but I would certainly love to have one!
You could not use the JWplayer in offline (at least with your current version). In their script (swf), it is fetching some external script from their server (include their logo) such as
http://p.jwpcdn.com/ ... /jwpsrv_frq.js
http://p.jwpcdn.com/...../jwpsrv.js
http://p.jwpcdn.com/...../logo.png (JwPlayer text)
I think it's all about their authorization and license checking. It would take you an amount to get away that logo for the paid version, they may ask your domain and they will add it into their list of the customer's valid website domain, and they also give you a script in the static link and you can add it into your cache file.

HTML 5: Accessing local file system mp3 from a website

Nomally web browser would not allow a website to access the users local files. I came across locallinks plugin which allows the file:/// access from a webpage , however such file opens up in a different tab.
I wanted to create a player which already has information about the file location on a clients computers and would play the media file on being clicked.I have coded something like this
<audio controls="" id="player">
<source src="file:///home/vihaan/Music/001) Led Zeppelin - Stairway to Heaven.mp3" type="audio/mp3"/>
Your browser does not support html 5 audio
</audio>
I had assumed that installing that plugin would make this work ! I have also heard about NPAPI plugins. Would it be possible to create a plugin which after the webpage gets loaded allows reading a file into the webpage i.e playmusic from a users computer without the user actually have to select the folder every time. Thanks
It would absolutely be possible to do this with an NPAPI plugin; it would most likely be a very, very bad idea.
There is a reason that browsers have those security restrictions in place; if you allow your web page to read arbitrary data on a user's computer then suddenly any other website could just use your same plugin to do the same thing; and they might not be just reading music. Bare minimum you'd need some very careful restrictions on it, and even then you'd likely open up a security hole that you aren't aware of by accident. You don't want to be known as the creator of the plugin that allowed the next botnet to take over.

Chrome HTML5 Videos stop working if too many tabs are open - Memory issue?

I'm using jQuery to dynamically write <video> objects, and running videojs to init them. After I play a video, SOMETIMES when I try to play it again, it just won't play, and from that point on, even after refreshing the page, no videos will play. Each time, the <video> object renders, but the video just doesn't play. Nothing is written to the console. There don't appear to be any errors. Restarting Chrome resolves the issue, but only momentarily. After playing a few videos, the issue comes back again.
I found that closing other tabs in Chrome does indeed fix the problem, so it appears to be some kind of memory issue.
I'm running Chrome 19.0.1084.46
Exactly how many video tags to you have? What do they look like? Do they include preload='none' attribute? Are the source videos all on the server?
I ask because if you have more than six video tags on a single page pointing to the same source server then you could be experiencing "connection starvation":
Chrome allows only six open connections to a single server (based on DNS name in the URL)
the html5 video tag's preload attribute default value is 'auto'
Chrome's auto behavior is to preload some data and leave the connection open ready to pull more data for the video
So, with more than six video tags on a single page pointing to a single server, the videos will not play. To resolve this particular problem, set the preload attribute to 'none'
Stu is correct. But sometimes, in my experience, Chrome ignores the preload="none" attribute and goes ahead and opens a connection anyway. I've had much problem with this when developing a site which had many smaller videos on it. The connections blocked the rest of the content (images, custom fonts (and when custom fonts are delayed, the text does not even render)) My solution was to build an own preloader which loads the images. This made sure I could control at least when the images (which was the most crucial aspect from a design point of view) was loaded.
That solved the problem with images not showing but the problem still remained. So the best solution is to set up subdomains pointing to the same server, like: v1.server.com, v2.server.com, and so on. This means you won't have to move your files and you get the benefit from enabling browsers to have more open connections. Watch out for increased dns lookup time though.
There is a known bug with Chrome. It will not play the same video in multiple tabs at the same time. This is probably what you are running into if you are a developer and happen to have your page open in two tabs at the same time.
The bug has been known for almost 5 years as of this writing. Feel free to visit the Chromium bug report and star the issue. Hopefully it will increase in priority for the Chrome devs.
In the meanwhile, a workaround is to use a random query parameter in your video src. For example, instead of <video src="vid.mp4">, use <video src="vid.mp4?_u=1253412">. This will break Chrome's caching mechanism and allow the same video to be streamed to two different tabs at the same time.
I had a similar but related issue which I can expand on slightly here.
I had 14 different small videos on a page but only 2 were available at a time. Setting preload = 'none' didn't fix the issue so I also used a data attribute to store the src, and remove the src for all videos that aren't currently being viewed.