I may have several HLS streaming video address. I'd like to have a real time event telling any change of how many user online who access each of the streaming file.
User no need to pass in login page. They may retrieve the video streaming url directly and put into their player.
How do I accomplish this task in MVC?
If you allow them to play the URL in their own player, you'll need software on the media server that's creating the HLS streams to keep track of it for you.
If you were providing users with a web page that had a player on it, and not giving them the URL directly, you would just need to count how many people are on the page, and you wouldn't have to worry about the video at all.
Related
Music sites like Playmoss and Submissionhub manage to retrieve the YouTube video file URL from the standard player watch URL. When a user pasts a YouTube URL like this into their service, the get the video file URL like this and save them in their system. This is necessary to later reproduce the media files with an external audio player like SoundManager2.
I learned that it's possible to retrieve the info from command line but that's impossible to do so from embedded YouTube videos.
Any idea how the mentioned sites manage to do that?
It is impossible (and illegal) to retrieve YouTube video URL. Music sites like the mentioned in the question seem to play YouTube files controlling the embedded videos. This can be done using Javascript as described here.
We are a couple of software developers and were planning on making some commercial extension or some website through which users, with slow internet connections or limited data could play almost any video through YouTube's API. Although, while going through the API docs, we came through the following section,
Your API Client will not, and You will not encourage or create functionality for Your users or other third parties to:
"separate, isolate, or modify the audio or video components of any YouTube audiovisual content made available through the YouTube API"
-Kuan Yong, YouTube API Team
Is there no such legal way through which we can disable just the video and stream audio, not even with the commercial API?
Hoping for a positive reply.
Playing just audio means isolating audio, which is a clear violation of the terms and conditions of the YouTube API. However, as far as I know, there is no such restriction when not using the YouTube API. For example, youtube-dl, which is a video downloader for YouTube and hundreds of other websites, has the functionality to download just audio.
In fact, in YouTube's format, audio and video are actually stored in separate files on the server. This means you can actually acquire the path to the audio file and stream it to you users. Check out the open-source youtube-dl, specifically the youtube module, for more details.
Edit
The reason I am merely linking to a library is that YouTube continually changes the way they format, store, and stream video. This means that retrieving the direct link to a video's audio component is a task subject to frequent change. If you can link against youtube-dl's python module, you can make use of their updates whenever such changes occur.
Disclaimer
I am not fully sure if this is all legal and whatnot. Hence, I take no responsibility for your decision on what to do, nor do I condone this kind of behavior.
I know about how to play video in device. But Here I just want to know that is it possible to get streaming URL from any YouTube Video? Then how can I do it, I tried to search on google but I can not able to find my solution.
Generally I does not want to play direct stream from video, actually I want to save this URL (stream) in my buffer memory OR whatever temporary file and whenever user click on particular button then particular URL Stream is play.
Al Last I got YouTube APIs + iPhone = Cool mobile apps. But I am not sure that it's helpful in my case or not ? If anybody who worked on this API then please suggest me, Otherwise How can I get streaming URL.
Your suggestion will be appreciated.
Thanks in advance.
http://www.youtube.com/get_video_info?&video_id={VIDEO_ID}
This will not work on all files, some will display the message "This+video+contains+content+from.....". But many will work.
Is it possible to get streaming URL from any YouTube Video? - No, it is not possible without hurting the terms of service of youtube. Google has built the business model of youtube around the advertisements all over youtube, in-video banners and video ads and they want your user to see their ads. This is the reason they completely hide the video stream and would ban your app if you anyway access and stream it directly.
The only consented way to play youtube videos on iOS is to embed it into an iframe of a web view.
I want to play YouTube video when we redirect from internet area to non internet area.
Like I am having internet access at some point and I played Youtube video, and after some
times my internet connection is loosed, but now I want to play all those video which I played
previously.
I am not going to write any code for this but only tell you the route you probably need to take. As with any online media, If you don't have access to the internet, well you can't really get the data. What you need to do is capture the data which is coming in from any media and save it on the device. When the user then clicks on a video which has been previously saved while not connected to the internet, you can play the saved video file. There isn't really a simple quick way to do this, just do some research on saving streaming video or downloading video and saving to device.
I am not aware of any caching mechanism for a browser that could do that 'off the box'. This wouldn't make much sense anyway because the cache would get full with only a few videos.
The only way that comes to mind is to download the video of interest while connected and play it with your favorite media player. There's bound to be a few addons depending on the browser you use, I use VideoDownloadHelper for Firefox but for iPhone this blog seems to have some instructions.
I have a content management server application written in Java. A background process goes through a list of video ids and fetches the details for those video ids using Youtube API.
I would like to check if a particular video entry is available for mobile or not.
I checked syndicate allowed like
String videoEntryUrl = "http://gdata.youtube.com/feeds/api/videos/"+videoID;
VideoEntry videoEntry = service.getEntry(new URL(videoEntryUrl), VideoEntry.class);
if(!videoEntry.getXmlBlob().getBlob().contains("yt:accessControl permission='denied' action='syndicate'")){
System.out.println("The video is syndicatable");
}
Checking for syndicate still not solved the problem and the server still lets in videos that cannot play on Android phone.
What is the right way to filter only the videos that can be played on mobile?
There's no single check to see whether a video is playable "on mobile".
There are a variety of different reasons why a particular video might not be playable on a particular platform, and unfortunately the only way to be absolutely sure whether a particular video will play in a particular player is to attempt to play it.
That being said, this blog post goes into more details about the types of common playback restrictions that crop up: http://apiblog.youtube.com/2011/12/understanding-playback-restrictions.html