Why does youtube video work everywhere but other video sources no? - youtube

So this will sound like a stupid question, but I notice that video from youtube works on pretty much all browsers without any setup work. However, use a security DVR or a IP camera, and suddenly you need a custom applet that is OS specific added to run it. Why does youtube just work everywhere? Because all the browser makers set it up by default? If the youtube video presentation method is so universal, why does not every video device use the same method/plugin as youtube?
Thanks.

YouTube doesn't "just" work everywhere. They have hundreds of engineers working to keep it working everywhere. They have several copies of each video that work on a sub set of platforms, and spend a lot of time making sure each platform works and continues to work.

Related

Play video (from streaming) in iPhone with Ionic 3/Cordova iOS app from Node Js, without so much time loading

First, sorry because this is not an special code issue (I can play videos in iPhone), so I'm not attaching any of my code, but asking for technical solution.
I'm developing a mobile applicaton (and also a webapp) that plays videos which come from a Nde js server. At first I noticed that in Safari, you can only play videos from streaming (which is also the best practice in the rest of the browsers), but it was very slow (so much time loading the video).
I came accross this piece of code, and the post of the author, it helped me to improve my server side streaming code:
https://github.com/davidgatti/How-to-Stream-Movies-using-NodeJS/blob/master/routes/video.js
I didn't need to change anything in the webapp, but now I can play videos much faster in Mac/Safari (in HTML5 I have simple tags).
But nothing changed in the Ionic app... And I don't know how to follow or where the problem could be (ionic/cordova or Node JS).
What can be the point I can be missing? Any link, known bug in ionic, or trick would help a lot.
UPDATE:
I'm trying with .mov and .mp4 video files. What's the ideal format (or compression) for iPhone?
UPDATE 2:
It's a good choice to handle videos with a cloud video solution like uStream, and embed it like an iframe (as provided solution from ustream)? Nothing more seem to work on improving time of load, managing videos on my own server and ionic client.
Thanks so much

Designing a library for Hardware-accelerated unsupported containers on iOS (and Airplay)

I'm trying to put together an open source library that allows iOS devices to play files with unsupported containers, as long as the track formats/codecs are supported. e.g.: a Matroska video (MKV) file with an H264 video track and an AAC audio track. I'm making an app that surely could use that functionality and I bet there are many more out there that would benefit from it. Any help you can give (by commenting here or—even better— collaborating with me) is much appreciated. This is where I'm at so far:
I did a bit of research trying to find out how players like AVPlayerHD or Infuse can play non-standard containers and still have hardware acceleration. It seems like they transcode small chunks of the whole video file and play those in sequence instead.
It's a good solution. But if you want to throw that video to an Apple TV, things don't work as planned since the video is actually a bunch of smaller chunks being played as a playlist. This site has way more info, but at its core streaming to Apple TV is essentially a progressive download of the MP4/MPV file being played.
I'm thinking a sort of streaming proxy is the way to go. For the playing side of things, I've been investigating AVSampleBufferDisplayLayer (more info here) as a way of playing the video track. I haven't gotten to audio yet. Things get interesting when you think about the AirPlay side of things: by having a "container proxy", we can make any file look like it has the right container without the file size implications of transcoding.
It seems like GStreamer might be a good starting point for the proxy. I need to read up on it; I've never used it before. Does this approach sound like a good one for a library that could be used for App Store apps?
Thanks!
Finally got some extra time to go over GStreamer. Especially this article about how it is already updated to use the hardware decoding provided by iOS 8. So no need to develop this; GStreamer seems to be the answer.
Thanks!
The 'chucked' solution is no longer necessary in iOS 8. You should simply set up a video decode session and pass in NALUs.
https://developer.apple.com/videos/wwdc/2014/#513

Progressive Video Download on iOS

