RTP Client Application on Android Mobile Device - android

Hey folks,i am developing a RTP client on an Android device which can play streaming videos from a server.
I am confused regarding how should i start about?
i am thinking of developing a web app, using HTML,CSS and Javascript, which can later be wrapped in Android.is this approach correct? does javascript support real time media player?
please guide me, i am a fresher and completely clueless..:(

You should play your video with MediaPlayer. Of course you can prepare dedicated website that lists available streams and wrap it up into WebView. Having this stream list in WebView you can write interface that will bind javascript on your webpage with proper interface in your Android code. Check out this section of Android Dev Guide:
And here is a list of supported media formats
I successfully played rtsp stream on Android 2.2 but I'm not sure if it's supported on previous versions.
To sum up.
Prepare website with javascript code and streams list
Create layout with webview with javascript enabled for example:
Webview wv = (WebView) findViewById(R.id.WebView01);
wv.setJavaScriptEnabled(true);
Add class that will be invoked by javascript like in the Dev Guide above:
wv.addJavascriptInterface(new JavaScriptInterface(this), "Android");`
Play stream with MediaPlayer
Hope that helps.

I guess you may setup a streaming media server(live555, darwin stream server) to publish media file in rtsp protocol, and use VideoView on android to play it

If you create normal android app then MediaPlayer class will handle everything for you. Just feed it with rtp stream url, that is it.

Related

Error in MPEG-DASH with Azure Media Services

I am trying to implement Video on Demand using Azure Media Services on Android.
I have uploaded the video, encoded it to Multi-Bitrate MP4 and then added AES encryption and published it.
I received this MPEG-DASH Url: http://prepladder-inct.streaming.media.azure.net/xxxx-xxxx-xxxx-xxxx-xxxxxxxx/sample-video.ism/manifest(format=mpd-time-csf)
But i am unable to play this video on any MPEG-DASH player (Android or web)
I am even unable to play this video on Azure dash player link: http://dashplayer.azurewebsites.net/
When i enter the stream url, the player is able to show the duration of the video but does not play.
On ExoPlayer on Android, i am able to play all MPEG-DASH streams available online for testing purpose.
Also, i am able to play HLS stream provided by Azure for the same media on ExoPlayer and on iOS.
I have not added any token authorization or DRM during video encryption.
I am missing something? Please help.
The problem is likely that your video file name has unsupported characters. The issue is documented here, where we point out that certain characters should not be used. Try renaming the source video to, say, GM_1st_acid_fast_stain.mp4, upload it to a new Asset, encode, and then create the streaming URL.
For FairPlay/HLS, it is critical to provide the Application Cert (public key only) to the player. Apple's recommended way is to host this App Cert on a web server and pass the URL to player.
SPC/CKC negotiation is performed inside the player.
I would suggest to use this test/diag tool http://aka.ms/amtest which is equipped to support all 3 DRMs (FairPlay, Widevine, PlayReady) and AES-128. If you expand "player_settings" you will see an entry called "FPS AC Path" which is where you paste in your App Cert URL. Also put in "FairPlay" under protectionInfo.type. Of course you need to run the test in Safari on macOS.
Hope this helps.
William

load movie trailer in android application from imdb

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/

How to Securely Stream Vimeo video into Android app?

I'm Creating a app and need to Securely stream a Vimeo video into the app but no one can gain access to the link
How will i be able to do this? I have no idea where to start
any help will great
Vimeo PRO users have direct access to their own source files in every video file response, otherwise if xamarin supports webviews you may be able to embed the Vimeo player into your app directly using oembed

What does android web browser use for playing audio streams? MediaPlayer or something else?

I have rtsp audio streams from a specific site (m.aveamuzik.com) that play within a browser. When I try to play the same stream using MediaPlayer class, I get MEDIA_ERROR_UNKNOWN (with extra=-2147483648). The error is not well documented but a little googling shows that it is most probably because of unsupported media format.
My question is, if MediaPlayer class does not support some format, how does the built-in browser play it? Also, how to use the same mechanism used by the browser in my code, instead of the MediaPlayer class?
Edit 1: #Joe
I tried the following code:
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(streamURL));
startActivity(intent);
MX Player and BSPlayer showed up as options to open the file, but not anything related with AudioPreviewActivity. Actually this is quite reasonable as my URLs are rtsp, but the intent filters for AudioPreviewActivity are just for http, file and content type of URIs.
Fact
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.
It works since Gingerbread in the default android browser.
Possible explaination
You probably don't use the MediaPlayer the way the android browser does. Post some code to help futher help.
Further help
The MediaPlayer has a lot of bugs before 4.0 (that fixed a lot a RTSP bugs).
The Web Audio API as described by W3C: link
Here is a detailed list of all media formats and protocols supported by Android: link
Testing page: link
This complete blog post also helped me about media streaming for Android: link
If it looked like the screenshot on this other question when it is playing in the Browser, then it should be the AudioPreview Activity from the Music app.
You should be able to
launch it by simply calling startActivity() with an Intent that matched one of its IntentFilter in the manifest.

How to play video from ftp streaming file?

If found many tips about how to stream from classic url link, but nothing about ftp.
Is it the same way to proced ?
Thanks you.
AL.
Android's media framework only supports HTTP and RTSP for streaming. You will need to download your file and play it back, or use some alternative URL that offers HTTP or RTSP for the media file.
If you are looking for an app in android, there is a player for android which will allow streaming from a ftp server. it's called FIPE Video Player. It's free, neat and stream in high quality.
Update: another brilliant app (again if you are looking for an app) I recommend is ES File Explore, which also allows streaming from ftp server instead of downloading locally and then playing.
Just use VLC for Android and add your FTP as a source.
See : https://play.google.com/store/apps/details?id=org.videolan.vlc&hl=fr&gl=US

Categories

Resources