load movie trailer in android application from imdb - android

Is it somehow possible, you can load the movie trailers from imdb to videoView or the native android player.
so far, what i've tried.
Iframe approach which let me load trailer in webview, which is exactly i don't want.
Here i found a link which is something a direct link to stream.
I want this to play in video view or native android control.
thanks in advance.

The link you have above is not a direct link to the video - it is actually a link to a web page which contains an embedded player, which in turn has a link to the actual trailer video itself.
You can see the link the to the video if you use the network timeline tab in a browser inspector to look at the network requests. For your example above the client (the browser running the HTML5 page you have downloaded) is requesting the video m3u8 file with the following request:
http://imdb-video.media-imdb.com/vi1225109529/1421100405014-mxwp62-1434643350557.m3u8
This is the 'index' file for a HLS format video file - it tells the client where to request the video streams. The client then downloads the video chunk by chunk which you can see as requests for TS segments - e.g. for you example above:
http://imdb-video.media-imdb.com/vi1225109529/1421100405014-mxwp62-143464335055700002.ts
If the IMDB site does not protect or restrict the video in some way (for example only allowing it play from their embedded web page) then in theory Android should be able to play a HLS file if you point the Media Player towards the m3u8 file. In practice however Android has well know issues with HLS playback so you may find it problematic - see this summary: http://www.jwplayer.com/blog/the-pain-of-live-streaming-on-android/

Related

Android: Bitmovin I cant find the encoded video in the bitmovin console?

I have been searching all around the web to try to understand how to stream videos to my android app.
I learned:
That the videos must be in the HLS or MPEG-DASH format to be adaptive for streaming .
What I mean by adaptive streaming:
The kind of streaming that allows the user to change the quality while video is streaming.
What could help me do this:
The first thing should be to encode my videos into an HLS or MPEG-DASH, for that I found a service that could do this which is Bitmovin.
The second thing is to play the adaptive video, I found two ways exoplayer and Bitmovin-player.
The problem:
I made an account on bitmovin and tried to test an mp4 video to encode, but there are too many stuff there like input, output and manifest and I don't know what URL I should use to pass to the bitmovin player to play. I encoded the video but I don't know where the reference to the enocoded video is.
My question:
1) Is my approach of streaming videos correct?
2) Can someone explain which url I must pass to the player or where I can find the video that was encoded in Bitmovin cloud?
1) Is my approach of streaming videos correct?
Short answer: Yes :) Adaptive streaming is used by almost every major VoD platform out there, and a proper way to do that. Further it allows you and your viewers to either
let the player decide on its own to select the optimal quality for the given connection and device of the viewer to provide continuous playback
and the viewer can select a specific quality on their own as well, if they want to.
When creating adaptive streaming content using MPEG-DASH and/or HLS as streaming format, your output would typically consist of the following:
Video/Audio Segments
MPD Manifest, and/or HLS playlists
1) Your input file (e.g. an mp4 file) will be downloaded and splitted into segments, which are being processed by the Bitmovin encoding. Out of these, it creates the different qualities the player or your viewer can choose from later.
2) This segmented output is then transferred back to your own storage, e.g. a cloud storage like AWS Simple Storage, or Google Cloud Storage. Other output types like (S)FTP and many others can be used as well.
3) In order to play your created MPEG-DASH or HLS content, a MPD manifest and/or HLS playlist needs to be created. Those are basically an index for the player, which tells it which qualities are available and where to find them to start the playback.
2) Can someone explain which url I must pass to the player or where I can find the video that was encoded in Bitmovin cloud?
The URL you would have to provide to the player, has to point the MPD and/or HLS master playlist, that gets transferred to your storage. Bitmovin doesn't offer a hosting service for your encoded content, which is why you didn't find an URL to the manifest that is used. So you would need a storage first, where the encoding could be transferred to.
Give the getting started guide a try. Select your preferred API client. Then you will be guided step by step on how to integrate this encoding service. I hope this helps :)
To test the playback of the player you can also have a look at https://bitmovin.com/demos/stream-test and select "Use our defaults" which provide URL's to sample content for testing the player and playback.

How to stream video to VLC from direct video link (for Android or iPhone)

Hi I'm finding a way to create a website link to stream my direct video link from my web server to my android phone
for example I have a video direct link like :
http://1.1.1.1/video.mkv
I would like to create a web page to have like a button when press and it's automatically call VLC and stream the link above.
What I've try is just use a normal hyperlink like
<a href='http://1.1.1.1/video.mkv'>Play video</a>
when I press it's just downloading the video instead of playing it
But When I try it on mp4 video
<a href='http://1.1.1.1/video.mp4'>Play video</a>
It can call my VLC and stream it
So then I try to insert the direct link of the MKV video file
direct to vlc by open VLC app and open network stream
then MKV can stream just fine
So how can I make a hyperlink to automatically call VCL to stream my MKV file without having to copy the link then open VLC and input directly to app itself everytime?
Someone Please Help
Thank You
*edit, see here:
How can I make URLs to music files play in VLC on iOS?
Here is another type of example which opens an app or links to appstore if the app is not installed.
http://support.mobileapptracking.com/entries/25539969-How-to-Deeplink-to-Your-Mobile-App-from-Your-Website

.mov file will play in browser, but not in native MediaPlayer app

I am launching the MediaPlayer to play a .mov file that is being passed into the MediaPlayer as a Uri (which is standard). However, it is telling me that it cannot play the file. However, if I put this same link on the web, and the click the link to launch the movie (while in my Android browser) the video plays no problem. However, I can't get the WebView to play it with the Video tag despite all my efforts.
So here is my question, what magic is taking place that allows an android browser app to take a .html url which contains a link to play a video and play it? If I load the same url in a WebView, or try to pass the video url into the mediaplayer, it is a no go. The format of the video is .mov.
Thanks in advance to everyone.
The Android browser and WebView are very different, WebView is very barebones as it was designed expecting people to use it for very basic showing html webpages. WebView by default has no plugins enabled, no javascript enabled and so on and so on. Never expect that because something works in the browser that it will work in a WebView.
Now in regards to how the media is handled. The Browser has extra features set up to strip the video source from the page and launch it in the native player most of the time. This functionality is not built into WebView. And the native player is very picky about what needs to passed into it as a URI to be able to play it.
Hope that helps,
Stevy888

video streaming and displaying simultaneously in android

Please provide some url related to some documentation about video streaming in android. I got many document on this site but all are getting total content of video from url and then playing the video but i want to stream and play video simultaneously so that i can play without consuming a lot of time. thank you
There are two techniques:
Using MediaPlayer: If you are using streaming server to fetch video then just provide your URL in MediaPlayer source. MediaPlayer will manage everything.
Manually: If you are not using streaming server for video then you need to download and play video. Use following link as example. In following link author explain audio streaming. You can use same technique for video.
http://blog.pocketjourney.com/2008/04/04/tutorial-custom-media-streaming-for-androids-mediaplayer/

What is most preferred method to play video and audio on mobile website?

What is most preferred method to play video and audio on mobile websites?
I want to know if I'm having and Video and an MP3 file then how to convert them and embed in a webpage which is a page of mobile website.
I think you know the answer to that already since you're tagging this as HTML5!
Use the audio and video elements. Use a fallback to Flash if you so wish.

Categories

Resources