I'm building an Android app that works similar to Udacity app.
My requirements
All my videos should only be viewed via the app.
I will be using my own video player inside the app, and I want the
option to choose quality of video (Like in YouTube app)
Offline download option
Considering these requirements, how would I want to host the videos?
I'm familiar with the Android app side of things, but the rest I know nothing.
Did 3 hours of googling before posting this question here, and found out udemy is using AWS and Brightcove.
Can anybody explain the procedure of hosting and encoding videos for my requirements.
Firstly, big organizations like Udemy, Coursera and Udacity design and develop their own video encoding tool to show in the application. Udacity, for instance, has two modes - YouTube and their own player which the user can set based on their preference.
You can't develop your own codec or player in a jiffy, it needs a lot of dedication and more work which one person cannot develop in days.
For your query, you can use ExoPlayer, YouTube Embed, Vimeo Player, related kinds of open source or publically available players.
My goal is to play a Youtube video in an application.
Youtube Player API is not what I want since there could be overlays in front of the video.
Webviews are terrible for performances and doesn't allow autoplay.
Exoplayer seems good but most of their doc is broken (links), incredibly complex for a very simple task, and doesn't provide working demos (their demo crashes...). Also, they don't explain how to properly get the DASH of a youtube URL.
So, is there a way to make Exoplayer work easily and get DASH info of any youtube link like https://www.youtube.com/watch?v=yFAnn2j4iB0 ?
I use http://www.youtube.com/get_video_info?&video_id=yFAnn2j4iB0 and once decoded I get this DASH url : https://manifest.googlevideo.com/api/manifest/dash/ms/au/nh/IgpwcjAxLnBhcjAxKgkxMjcuMC4wLjE/mv/m/source/youtube/requiressl/yes/ip/165.225.76.70/fexp/3300108,3300130,3300161,3313267,9419451,9422596,9424135,9425619,9426788,9428398,9431012,9431719,9433096,9433223,9433946,9435526,9438327,9438662,9439580,9441225,9441737,9442156,9442424,9442426,9442680,9443322,9443345,9443768,9443913,9444207,9445344/ipbits/0/as/fmp4_audio_clear,webm_audio_clear,webm2_audio_clear,fmp4_sd_hd_clear,webm2_sd_hd_clear/sparams/as,hfr,id,initcwndbps,ip,ipbits,itag,mm,mn,ms,mv,nh,pl,playback_host,requiressl,source,expire/pl/23/id/c850279f68f8881d/mn/sn-25g7snee/mm/31/hfr/1/playback_host/r18---sn-25g7snee.googlevideo.com/itag/0/mt/1471872416/sver/3/key/yt6/initcwndbps/9365000/expire/1471894709/upn/w1CO218TeQA/s/11395DF1FE7737DA54826F38EE1C61D28B46619DC.9724AB654EE916E8B5C5F687BE3504E4799BA939933
But it doesn't start buffing in the Exoplayer Demo. Is this DASH correct ? Does anyone of you use ExoPlayer in their app ?
Doc I found so far :
How to play youtube video in ExoPlayer in Android?
https://github.com/google/ExoPlayer/tree/release-v1/demo_ext (but it crashes ><)
If your goal is to play YouTube videos then use YouTube Android Player API. You need to provide direct URL to Exoplayer.
I successfully run the demo app. you can follow the guide at https://google.github.io/ExoPlayer/demo-application.html and clone the project on github https://github.com/google/ExoPlayer.git
a little note though, it is the most complex project I've ever seen, and need the longest time I ever experienced to build its gradle.
after gradle build complete, you just need to run the demo project.
I am building an Android app with my youtube videos. I want to add casting support to these videos within my app. I don't want to build separate receiver app in chromecast but want to just use the existing youtube receiver app in chromecast/Roku..etc.
I am currently using 'Youtube Android Player' API to embed videos in my app but I can't find the cast support in-built. I am willing to move to just HTML5 youtube embedding if casting support works that way.
Would greatly appreciate if someone can suggest a way if they are able build such cast'ing support of youtube videos in their android app?
(I have researched internet and some of the 2013 & early '14 posts suggest it's not possible. Would like to know if anything has changed since then)
There is currently no support in the Cast SDK to cast YT videos; some folks have used a custom receiver and have used embedded iframe to show YT videos but that is not a perfect solution and has issues; for example you cannot skip ads, etc.
In my android application I want to play youtube video in App, not in the default browser. I am trying this for the last some days. Previously I played the youtube video using the following code :
http://code.google.com/p/android-youtube-player/downloads/list
But now this code is not working. It shows "Sorry, this video cannot be played." I have tried all the possible solution mentioned in the different forum for this error. But could not be able to play the video.
That's why I am trying to find out another way to play the video in app. I have tried the RTSP link of a youtube video , it is playing the 3gp video file, but video quality is very poor. This is not acceptable.
I am really fade up to find out good solution to play youtube video in app.
Please help. Any good suggestion is always welcome.
Santanu
Playing YouTube videos in Android was made very simple with the release of this library: https://developers.google.com/youtube/android/player/. The Developer Guide on that page is a good resource on how to use this library. They also provide sample code on how to use the functionality provided by the library. The steps are basically:
Get a developer key
Download the library and include it in your project
Use the library to play videos (hint. use the YouTubePlayerView as a first step)
Please post again if you have any questions or need any code examples.
I play youtube video in videoview and I also face problem regarding video result.
Here some topics regarding this. One my friend suggest me use embeded URL instead of rtsp URL. Its give good result. For Example embeded URL example and how to implement it.
I have been trying to play video in my android application that I made using phonegap. I had several problems and so I have several questions.
Firstly, does html5 video tag work with phonegap? I couldn't succeed to write the html5 codes.
Secondly, what types of videos are supported by android and phonegap?
Thirdly, I try to play a file whose extension is mp4. There is no scene on the screen but I can hear the voice of the video. What can be the reason?
Thanks in advance.
Nope, the video tag is broken in most if not all versions of Android. Go star these issues:
http://code.google.com/p/android/issues/detail?id=22254 and
http://code.google.com/p/android/issues/detail?id=8272
In order to work around this pain in the #$$ I've written a plugin you can use on Android to play videos.
http://simonmacdonald.blogspot.com/2011/11/video-player-plugin-for-phonegap.html