I am trying to implement Progressive Downloading of a video in my iOS application that can be played through AVPlayer. I have already implemented a downloader module that can download the files to the iPad. However, I have discovered I cannot play a file that is still being written to
So, as far as I can tell, my only solution would be through downloading a list of file 'chunks' and then keep playing through every file as they are ready (ie: downloaded), probably using HLS
Searching I have come across this question which implements the progressive download through hls but other than that, I can find no other way
However, I keep coming across search results that say how to configure web servers to leverage the iOS support for HTTP Progressive Downloading, but with no mention of how to do it from the iOS side
So, any one have any ideas and/or experience about this?
EDIT: I have also found there could be a way of doing it other way around (ie: streaming, then writing streamed data to disk) which was suggested by this question but still cannot get it to work as it seems it does not work with non-local assets!
From what you say, you might want to change approach and attempt to stream the file. Downloading and playing at the same time, I would say is the definition of Streaming. I hate when people post links to the Apple documentation but in this instance reading a tiny bit of this documentation will help you more than I ever can. It should all make sense if you are lready working with connections and video, you just need to change your approach.
The link: https://developer.apple.com/library/ios/documentation/networkinginternet/conceptual/streamingmediaguide/Introduction/Introduction.html

Options for embedded video on website other than YouTube?

Been having trouble with YouTube lately with regards to autoplay, looping and playlists. Currently using the AS3 embedded player and it was working fine until recently when autoplay and playlist options became mutually exclusive. I am also finding the loop option doesn't work with autoplay.
So, looking at options other than YouTube as we will have access to the video anyway and can either upload or stream using whatever technology is appropriate. My application is for touchscreen interactive kiosks which will be largely unattended and I want to be able to run embedded video with all controls turned off to prevent anyone from jumping off to some other website at any point. This is crucial! I don't mind if a touch can pause the video like it does with YouTube but links must not be available to jump out.
My web app is written in Rails 3 with HTML, CSS3 and JQuery where required. It runs on IE8/9 on the kiosks and Safari mainly during development. I'm using Heroku.com for hosting.
Hopefully I've given enough background here to attract some good answers but please let me know if I've missed anything important.
Thanks for your time,
Craig.
This service is awesome in quality and price.
http://sublimevideo.net/
If you are using heroku for your hosting, you should take advantage of their add-on. The interface is super clean and you have full flexibility to mold playlists or behavior.
Panda Stream
http://addons.heroku.com/pandastream

YouTube embed code on iPad

I'm working on improving the experience of a site by adding in iPad support. This includes support for videos. Our client is pushing towards a YouTube model for storing and serving videos -- great for us! I originally planned to implement the use of YouTube's new HTML5-supporting <iframe> snippets. This offloads the device detection to YouTube and makes embedding a video a cinch as we don't need to worry about compatibility. It turns out the the CMS we're using, Sitecore CMS, strips out <iframe>'s from our WYSIWYG editor. After a lot of research it looks like its a bit hard to not make this happen.
Fast forward to now... I tested out the old style <embed> code and discovered even though iOS doesn't support Flash, these embeds seem to work fine on iPad. Some Stack Overflow research led me to this post which suggests its because of the YouTube plugin /System/Library/Internet Plug-Ins/YouTubePlugIn.webplugin on iPads that allows for the playback.
My question is, is there any documentation that this is the exact reason? I'd like to go by this as why we can use the regular <embed> code but I need to back it up with proof via a document for iOS. Is this YT plug-in on every iPad by default, or do users need to manually install it? This seems like a great solution considering our unfortunate incompatibility with an <iframe> but I need to support the use of the <embed>'s with hard facts. Thanks in advance.
The answer you are looking for is to be found in Apple's URL Scheme Reference. Basically it's a mechanism that comes into play on the iDevices to detect and handle specifically, certain types of URLs - for instance Google Maps, iTunes and also YouTube.
Here's a few reference links.
https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40007899
https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/YouTubeLinks/YouTubeLinks.html#//apple_ref/doc/uid/TP40007895-SW1
And just for good measure, you might also want to take a look at the Safari Developer Library for the best practice recommendations on HTML5 Video and Audio embedding :-)

Resources